/nfs/farm/g/glast/g/LCRepository/bin/miniconda2/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)


Waiting 203 seconds before starting...
Proceeding.

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 make4FGLxml version 01r04.
The default diffuse model files and names are for pass 8 and 4FGL and assume you have v11r5p3 of the Fermi Science Tools or higher.

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

/nfs/farm/g/glast/g/LCRepository/bin/miniconda2/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 = 7474
number of fields = 29
RA_SUN column already exists. File will not be modified.
Done.


Performing analysis on: 4FGL_J1040.5+0617_daily_bin624
RA = 160.15, Dec = 6.2848
tmin = 401068801, tmax = 401328001
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='65534', job_status='RUN', time_executed='2021-09-02 08:26:42.923513', time_epoch_executed='1630596402.92' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='624'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/65534

Creating custom pfile directory:
/scratch/kocevski/65534/pfiles/

Retrieving the FT1 file...

Issuing command:
/afs/slac.stanford.edu/g/glast/ground/bin/datacat find --group FT1 --filter 'nMetStop>=401068801.0 && nMetStart<401328001.0' /Data/Flight/Reprocess/P305

Issuing command:
/afs/slac.stanford.edu/g/glast/ground/bin/datacat find --group FT1 --filter 'nMetStart>564945418 && nMetStop>=401068801.0 && nMetStart<401328001.0' /Data/Flight/Level1/LPA

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/65534/ft1_4FGL_J1040.5+0617_daily_bin624.fits


Retrieving the FT1 file...

Issuing command:
/afs/slac.stanford.edu/g/glast/ground/bin/datacat find --group FT2 --filter 'nMetStop>=401068801.0 && nMetStart<401328001.0' /Data/Flight/Level1/LPA

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/65534/ft2_4FGL_J1040.5+0617_daily_bin624.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/65534/ft1_4FGL_J1040.5+0617_daily_bin624.fits outfile=/scratch/kocevski/65534/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin624.fits ra=160.15 dec=6.2848 rad=12.0 tmin=401068801.0 tmax=401328001.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 2.87
user 2.59
sys 0.20

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/65534/ft2_4FGL_J1040.5+0617_daily_bin624.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/65534/ft2_4FGL_J1040.5+0617_daily_bin624.fits sctable="SC_DATA" filter="IN_SAA!=T && LIVETIME>0 && gtifilter('/nfs/farm/g/glast/g/LCRepository/Likelihood/GTIs/nogrb.gti',(START+STOP)/2) && (angsep(RA_SUN,DEC_SUN,RA_ZENITH,DEC_ZENITH)>115 || gtifilter('/nfs/farm/g/glast/g/LCRepository/Likelihood/GTIs/nosolarflares.gti',(START+STOP)/2))" roicut=no evfile=/scratch/kocevski/65534/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin624.fits evtable="EVENTS" outfile="/scratch/kocevski/65534/ft1_filtered_4FGL_J1040.5+0617_daily_bin624.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('/nfs/farm/g/glast/g/LCRepository/Likelihood/GTIs/nogrb.gti',(START+STOP)/2) && (angsep(RA_SUN,DEC_SUN,RA_ZENITH,DEC_ZENITH)>115 || gtifilter('/nfs/farm/g/glast/g/LCRepository/Likelihood/GTIs/nosolarflares.gti',(START+STOP)/2))
real 0.46
user 0.29
sys 0.16

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/65534/ft1_filtered_4FGL_J1040.5+0617_daily_bin624.fits" evtable="EVENTS" scfile=/scratch/kocevski/65534/ft2_4FGL_J1040.5+0617_daily_bin624.fits sctable="SC_DATA" outfile=/scratch/kocevski/65534/ltcube_401068801_401328001_4FGL_J1040.5+0617_daily_bin624.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 /scratch/kocevski/65534/ft2_4FGL_J1040.5+0617_daily_bin624.fits
.....................!
real 12.74
user 12.36
sys 0.26

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/65534/ft1_filtered_4FGL_J1040.5+0617_daily_bin624.fits evtable="EVENTS" scfile=/scratch/kocevski/65534/ft2_4FGL_J1040.5+0617_daily_bin624.fits sctable="SC_DATA" expcube=/scratch/kocevski/65534/ltcube_401068801_401328001_4FGL_J1040.5+0617_daily_bin624.fits outfile=/scratch/kocevski/65534/expmap_401068801_401328001_4FGL_J1040.5+0617_daily_bin624.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 /scratch/kocevski/65534/ltcube_401068801_401328001_4FGL_J1040.5+0617_daily_bin624.fits
.....................!
real 155.66
user 151.36
sys 3.43

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 169 point sources and 0 extended sources

