/sdf/group/fermi/u/kocevski/software/conda/envs/fermitools_v1.0.5/lib/python2.7/site-packages/pyfits/__init__.py:22: PyFITSDeprecationWarning: PyFITS is deprecated, please use astropy.io.fits
  PyFITSDeprecationWarning)  # noqa

Likelihood Analysis Tool
Support Contact: Daniel Kocevski (daniel.kocevski@nasa.gov)

Importing modules...
This is make3FGLxml version 01r0.
The default diffuse model files and names are for pass 8 and assume you have v10r00p05 of the Fermi Science Tools or higher.
This is make4FGLDR3xml version 01r09.
The default diffuse model files and names are for P8R3, 4FGL DRs, and the default fermitools directory locations.

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

/sdf/group/fermi/u/kocevski/software/conda/envs/fermitools_v1.0.5/lib/python2.7/site-packages/matplotlib/cbook/deprecation.py:106: MatplotlibDeprecationWarning: The mpl_toolkits.axes_grid module was deprecated in version 2.1. Use mpl_toolkits.axes_grid1 and mpl_toolkits.axisartist provies the same functionality instead.
  warnings.warn(message, mplDeprecation, stacklevel=1)

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

number of points = 17492
number of fields = 31
RA_SUN column already exists. File will not be modified.
Done.


Performing analysis on: 4FGL_J1249.8+3707_weekly_bin771
RA = 192.46, Dec = 37.1306
tmin = 705283201, tmax = 705888001
emin = 100.0, emax = 100000.0
irfs = P8R3_SOURCE_V2
ROI = 12
zmax = 90

Fitting strategies:
Fix sources to their catalog values = True
Leave variable source normalizations free = True
Perform pre-fit where ALL sources are frozen to catalog values = False
Perform secondary fit with a free spectral index = True
Remove all catalog sources = False
Remove weak (TS < 2) catalog sources = False
Freeze Galactic component = False

Likelihood fit parameters:
Statistic: UNBINNED
Optimizer: MINUIT

Catalog: 4FGL

Repository job = True

LAT data source:
Data catalog

Updating database...

UPDATE lightcurve_data_v2 SET job_id='17489798', job_status='RUN', time_executed='2023-05-16 02:20:54.119632', time_epoch_executed='1684228854.12' WHERE source_name='4FGL J1249.8+3707' and cadence='weekly' and bin_id='771'

Database successfully updated.
Done.

Creating custom output directory:
/lscratch/kocevski/17489798

Creating custom pfile directory:
/lscratch/kocevski/17489798/pfiles/

Retrieving the FT1 file...

Issuing command:
datacat find --group FT1 --filter 'nMetStop>=705283201.0 && nMetStart<705888001.0' /Data/Flight/Reprocess/P305

Issuing command:
datacat find --group FT1 --filter 'nMetStart>564945418 && nMetStop>=705283201.0 && nMetStart<705888001.0' /Data/Flight/Level1/LPA

Retrieving 107 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/lscratch/kocevski/17489798/ft1_4FGL_J1249.8+3707_weekly_bin771.fits


Retrieving the FT1 file...

Issuing command:
datacat find --group FT2 --filter 'nMetStop>=705283201.0 && nMetStart<705888001.0' /Data/Flight/Level1/LPA

Retrieving 107 files...
Done.


Merging files...

Merged file saved to:
/lscratch/kocevski/17489798/ft2_4FGL_J1249.8+3707_weekly_bin771.fits


Selecting the photons:
time -p gtselect infile=/lscratch/kocevski/17489798/ft1_4FGL_J1249.8+3707_weekly_bin771.fits outfile=/lscratch/kocevski/17489798/ft1_filteredMKT_4FGL_J1249.8+3707_weekly_bin771.fits ra=192.46 dec=37.1306 rad=12.0 tmin=705283201.0 tmax=705888001.0 emin=100.0 emax=100000.0 zmin=0.0 zmax=90.0 evclass=128 evtype="INDEF" convtype=-1 phasemin=0.0 phasemax=1.0 evtable="EVENTS" chatter=2 clobber=yes debug=no gui=no mode="ql"

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

Done.
real 3.69
user 3.44
sys 0.19

Adding sun position to ft2 file:
/sdf/group/fermi/g/LCRepository/Repository/bin/sunpos /lscratch/kocevski/17489798/ft2_4FGL_J1249.8+3707_weekly_bin771.fits

