/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 221 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 = 7388
number of fields = 27
No RA_SUN column yet. Adding RA_SUN/DEC_SUN columns.
Done.


Performing analysis on: 4FGL_J1040.5+0617_daily_bin293
RA = 160.15, Dec = 6.2848
tmin = 315273601, tmax = 315532801
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='62865', job_status='RUN', time_executed='2021-09-02 08:16:52.089400', time_epoch_executed='1630595812.09' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='293'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/62865

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/62865/ft1_4FGL_J1040.5+0617_daily_bin293.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/62865/ft2_4FGL_J1040.5+0617_daily_bin293.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/62865/ft1_4FGL_J1040.5+0617_daily_bin293.fits outfile=/scratch/kocevski/62865/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin293.fits ra=160.15 dec=6.2848 rad=12.0 tmin=315273601.0 tmax=315532801.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.65
user 3.42
sys 0.21

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/62865/ft2_4FGL_J1040.5+0617_daily_bin293.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/62865/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin293.fits evtable="EVENTS" outfile="/scratch/kocevski/62865/ft1_filtered_4FGL_J1040.5+0617_daily_bin293.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.50
user 0.33
sys 0.15

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/62865/ft1_filtered_4FGL_J1040.5+0617_daily_bin293.fits" evtable="EVENTS" scfile=/scratch/kocevski/62865/ft2_4FGL_J1040.5+0617_daily_bin293.fits sctable="SC_DATA" outfile=/scratch/kocevski/62865/ltcube_315273601_315532801_4FGL_J1040.5+0617_daily_bin293.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/62865/ft2_4FGL_J1040.5+0617_daily_bin293.fits
.....................!
real 12.23
user 11.85
sys 0.33

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/62865/ft1_filtered_4FGL_J1040.5+0617_daily_bin293.fits evtable="EVENTS" scfile=/scratch/kocevski/62865/ft2_4FGL_J1040.5+0617_daily_bin293.fits sctable="SC_DATA" expcube=/scratch/kocevski/62865/ltcube_315273601_315532801_4FGL_J1040.5+0617_daily_bin293.fits outfile=/scratch/kocevski/62865/expmap_315273601_315532801_4FGL_J1040.5+0617_daily_bin293.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/62865/ltcube_315273601_315532801_4FGL_J1040.5+0617_daily_bin293.fits
.....................!
real 193.03
user 187.69
sys 4.94

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/62865/ft1_filtered_4FGL_J1040.5+0617_daily_bin293.fits scfile=/scratch/kocevski/62865/ft2_4FGL_J1040.5+0617_daily_bin293.fits outfile=/scratch/kocevski/62865/cmap_315273601_315532801_4FGL_J1040.5+0617_daily_bin293.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.54
user 0.37
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/62865/ft1_filtered_4FGL_J1040.5+0617_daily_bin293.fits scfile=/scratch/kocevski/62865/ft2_4FGL_J1040.5+0617_daily_bin293.fits outfile=/scratch/kocevski/62865/cmap_HighResolution_315273601_315532801_4FGL_J1040.5+0617_daily_bin293.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.54
user 0.39
sys 0.14

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

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/62865/ft1_filtered_4FGL_J1040.5+0617_daily_bin293.fits', '/scratch/kocevski/62865/ft2_4FGL_J1040.5+0617_daily_bin293.fits', expMap='/scratch/kocevski/62865/expmap_315273601_315532801_4FGL_J1040.5+0617_daily_bin293.fits', expCube='/scratch/kocevski/62865/ltcube_315273601_315532801_4FGL_J1040.5+0617_daily_bin293.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/62865/Model_4FGL_J1040.5+0617_daily_bin293.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/62865/ft1_filtered_4FGL_J1040.5+0617_daily_bin293.fits
Spacecraft file(s): /scratch/kocevski/62865/ft2_4FGL_J1040.5+0617_daily_bin293.fits
Exposure map: /scratch/kocevski/62865/expmap_315273601_315532801_4FGL_J1040.5+0617_daily_bin293.fits
Exposure cube: /scratch/kocevski/62865/ltcube_315273601_315532801_4FGL_J1040.5+0617_daily_bin293.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/62865/Model_4FGL_J1040.5+0617_daily_bin293.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) = 5164.87330065

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    10.385       1.0000         .10000E-03   10000.    
     2 'Prefactor '    36.364       1.0000         .10000E-03   10000.    
     3 'norm      '    .12257E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    7.6363       1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10016E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    51.463       1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    1.7475       1.0000         .10000E-03   10000.    
     9 'Prefactor '    2.2555       1.0000         .10000E-03   10000.    
    10 'Prefactor '    5.0519       1.0000         .10000E-03   10000.    
    11 'Prefactor '    10.933       1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    .81234       1.0000         .10000E-03   10000.    
    14 'Prefactor '    5.8889       1.0000         .10000E-03   10000.    
    15 'norm      '    .87976       1.0000         .10000E-03   10000.    
    16 'Prefactor '    31.683       1.0000         .10000E-03   10000.    
    17 'norm      '    36.081       1.0000         .10000E-03   10000.    
    18 'Normalizat'    .89204       1.0000         .10000E-01   10.000    
    19 'Prefactor '    1.0857       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=   5164.820     FROM MIGRAD    STATUS=CONVERGED    373 CALLS     1899 TOTAL
                     EDM=   .11E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     10.380        16.725        .31083E-02    .53199E-04
   2  Prefactor     36.363        50.239        .16615E-02    .80181E-03
   3  norm          .10000E-03    23.284        .90712E-02** at limit **
   4  Prefactor     7.6313        23.792        .36280E-02   -.29111E-03
   5  Prefactor     .10000E-03    45.352        .90712E-02** at limit **
   6  Prefactor     51.462        101.76        .13976E-02   -.44626E-03
   7  Prefactor     .10000E-03    15.531        .90712E-02** at limit **
   8  norm          1.7475        1.3323        .79307E-02    .43254E-04
   9  Prefactor     2.2564        6.0870        .68390E-02    .60674E-03
  10  Prefactor     5.0517        3.5177        .44724E-02    .19650E-03
  11  Prefactor     10.932        10.458        .30292E-02   -.10345E-03
  12  Prefactor     .10000E-03    2.1598        .90712E-02** at limit **
  13  norm          .81249        .72021        .10906E-01    .14694E-02
  14  Prefactor     5.8882        7.6138        .41371E-02    .19422E-02
  15  norm          .87943        1.0214        .12734E-01   -.85211E-04
  16  Prefactor     31.682        21.781        .17796E-02    .31678E-03
  17  norm          36.081        21.411        .16680E-02    .42931E-03
  18  Normalizat    .89217        .22597        .67408E-01   -.51347E-04
  19  Prefactor     1.0856        .18455        .38155E-01   -.43104E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 10.3801
  Prefactor  = 36.3631
  norm       = 0.0001
  Prefactor  = 7.63125
  Prefactor  = 0.0001
  Prefactor  = 51.4619
  Prefactor  = 0.0001
  norm       = 1.74753
  Prefactor  = 2.25642
  Prefactor  = 5.05171
  Prefactor  = 10.9317
  Prefactor  = 0.0001
  norm       = 0.812495
  Prefactor  = 5.88817
  norm       = 0.879429
  Prefactor  = 31.6823
  norm       = 36.0805
  Normalizat = 0.892168
  Prefactor  = 1.08563
 **********
 **   18 **HESSE 
 **********

 FCN=   5164.820     FROM HESSE     STATUS=OK           274 CALLS     2173 TOTAL
                     EDM=   .71E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     10.380        16.647        .12433E-03   -1.5063    
   2  Prefactor     36.363        50.231        .66460E-04   -1.4501    
   3  norm          .10000E-03    23.339        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     7.6313        23.306        .14512E-03   -1.5155    
   5  Prefactor     .10000E-03    45.381        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     51.462        100.07        .55906E-04   -1.4272    
   7  Prefactor     .10000E-03    15.537        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          1.7475        1.3269        .69483E-04   -1.5444    
   9  Prefactor     2.2564        6.0634        .27356E-03   -1.5408    
  10  Prefactor     5.0517        3.5173        .10780E-03   -1.5258    
  11  Prefactor     10.932        10.509        .12117E-03   -1.5047    
  12  Prefactor     .10000E-03    2.1622        .10313E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          .81249        .69438        .49515E-03   -1.5528    
  14  Prefactor     5.8882        7.5944        .82742E-03   -1.5223    
  15  norm          .87943        .98745        .75360E-03   -1.5520    
  16  Prefactor     31.682        21.784        .71186E-04   -1.4582    
  17  norm          36.081        21.420        .66719E-04   -1.4506    
  18  Normalizat    .89217        .26141        .29820E-03   -.96736    
  19  Prefactor     1.0856        .21389        .23069E-03   -.89927    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 7.08955e-09