Setting source of interest to:
4FGL J1040.5+0617 @ 160.15 6.2848

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/65534/ft1_filtered_4FGL_J1040.5+0617_daily_bin624.fits scfile=/scratch/kocevski/65534/ft2_4FGL_J1040.5+0617_daily_bin624.fits outfile=/scratch/kocevski/65534/cmap_401068801_401328001_4FGL_J1040.5+0617_daily_bin624.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=160.15 yref=6.2848 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.50
user 0.33
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/65534/ft1_filtered_4FGL_J1040.5+0617_daily_bin624.fits scfile=/scratch/kocevski/65534/ft2_4FGL_J1040.5+0617_daily_bin624.fits outfile=/scratch/kocevski/65534/cmap_HighResolution_401068801_401328001_4FGL_J1040.5+0617_daily_bin624.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=160.15 yref=6.2848 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.49
user 0.35
sys 0.13

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/65534/ft1_filtered_4FGL_J1040.5+0617_daily_bin624.fits evtable="EVENTS" scfile=/scratch/kocevski/65534/ft2_4FGL_J1040.5+0617_daily_bin624.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/65534/Model_4FGL_J1040.5+0617_daily_bin624.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...
/scratch/kocevski/65534/ft1_filtered_4FGL_J1040.5+0617_daily_bin624.fits.....................!
real 45.84
user 44.54
sys 1.00

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/65534/ft1_filtered_4FGL_J1040.5+0617_daily_bin624.fits', '/scratch/kocevski/65534/ft2_4FGL_J1040.5+0617_daily_bin624.fits', expMap='/scratch/kocevski/65534/expmap_401068801_401328001_4FGL_J1040.5+0617_daily_bin624.fits', expCube='/scratch/kocevski/65534/ltcube_401068801_401328001_4FGL_J1040.5+0617_daily_bin624.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/65534/Model_4FGL_J1040.5+0617_daily_bin624.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1040.5+0617'

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  2.877e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  2.368e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
218        Scale:  8.643e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/65534/ft1_filtered_4FGL_J1040.5+0617_daily_bin624.fits
Spacecraft file(s): /scratch/kocevski/65534/ft2_4FGL_J1040.5+0617_daily_bin624.fits
Exposure map: /scratch/kocevski/65534/expmap_401068801_401328001_4FGL_J1040.5+0617_daily_bin624.fits
Exposure cube: /scratch/kocevski/65534/ltcube_401068801_401328001_4FGL_J1040.5+0617_daily_bin624.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/65534/Model_4FGL_J1040.5+0617_daily_bin624.xml
Optimizer: MINUIT
Statistic: UNBINNED

Performing an iterative likelihood fit...

Fit tolerance = 1