Selecting the good time intervals:
time -p gtmktime scfile=/lscratch/kocevski/17489798/ft2_4FGL_J1249.8+3707_weekly_bin771.fits sctable="SC_DATA" filter="IN_SAA!=T && LIVETIME>0 && gtifilter('/sdf/group/fermi/g/LCRepository/Likelihood/GTIs/nogrb.gti',(START+STOP)/2) && (angsep(RA_SUN,DEC_SUN,RA_ZENITH,DEC_ZENITH)>115 || gtifilter('/sdf/group/fermi/g/LCRepository/Likelihood/GTIs/nosolarflares.gti',(START+STOP)/2))" roicut=no evfile=/lscratch/kocevski/17489798/ft1_filteredMKT_4FGL_J1249.8+3707_weekly_bin771.fits evtable="EVENTS" outfile="/lscratch/kocevski/17489798/ft1_filtered_4FGL_J1249.8+3707_weekly_bin771.fits" apply_filter=yes overwrite=yes header_obstimes=yes tstart=0.0 tstop=0.0 gtifile="default" chatter=3 clobber=yes debug=no gui=no mode="ql"

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

This is gtmktime version HEAD
Applying GTI filter:
IN_SAA!=T && LIVETIME>0 && gtifilter('/sdf/group/fermi/g/LCRepository/Likelihood/GTIs/nogrb.gti',(START+STOP)/2) && (angsep(RA_SUN,DEC_SUN,RA_ZENITH,DEC_ZENITH)>115 || gtifilter('/sdf/group/fermi/g/LCRepository/Likelihood/GTIs/nosolarflares.gti',(START+STOP)/2))
real 0.36
user 0.21
sys 0.13

Number of photons that the gtmktime cut: 1803

Generating the livetime cube:
time -p gtltcube evfile="/lscratch/kocevski/17489798/ft1_filtered_4FGL_J1249.8+3707_weekly_bin771.fits" evtable="EVENTS" scfile=/lscratch/kocevski/17489798/ft2_4FGL_J1249.8+3707_weekly_bin771.fits sctable="SC_DATA" outfile=/lscratch/kocevski/17489798/ltcube_705283201_705888001_4FGL_J1249.8+3707_weekly_bin771.fits dcostheta=0.025 binsz=1.0 phibins=0 tmin=0.0 tmax=0.0 file_version="1" zmin=0.0 zmax=90.0 chatter=2 clobber=yes debug=no gui=no mode="ql"

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

Working on file /lscratch/kocevski/17489798/ft2_4FGL_J1249.8+3707_weekly_bin771.fits
.....................!
real 21.36
user 20.91
sys 0.24

Generating the exposure map:
time -p gtexpmap evfile=/lscratch/kocevski/17489798/ft1_filtered_4FGL_J1249.8+3707_weekly_bin771.fits evtable="EVENTS" scfile=/lscratch/kocevski/17489798/ft2_4FGL_J1249.8+3707_weekly_bin771.fits sctable="SC_DATA" expcube=/lscratch/kocevski/17489798/ltcube_705283201_705888001_4FGL_J1249.8+3707_weekly_bin771.fits outfile=/lscratch/kocevski/17489798/expmap_705283201_705888001_4FGL_J1249.8+3707_weekly_bin771.fits irfs="P8R3_SOURCE_V2" evtype="INDEF" srcrad=30.0 nlong=88 nlat=88 nenergies=10 submap=no nlongmin=0 nlongmax=0 nlatmin=0 nlatmax=0 chatter=2 clobber=yes debug=no gui=no mode="ql"

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

The exposure maps generated by this tool are meant
to be used for *unbinned* likelihood analysis only.
Do not use them for binned analyses.
Computing the ExposureMap using /lscratch/kocevski/17489798/ltcube_705283201_705888001_4FGL_J1249.8+3707_weekly_bin771.fits
.....................!
real 63.51
user 59.59
sys 3.49

Generating the xml model:
radLim = 0.001
maxRad = 12
normsOnly = True
freeVariableSources = True
Fixing all sources to their catalog values, except variable sources
Creating file and adding sources from 4FGL
Added 196 point sources and 0 extended sources

Setting source of interest to:
4FGL J1249.8+3707 @ 192.46 37.1306