Minuit parameter uncertainties:
  1  16.6549
  2  50.2899
  3  6.36104e-05
  4  23.3341
  5  0.000248233
  6  100.397
  7  1.27213e-05
  8  1.32689
  9  6.06506
  10  3.51741
  11  10.5112
  12  5.95781e-06
  13  0.694388
  14  7.59566
  15  0.987467
  16  21.7891
  17  21.4241
  18  0.261785
  19  0.214061
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  5.052e+00  3.517e+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.086e+00  2.141e-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:  8.922e-01  2.618e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 4.08
Ra Dec: 160.150 6.285
Photon Index (Fixed Index): 2.37 +/- 0.00
Photon Flux (Fixed Index): 6.10e-08 +/- 4.25e-08
Energy Flux (Fixed Index): 2.09e-05 +/- 1.45e-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) = 5164.76208381
delta logL = 0.058328954382

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 5164.75775905
delta logL = 0.0626537099597

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    5.6177       1.0000         .10000E-03   10000.    
     2 'Index     '    2.1798       1.0000          .0000       10.000    
     3 'Normalizat'    .90178       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.0805       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=   5164.758     FROM MIGRAD    STATUS=CONVERGED     53 CALLS      233 TOTAL
                     EDM=   .29E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     5.6184        119.93        .42373E-02    .16825E-03
   2  Index         2.1802        5.9333        .19011        .68699E-04
   3  Normalizat    .90160        .12584        .67093E-01   -.46011E-05
   4  Prefactor     1.0806        .93802E-01    .38378E-01   -.48794E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 5.61844
  Index      = 2.18023
  Normalizat = 0.901598
  Prefactor  = 1.08062
 **********
 **   18 **HESSE 
 **********

 FCN=   5164.758     FROM HESSE     STATUS=OK            33 CALLS      266 TOTAL
                     EDM=   .28E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     5.6184        4.1390        .11579E-03   -1.5234    
   2  Index         2.1802        .52365        .69793E-02   -.59917    
   3  Normalizat    .90160        .24917        .29680E-03   -.96404    
   4  Prefactor     1.0806        .21048        .23115E-03   -.90088    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.83532e-11