Performing likelihood fit...
Done.

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    13.696       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .87173E-01   1.0000         .10000E-03   10000.    
     3 'norm      '    .10192E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    4.2985       1.0000         .10000E-03   10000.    
     5 'Prefactor '    63.437       1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10019E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    16.167       1.0000         .10000E-03   10000.    
     8 'norm      '    2.2493       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10004E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    1.4295       1.0000         .10000E-03   10000.    
    11 'Prefactor '    8.0735       1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10719E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    .10073E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    2.0778       1.0000         .10000E-03   10000.    
    15 'norm      '    .12916       1.0000         .10000E-03   10000.    
    16 'Prefactor '    3.9140       1.0000         .10000E-03   10000.    
    17 'norm      '    1.6072       1.0000         .10000E-03   10000.    
    18 'Normalizat'    1.0274       1.0000         .10000E-01   10.000    
    19 'Prefactor '    1.1745       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5360E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   5682.433     FROM MIGRAD    STATUS=CONVERGED    117 CALLS     1941 TOTAL
                     EDM=   .24E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  2.2%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     13.699        11.621       -.86867E-06   -.16162E-02
   2  Prefactor     .19732E-03    6414.0        .27233E-04** at limit **
   3  norm          .10000E-03    8.9600        .49872E-06** at limit **
   4  Prefactor     4.2834        7.7294        .96530E-06   -.24509E-02
   5  Prefactor     63.527        18.067       -.61546E-06    .62881E-02
   6  Prefactor     .10000E-03    74.992       -.12555E-05** at limit **
   7  Prefactor     16.186        18.294       -.22792E-06   -.30987E-03
   8  norm          2.2496        1.4124        .22746E-06    .16686E-03
   9  Prefactor     .10000E-03    2.5167        .73653E-06** at limit **
  10  Prefactor     1.4290        2.3329       -.20200E-06   -.17578E-05
  11  Prefactor     8.0729        7.2003       -.71953E-06   -.26944E-03
  12  Prefactor     .10000E-03    10.367       -.10657E-05** at limit **
  13  norm          .10000E-03    .59650       -.18901E-06** at limit **
  14  Prefactor     2.0549        8.6057       -.20653E-05   -.21055E-03
  15  norm          .12896        1.5700       -.57240E-06   -.29932E-04
  16  Prefactor     3.9195        7.2000       -.53501E-06    .23575E-02
  17  norm          1.6114        18.246       -.17798E-05   -.63740E-03
  18  Normalizat    1.0274        .23748        .20577E-05    .64051E-04
  19  Prefactor     1.1745        .20459        .11032E-05    .83002E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 13.699
  Prefactor  = 0.00019732
  norm       = 0.0001
  Prefactor  = 4.28337
  Prefactor  = 63.5267
  Prefactor  = 0.000100005
  Prefactor  = 16.1865
  norm       = 2.24959
  Prefactor  = 0.0001
  Prefactor  = 1.42901
  Prefactor  = 8.07291
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 2.0549
  norm       = 0.128958
  Prefactor  = 3.91951
  norm       = 1.61138
  Normalizat = 1.02745
  Prefactor  = 1.17449
 **********
 **   18 **HESSE 
 **********

 FCN=   5682.433     FROM HESSE     STATUS=OK           332 CALLS     2273 TOTAL
                     EDM=   .94E-06    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     13.699        12.635        .27058E-02   -1.4968    
   2  Prefactor     .19732E-03    55.657        .14032       -1.5706    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          .10000E-03    8.9464        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     4.2834        13.718        .48578E-02   -1.5294    
   5  Prefactor     63.527        73.142        .12596E-02   -1.4112    
   6  Prefactor     .10000E-03    75.185        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     16.186        20.122        .24903E-02   -1.4903    
   8  norm          2.2496        1.4215        .68496E-02   -1.5408    
   9  Prefactor     .10000E-03    2.5145        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     1.4290        2.3691        .90341E-02   -1.5469    
  11  Prefactor     8.0729        7.2395        .35276E-02   -1.5140    
  12  Prefactor     .10000E-03    10.016        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          .10000E-03    .43075        .16084E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     2.0549        12.198        .71629E-02   -1.5421    
  15  norm          .12896        .83052        .23756E-01   -1.5636    
  16  Prefactor     3.9195        14.936        .50982E-02   -1.5312    
  17  norm          1.6114        25.673        .83554E-02   -1.5454    
  18  Normalizat    1.0274        .20848        .62574E-01   -.92116    
  19  Prefactor     1.1745        .17265        .52116E-01   -.87120    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 9.36997e-07