Creating the counts map:
time -p gtbin evfile=/lscratch/kocevski/17489798/ft1_filtered_4FGL_J1249.8+3707_weekly_bin771.fits scfile=/lscratch/kocevski/17489798/ft2_4FGL_J1249.8+3707_weekly_bin771.fits outfile=/lscratch/kocevski/17489798/cmap_705283201_705888001_4FGL_J1249.8+3707_weekly_bin771.fits algorithm="CMAP" ebinalg="LOG" emin=30.0 emax=200000.0 ebinfile=NONE tbinalg="LIN" tbinfile=NONE nxpix=160 nypix=160 binsz=0.25 coordsys="CEL" xref=192.46 yref=37.1306 axisrot=0.0 rafield="RA" decfield="DEC" proj="AIT" hpx_ordering_scheme="RING" hpx_order=3 hpx_ebin=yes hpx_region="" evtable="EVENTS" sctable="SC_DATA" efield="ENERGY" tfield="TIME" chatter=2 clobber=yes debug=no gui=no mode="ql"

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

This is gtbin version HEAD
real 0.39
user 0.24
sys 0.13

Creating the high resolution counts map:
time -p gtbin evfile=/lscratch/kocevski/17489798/ft1_filtered_4FGL_J1249.8+3707_weekly_bin771.fits scfile=/lscratch/kocevski/17489798/ft2_4FGL_J1249.8+3707_weekly_bin771.fits outfile=/lscratch/kocevski/17489798/cmap_HighResolution_705283201_705888001_4FGL_J1249.8+3707_weekly_bin771.fits algorithm="CMAP" ebinalg="LOG" emin=30.0 emax=200000.0 ebinfile=NONE tbinalg="LIN" tbinfile=NONE nxpix=500 nypix=500 binsz=0.1 coordsys="CEL" xref=192.46 yref=37.1306 axisrot=0.0 rafield="RA" decfield="DEC" proj="AIT" hpx_ordering_scheme="RING" hpx_order=3 hpx_ebin=yes hpx_region="" evtable="EVENTS" sctable="SC_DATA" efield="ENERGY" tfield="TIME" chatter=2 clobber=yes debug=no gui=no mode="ql"

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

This is gtbin version HEAD
real 0.39
user 0.23
sys 0.14

Computing the diffuse response:
time -p gtdiffrsp evfile=/lscratch/kocevski/17489798/ft1_filtered_4FGL_J1249.8+3707_weekly_bin771.fits evtable="EVENTS" scfile=/lscratch/kocevski/17489798/ft2_4FGL_J1249.8+3707_weekly_bin771.fits sctable="SC_DATA" srcmdl=/lscratch/kocevski/17489798/Model_4FGL_J1249.8+3707_weekly_bin771.xml irfs="P8R3_SOURCE_V2" evclsmin=0 evclass="INDEF" evtype="INDEF" convert=yes chatter=2 clobber=yes debug=no gui=no mode="ql"

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

adding source EG_v02
adding source GAL_V02
Working on...
/lscratch/kocevski/17489798/ft1_filtered_4FGL_J1249.8+3707_weekly_bin771.fits.....................!
real 51.17
user 50.08
sys 0.69

Creating the likelihood object...
obs = UnbinnedObs('/lscratch/kocevski/17489798/ft1_filtered_4FGL_J1249.8+3707_weekly_bin771.fits', '/lscratch/kocevski/17489798/ft2_4FGL_J1249.8+3707_weekly_bin771.fits', expMap='/lscratch/kocevski/17489798/expmap_705283201_705888001_4FGL_J1249.8+3707_weekly_bin771.fits', expCube='/lscratch/kocevski/17489798/ltcube_705283201_705888001_4FGL_J1249.8+3707_weekly_bin771.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/lscratch/kocevski/17489798/Model_4FGL_J1249.8+3707_weekly_bin771.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1249.8+3707'

4FGL J1249.8+3707
   Spectrum: PowerLaw
313    Prefactor:  2.229e+00  0.000e+00  0.000e+00  1.000e+06 ( 1.000e-14)
314        Index:  1.780e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
315        Scale:  4.011e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /lscratch/kocevski/17489798/ft1_filtered_4FGL_J1249.8+3707_weekly_bin771.fits
Spacecraft file(s): /lscratch/kocevski/17489798/ft2_4FGL_J1249.8+3707_weekly_bin771.fits
Exposure map: /lscratch/kocevski/17489798/expmap_705283201_705888001_4FGL_J1249.8+3707_weekly_bin771.fits
Exposure cube: /lscratch/kocevski/17489798/ltcube_705283201_705888001_4FGL_J1249.8+3707_weekly_bin771.fits
IRFs: P8R3_SOURCE_V2
Source model file: /lscratch/kocevski/17489798/Model_4FGL_J1249.8+3707_weekly_bin771.xml
Optimizer: MINUIT
Statistic: UNBINNED

Performing an iterative likelihood fit...

Fit tolerance = 1

Performing likelihood fit...
Done.

MINUIT Return Code (Fixed Index): 102
logL (Fixed Index) = 19963.3965987

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Fixed Index): 0
logL (Fixed Index) = 19963.3341254