Minuit parameter uncertainties:
  1  4.13919
  2  0.525062
  3  0.249492
  4  0.210644
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/62865': 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) = 5164.75775835
delta logL = 0.062654405855

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  5.618e+00  4.139e+00  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  2.180e+00  5.251e-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.081e+00  2.106e-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:  9.016e-01  2.495e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 4.18
Ra Dec: 160.150 6.285
Photon Index (Free Index): 2.18 +/- 0.53
Photon Flux (Free Index): 5.25e-08 +/- 4.46e-08
Energy Flux (Free Index): 2.45e-05 +/- 2.15e-05

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/62865/cmap_HighResolution_315273601_315532801_4FGL_J1040.5+0617_daily_bin293.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='6.10e-08', energy_flux2='2.45e-05', photon_flux_error='4.25e-08', dlogl='6.27e-02', energy_flux='2.09e-05', photon_flux2='5.25e-08', job_status='DONE', time_completed='2021-09-02 08:25:06.644989', photon_index_error2='0.53', photon_index2='2.18', ts='4.08', fit_tolerance='1e-08', GAL='1.09', photon_index_error='0.00', energy_flux_error2='2.15e-05', EG='0.89', time_epoch_completed='1630596306.65', return_code='0', job_id='62865', GAL2='1.08', EG2='0.90', return_code2='0', energy_flux_error='1.45e-05', photon_flux_error2='4.46e-08', ts2='4.18', photon_index='2.37' WHERE bin_id='293' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:25:06 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0199>
Subject: Job 62865: <4FGL_J1040.5+0617_daily_bin293> in cluster <slac> Done

Job <4FGL_J1040.5+0617_daily_bin293> was submitted from host <rhel6-64k> by user <kocevski> in cluster <slac> at Thu Sep  2 08:11:19 2021
Job was executed on host(s) <bullet0199>, in queue <medium>, as user <kocevski> in cluster <slac> at Thu Sep  2 08:13:02 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:13:02 2021
Terminated at Thu Sep  2 08:25:07 2021
Results reported at Thu Sep  2 08:25:07 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin293 160.15 6.2848 315273601 315532801 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 :                                   493.06 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             273.80 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   724 sec.
    Turnaround time :                            828 sec.

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