Minuit parameter uncertainties:
  1  12.6374
  2  0.147332
  3  3.84931e-06
  4  13.728
  5  73.2453
  6  0.00117262
  7  20.1302
  8  1.4215
  9  5.76934e-06
  10  2.36927
  11  7.24032
  12  6.04563e-06
  13  7.1639e-07
  14  10.0161
  15  0.654289
  16  14.9499
  17  12.8699
  18  0.20865
  19  0.172729
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  1.429e+00  2.369e+00  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  2.368e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
218        Scale:  8.643e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
533    Prefactor:  1.174e+00  1.727e-01  0.000e+00  1.000e+01 ( 1.000e+00)
534        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
535        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
532   Normalization:  1.027e+00  2.086e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 0.56
Ra Dec: 160.150 6.285
Photon Flux Upper Limit: 9.58e-08 ph cm-2 s-1
Energy Flux Upper Limit: 7.38e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/65534/likelihoodResults_401068801_401328001_4FGL_J1040.5+0617_daily_bin624.txt

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) = 5682.36317713
delta logL = 0.0697622589587

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 5682.36124679
delta logL = 0.0716925967736

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    1.8102       1.0000         .10000E-03   10000.    
     2 'Index     '    2.0330       1.0000          .0000       10.000    
     3 'Normalizat'    1.0311       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.1723       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5360E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   5682.361     FROM MIGRAD    STATUS=CONVERGED     54 CALLS      239 TOTAL
                     EDM=   .28E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     1.8109        155.99        .77635E-02    .32287E-03
   2  Index         2.0328        5.2368        .25602        .14123E-04
   3  Normalizat    1.0316        .82875E-01    .62460E-01   -.15889E-04
   4  Prefactor     1.1719        .72118E-01    .52160E-01    .51738E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 1.81085
  Index      = 2.03277
  Normalizat = 1.03159
  Prefactor  = 1.17187
 **********
 **   18 **HESSE 
 **********

 FCN=   5682.361     FROM HESSE     STATUS=OK            33 CALLS      272 TOTAL
                     EDM=   .18E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     1.8109        2.7813        .15109E-03   -1.5439    
   2  Index         2.0328        .84223        .11963E-01   -.63533    
   3  Normalizat    1.0316        .22968        .27625E-03   -.91980    
   4  Prefactor     1.1719        .20380        .23061E-03   -.87201    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.83671e-10
Minuit parameter uncertainties:
  1  2.78153
  2  0.848502
  3  0.229899
  4  0.203939
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/65534': No such file or directory
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) = 5682.36124439
delta logL = 0.0716949970665

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  1.811e+00  2.782e+00  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  2.033e+00  8.485e-01  0.000e+00  1.000e+01 (-1.000e+00)
218        Scale:  8.643e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
533    Prefactor:  1.172e+00  2.039e-01  0.000e+00  1.000e+01 ( 1.000e+00)
534        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
535        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
532   Normalization:  1.032e+00  2.299e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 0.56
Ra Dec: 160.150 6.285

Creating a high resolution counts map...
INFO: Auto-setting vmin to  0.000e+00 [aplpy.core]
INFO: Auto-setting vmax to  0.000e+00 [aplpy.core]
Saving /scratch/kocevski/65534/cmap_HighResolution_401068801_401328001_4FGL_J1040.5+0617_daily_bin624.png

Cleaning up...

** Nuclear option initiated! **
rmdir /scratch/kocevski/65534

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='7.38e-03', job_status='DONE', photon_flux_upper_limit='9.58e-08', time_completed='2021-09-02 08:34:28.410461', job_id='65534', GAL2='1.17', fit_tolerance='1e-08', EG2='1.03', EG='1.03', time_epoch_completed='1630596868.41', return_code2='0', ts='0.56', comment='SUCCESS', return_code='0', GAL='1.17', dlogl='7.17e-02', ts2='0.70', photon_index_error='0.00', photon_index='2.37' WHERE bin_id='624' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:34:28 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0023>
Subject: Job 65534: <4FGL_J1040.5+0617_daily_bin624> in cluster <slac> Done

Job <4FGL_J1040.5+0617_daily_bin624> was submitted from host <rhel6-64k> by user <kocevski> in cluster <slac> at Thu Sep  2 08:21:08 2021
Job was executed on host(s) <bullet0023>, in queue <medium>, as user <kocevski> in cluster <slac> at Thu Sep  2 08:23:12 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Thu Sep  2 08:23:12 2021
Terminated at Thu Sep  2 08:34:28 2021
Results reported at Thu Sep  2 08:34:28 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin624 160.15 6.2848 401068801 401328001 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J1040.5+0617 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   462.13 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             222.14 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   676 sec.
    Turnaround time :                            800 sec.

The output (if any) is above this job summary.