Fit tolerance = 1e-08

Performing likelihood fit...
 **********
 **   14 **SET NOWARN 
 **********

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .21636E-05   1.0000          .0000       .10000E+07
     2 'norm      '    4.1257       1.0000          .0000       .10000E+07
     3 'Prefactor '    3.7462       1.0000          .0000       .10000E+07
     4 'Prefactor '    1.5423       1.0000          .0000       .10000E+07
     5 'Prefactor '    2.2190       1.0000          .0000       .10000E+07
     6 'Prefactor '    12.929       1.0000          .0000       .10000E+07
     7 'Prefactor '    4.5137       1.0000          .0000       .10000E+07
     8 'Prefactor '    17.134       1.0000          .0000       .10000E+07
     9 'Prefactor '    .53041E-06   1.0000          .0000       .10000E+07
    10 'norm      '    2.6037       1.0000          .0000       .10000E+07
    11 'Prefactor '    19.157       1.0000          .0000       .10000E+07
    12 'Prefactor '    3.8792       1.0000          .0000       .10000E+07
    13 'norm      '    .25480E-07   1.0000          .0000       .10000E+07
    14 'norm      '    10.152       1.0000          .0000       .10000E+07
    15 'norm      '    10.835       1.0000          .0000       .10000E+07
    16 'norm      '    7.9339       1.0000          .0000       .10000E+07
    17 'Prefactor '    .16950       1.0000          .0000       .10000E+07
    18 'Prefactor '    .26201E-05   1.0000          .0000       .10000E+07
    19 'Prefactor '    .34326E-03   1.0000          .0000       .10000E+07
    20 'Prefactor '    .35470E-05   1.0000          .0000       .10000E+07
    21 'Normalizat'    1.1069       1.0000         .10000E-01   10.000    
    22 'Prefactor '    1.0314       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6280E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   19963.33     FROM MIGRAD    STATUS=CONVERGED    128 CALLS     1384 TOTAL
                     EDM=   .56E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.0%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10747E-06    3.0780        .24591E-06** at limit **
   2  norm          4.1258        1.6160       -.26272E-07    .12313E-03
   3  Prefactor     3.7313        3.0100        .26025E-07    .89085E-04
   4  Prefactor     1.5426        .99279        .10641E-06    .36106E-02
   5  Prefactor     2.2198        1.1684        .54321E-07    .24335E-02
   6  Prefactor     12.897        7.4017        .55114E-07    .35629E-01
   7  Prefactor     4.5133        1.2006       -.26588E-07   -.53275E-02
   8  Prefactor     17.195        7.7229        .12039E-06   -.92072E-01
   9  Prefactor     .40024E-07    9.2873        .10791E-06** at limit **
  10  norm          2.6053        2.0225        .17247E-06    .12398E-02
  11  Prefactor     19.092        1.1959        .11506E-07    .19131E-02
  12  Prefactor     3.8685        7.5687        .30839E-06    .53918E-02
  13  norm          .55511E-10    1.1830        .66214E-08** at limit **
  14  norm          10.145        6.1968        .38091E-07    .12130E-02
  15  norm          10.848        2.5140       -.18555E-07    .23342E-02
  16  norm          7.9141        2.4986       -.18930E-07   -.48843E-02
  17  Prefactor     .16946        2.0672        .20062E-06** at limit **
  18  Prefactor     .30753E-07    3.5736        .50014E-07** at limit **
  19  Prefactor     .55511E-10    26.460        .90389E-07** at limit **
  20  Prefactor     .14155E-07    5.1181        .13269E-06** at limit **
  21  Normalizat    1.1069        .11573        .16280E-05    .15302E-04
  22  Prefactor     1.0314        .14191       -.27948E-05   -.12739E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 1.0747e-07
  norm       = 4.12577
  Prefactor  = 3.73131
  Prefactor  = 1.54264
  Prefactor  = 2.21982
  Prefactor  = 12.8965
  Prefactor  = 4.51325
  Prefactor  = 17.1946
  Prefactor  = 4.00235e-08
  norm       = 2.60531
  Prefactor  = 19.0921
  Prefactor  = 3.86851
  norm       = 5.55112e-11
  norm       = 10.1446
  norm       = 10.8481
  norm       = 7.91415
  Prefactor  = 0.169463
  Prefactor  = 3.07532e-08
  Prefactor  = 5.55112e-11
  Prefactor  = 1.41553e-08
  Normalizat = 1.1069
  Prefactor  = 1.03142
 **********
 **   18 **HESSE 
 **********

 FCN=   19963.33     FROM HESSE     STATUS=OK           402 CALLS     1786 TOTAL
                     EDM=   .16E-06    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10747E-06    4.0115        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  norm          4.1258        1.6169        .49604E-03   -1.5667    
   3  Prefactor     3.7313        3.0132        .52141E-03   -1.5669    
   4  Prefactor     1.5426        .99357        .85804E-03   -1.5683    
   5  Prefactor     2.2198        1.1775        .69008E-03   -1.5678    
   6  Prefactor     12.897        7.8654        .27832E-03   -1.5636    
   7  Prefactor     4.5133        9.1087        .47364E-03   -1.5665    
   8  Prefactor     17.195        12.097        .24169E-03   -1.5625    
   9  Prefactor     .40024E-07    9.2844        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  norm          2.6053        2.0908        .63197E-03   -1.5676    
  11  Prefactor     19.092        14.626        .22855E-03   -1.5621    
  12  Prefactor     3.8685        7.6816        .51207E-03   -1.5669    
  13  norm          .55511E-10    1.1771        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  norm          10.145        6.1996        .31424E-03   -1.5644    
  15  norm          10.848        4.4714        .30412E-03   -1.5642    
  16  norm          7.9141        7.0619        .35574E-03   -1.5652    
  17  Prefactor     .16946        .59183        .52881E-02   -1.5716    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     .30753E-07    3.8435        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     .55511E-10    26.422        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     .14155E-07    5.2233        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Normalizat    1.1069        .99220E-01    .37728E-01   -.89531    
  22  Prefactor     1.0314        .12054        .67971E-01   -.91689    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.58182e-07
Minuit parameter uncertainties:
  1  0.00131318
  2  1.61686
  3  3.0132
  4  0.993571
  5  1.17754
  6  7.86542
  7  9.10868
  8  12.0971
  9  0.00121901
  10  2.09085
  11  14.6261
  12  7.68167
  13  1.42015e-05
  14  6.19965
  15  4.47137
  16  7.06194
  17  0.591833
  18  0.000687498
  19  6.51112e-05
  20  0.000544208
  21  0.0992364
  22  0.120569
Done.

MINUIT Return Code (Fixed Index): 0
logL (Fixed Index) = 19963.3340691

Extracting fit parameters...

4FGL J1249.8+3707
   Spectrum: PowerLaw
313    Prefactor:  1.719e+01  1.210e+01  0.000e+00  1.000e+06 ( 1.000e-14)
314        Index:  1.780e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
315        Scale:  4.011e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
625    Prefactor:  1.031e+00  1.206e-01  0.000e+00  1.000e+01 ( 1.000e+00)
626        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
627        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
624   Normalization:  1.107e+00  9.924e-02  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 4.18
Ra Dec: 192.460 37.131
Photon Index (Fixed Index): 1.78 +/- 0.00
Photon Flux (Fixed Index): 1.57e-08 +/- 1.10e-08
Energy Flux (Fixed Index): 1.99e-05 +/- 1.40e-05

Performing a free index iterative likelihood fit...

Freezing all point sources, except source of interest...

Done.

Freeing candidate source...
Done.

Fit tolerance = 1

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 19962.1495161
delta logL = 1.18455299284

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 19962.1395531
delta logL = 1.19451604903

Fit tolerance = 1e-08

Performing likelihood fit...
 **********
 **   14 **SET NOWARN 
 **********

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    6.7905       1.0000          .0000       .10000E+07
     2 'Index     '    2.4823       1.0000          .0000       10.000    
     3 'Normalizat'    1.0758       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.0492       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6280E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.
 MACHINE ACCURACY LIMITS FURTHER IMPROVEMENT.

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.
 MIGRAD TERMINATED WITHOUT CONVERGENCE.

 FCN=   19962.14     FROM MIGRAD    STATUS=FAILED       105 CALLS      314 TOTAL
                     EDM=   .23E-05    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     6.7958        81.129        .76960E-04    .62487E-02
   2  Index         2.4825        2.5647        .49331E-02    .25716E-02
   3  Normalizat    1.0757        .16578        .23962E-03   -.43649E-05
   4  Prefactor     1.0492        .18093        .29830E-03   -.27441E-05
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   19962.14     FROM SIMPLEX   STATUS=UNCHANGED     84 CALLS      398 TOTAL
                     EDM=   .15E-04    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     6.7958        81.129        .13434E-04    .62487E-02
   2  Index         2.4825        2.5647        .52122E-03    .25716E-02
   3  Normalizat    1.0757        .16578        .19143E-03   -.43649E-05
   4  Prefactor     1.0492        .18093        .21356E-03   -.27441E-05
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   19962.14     FROM MIGRAD    STATUS=CONVERGED     29 CALLS      427 TOTAL
                     EDM=   .15E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     6.7958        8.9142        .15392E-04   -.23635E-04
   2  Index         2.4825        .51961        .98663E-03    .10192E-03
   3  Normalizat    1.0757        .11755        .95849E-05   -.47444E-05
   4  Prefactor     1.0492        .14241        .11932E-04   -.30490E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 6.79576
  Index      = 2.48254
  Normalizat = 1.07567
  Prefactor  = 1.04921
 **********
 **   18 **HESSE 
 **********

 FCN=   19962.14     FROM HESSE     STATUS=OK            25 CALLS      452 TOTAL
                     EDM=   .78E-14    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     6.7958        8.1334        .61568E-06   -1.5656    
   2  Index         2.4825        .47411        .19733E-03   -.52764    
   3  Normalizat    1.0757        .11711        .19170E-05   -.90537    
   4  Prefactor     1.0492        .14207        .23864E-05   -.91107    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 7.81209e-15
Minuit parameter uncertainties:
  1  8.13337
  2  0.475072
  3  0.11714
  4  0.142121
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 19962.1395494
delta logL = 1.19451971962

Extracting fit parameters...

4FGL J1249.8+3707
   Spectrum: PowerLaw
313    Prefactor:  6.796e+00  8.133e+00  0.000e+00  1.000e+06 ( 1.000e-14)
314        Index:  2.483e+00  4.751e-01  0.000e+00  1.000e+01 (-1.000e+00)
315        Scale:  4.011e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
625    Prefactor:  1.049e+00  1.421e-01  0.000e+00  1.000e+01 ( 1.000e+00)
626        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
627        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
624   Normalization:  1.076e+00  1.171e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 6.56
Ra Dec: 192.460 37.131
Photon Index (Free Index): 2.48 +/- 0.48
Photon Flux (Free Index): 4.38e-08 +/- 2.69e-08
Energy Flux (Free Index): 1.30e-05 +/- 7.03e-06

Creating a high resolution counts map...
INFO: Auto-setting vmin to -1.000e-01 [aplpy.core]
INFO: Auto-setting vmax to  1.110e+00 [aplpy.core]
Saving /lscratch/kocevski/17489798/cmap_HighResolution_705283201_705888001_4FGL_J1249.8+3707_weekly_bin771.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='1.57e-08', energy_flux2='1.30e-05', photon_flux_error='1.10e-08', dlogl='1.19e+00', energy_flux='1.99e-05', photon_flux2='4.38e-08', job_status='DONE', time_completed='2023-05-16 02:28:25.772579', photon_index_error2='0.48', photon_index2='2.48', ts='4.18', fit_tolerance='1e-08', GAL='1.03', photon_index_error='0.00', energy_flux_error2='7.03e-06', EG='1.11', time_epoch_completed='1684229305.77', return_code='0', job_id='17489798', GAL2='1.05', EG2='1.08', return_code2='0', energy_flux_error='1.40e-05', photon_flux_error2='2.69e-08', ts2='6.56', photon_index='1.78' WHERE bin_id='771' AND source_name='4FGL J1249.8+3707' AND cadence='weekly';

Database successfully updated.


Analysis Complete.


Tue May 16 02:28:25 PDT 2023

