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


Performing analysis on: 4FGL_J1040.5+0617_daily_bin209
RA = 160.15, Dec = 6.2848
tmin = 293500801, tmax = 293760001
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='62756', job_status='RUN', time_executed='2021-09-02 08:14:13.588006', time_epoch_executed='1630595653.59' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='209'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/62756

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/62756/ft1_4FGL_J1040.5+0617_daily_bin209.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/62756/ft2_4FGL_J1040.5+0617_daily_bin209.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/62756/ft1_4FGL_J1040.5+0617_daily_bin209.fits outfile=/scratch/kocevski/62756/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin209.fits ra=160.15 dec=6.2848 rad=12.0 tmin=293500801.0 tmax=293760001.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.67
user 3.45
sys 0.19

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/62756/ft2_4FGL_J1040.5+0617_daily_bin209.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/62756/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin209.fits evtable="EVENTS" outfile="/scratch/kocevski/62756/ft1_filtered_4FGL_J1040.5+0617_daily_bin209.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.60
user 0.36
sys 0.16

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/62756/ft1_filtered_4FGL_J1040.5+0617_daily_bin209.fits" evtable="EVENTS" scfile=/scratch/kocevski/62756/ft2_4FGL_J1040.5+0617_daily_bin209.fits sctable="SC_DATA" outfile=/scratch/kocevski/62756/ltcube_293500801_293760001_4FGL_J1040.5+0617_daily_bin209.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/62756/ft2_4FGL_J1040.5+0617_daily_bin209.fits
.....................!
real 15.90
user 15.43
sys 0.31

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/62756/ft1_filtered_4FGL_J1040.5+0617_daily_bin209.fits evtable="EVENTS" scfile=/scratch/kocevski/62756/ft2_4FGL_J1040.5+0617_daily_bin209.fits sctable="SC_DATA" expcube=/scratch/kocevski/62756/ltcube_293500801_293760001_4FGL_J1040.5+0617_daily_bin209.fits outfile=/scratch/kocevski/62756/expmap_293500801_293760001_4FGL_J1040.5+0617_daily_bin209.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/62756/ltcube_293500801_293760001_4FGL_J1040.5+0617_daily_bin209.fits
.....................!
real 192.43
user 187.06
sys 4.05

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/62756/ft1_filtered_4FGL_J1040.5+0617_daily_bin209.fits scfile=/scratch/kocevski/62756/ft2_4FGL_J1040.5+0617_daily_bin209.fits outfile=/scratch/kocevski/62756/cmap_293500801_293760001_4FGL_J1040.5+0617_daily_bin209.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.57
user 0.40
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/62756/ft1_filtered_4FGL_J1040.5+0617_daily_bin209.fits scfile=/scratch/kocevski/62756/ft2_4FGL_J1040.5+0617_daily_bin209.fits outfile=/scratch/kocevski/62756/cmap_HighResolution_293500801_293760001_4FGL_J1040.5+0617_daily_bin209.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.56
user 0.42
sys 0.14

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10604E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    48.430       1.0000         .10000E-03   10000.    
     3 'norm      '    27.255       1.0000         .10000E-03   10000.    
     4 'Prefactor '    10.345       1.0000         .10000E-03   10000.    
     5 'Prefactor '    23.545       1.0000         .10000E-03   10000.    
     6 'Prefactor '    13.281       1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    .70970       1.0000         .10000E-03   10000.    
     9 'Prefactor '    2.3622       1.0000         .10000E-03   10000.    
    10 'Prefactor '    4.1397       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .72442       1.0000         .10000E-03   10000.    
    12 'Prefactor '    .35423       1.0000         .10000E-03   10000.    
    13 'norm      '    .15817       1.0000         .10000E-03   10000.    
    14 'Prefactor '    2.4277       1.0000         .10000E-03   10000.    
    15 'norm      '    .81724E-01   1.0000         .10000E-03   10000.    
    16 'Prefactor '    .10022E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    18 'Normalizat'    .84550       1.0000         .10000E-01   10.000    
    19 'Prefactor '    1.1909       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.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   7166.142     FROM MIGRAD    STATUS=CONVERGED    404 CALLS     1972 TOTAL
                     EDM=   .19E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  5.0%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    22.019        .16211E-05** at limit **
   2  Prefactor     48.433        29.234        .13286E-07    .32564E-05
   3  norm          27.262        17.439       -.44420E-06   -.54353E-04
   4  Prefactor     10.311        23.964        .38765E-05    .10275E-03
   5  Prefactor     23.515        40.290       -.24011E-06    .50679E-05
   6  Prefactor     13.406        172.17       -.12136E-04   -.45659E-05
   7  Prefactor     .10000E-03    5.8655       -.40615E-06** at limit **
   8  norm          .70973        .60125        .38472E-08    .46715E-04
   9  Prefactor     2.3628        5.2553       -.56179E-06    .65932E-04
  10  Prefactor     4.1385        2.7787        .92358E-07   -.51050E-04
  11  Prefactor     .72487        6.7541       -.22754E-06   -.67383E-06
  12  Prefactor     .37461        4.5168        .91122E-06   -.32490E-03
  13  norm          .15877        .61886       -.58008E-06    .52792E-03
  14  Prefactor     2.4210        9.0493        .10765E-05    .88641E-04
  15  norm          .81688E-01    .51850       -.83717E-08   -.80924E-05
  16  Prefactor     .10000E-03    29.894       -.49951E-06** at limit **
  17  norm          .10000E-03    5.7065       -.92304E-07** at limit **
  18  Normalizat    .84560        .18079       -.54241E-06    .11564E-03
  19  Prefactor     1.1907        .15076        .75653E-06    .11043E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 48.4328
  norm       = 27.2624
  Prefactor  = 10.3111
  Prefactor  = 23.5153
  Prefactor  = 13.4065
  Prefactor  = 0.0001
  norm       = 0.709733
  Prefactor  = 2.36284
  Prefactor  = 4.1385
  Prefactor  = 0.724874
  Prefactor  = 0.374613
  norm       = 0.158766
  Prefactor  = 2.421
  norm       = 0.0816882
  Prefactor  = 0.0001
  norm       = 0.0001
  Normalizat = 0.845604
  Prefactor  = 1.19075
 **********
 **   18 **HESSE 
 **********

 FCN=   7166.142     FROM HESSE     STATUS=OK           280 CALLS     2252 TOTAL
                     EDM=   .22E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    22.267        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     48.433        29.230        .57621E-04   -1.4315    
   3  norm          27.262        17.493        .76736E-04   -1.4663    
   4  Prefactor     10.311        24.735        .12457E-03   -1.5066    
   5  Prefactor     23.515        40.519        .82551E-04   -1.4738    
   6  Prefactor     13.406        182.03        .10991E-03   -1.4976    
   7  Prefactor     .10000E-03    5.8873        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          .70973        .58588        .58710E-04   -1.5539    
   9  Prefactor     2.3628        5.2673        .13332E-02   -1.5401    
  10  Prefactor     4.1385        2.7657        .10788E-03   -1.5301    
  11  Prefactor     .72487        6.9625        .41808E-03   -1.5538    
  12  Prefactor     .37461        26.307        .29644E-02   -1.5586    
  13  norm          .15877        .78852        .73519E-03   -1.5628    
  14  Prefactor     2.4210        9.7044        .13133E-02   -1.5397    
  15  norm          .81688E-01    2.4729        .11573E-02   -1.5651    
  16  Prefactor     .10000E-03    30.896        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          .10000E-03    5.7820        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Normalizat    .84560        .20615        .28183E-03   -.98399    
  19  Prefactor     1.1907        .17342        .21346E-03   -.86616    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.24827e-08
Minuit parameter uncertainties:
  1  7.36472e-05
  2  29.2385
  3  17.4967
  4  24.7595
  5  40.5666
  6  99.1692
  7  2.30763e-05
  8  0.585884
  9  5.26837
  10  2.76574
  11  4.49346
  12  6.28054
  13  0.707438
  14  9.69675
  15  0.89839
  16  7.83853e-05
  17  4.26892e-06
  18  0.206342
  19  0.173503
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  4.139e+00  2.766e+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.191e+00  1.735e-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.456e-01  2.063e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 5.64
Ra Dec: 160.150 6.285
Photon Index (Fixed Index): 2.37 +/- 0.00
Photon Flux (Fixed Index): 5.00e-08 +/- 3.34e-08
Energy Flux (Fixed Index): 1.71e-05 +/- 1.14e-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) = 7166.14091659
delta logL = 0.00102002552558

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 7166.14065671
delta logL = 0.0012799039896

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    4.1894       1.0000         .10000E-03   10000.    
     2 'Index     '    2.3354       1.0000          .0000       10.000    
     3 'Normalizat'    .84738       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.1900       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=   7166.141     FROM MIGRAD    STATUS=CONVERGED     57 CALLS      211 TOTAL
                     EDM=   .78E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     4.1903        68.972        .49225E-02    .15980E-03
   2  Index         2.3353        6.0035        .15628        .83869E-04
   3  Normalizat    .84779        .10793        .63642E-01    .19907E-04
   4  Prefactor     1.1896        .64742E-01    .34873E-01    .83050E-07
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 4.19034
  Index      = 2.33532
  Normalizat = 0.847788
  Prefactor  = 1.18961
 **********
 **   18 **HESSE 
 **********

 FCN=   7166.141     FROM HESSE     STATUS=OK            33 CALLS      244 TOTAL
                     EDM=   .46E-11    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     4.1903        2.9940        .10973E-03   -1.5299    
   2  Index         2.3353        .65754        .89791E-02   -.56207    
   3  Normalizat    .84779        .20015        .28151E-03   -.98320    
   4  Prefactor     1.1896        .17369        .21355E-03   -.86652    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 4.64024e-12
Minuit parameter uncertainties:
  1  2.99415
  2  0.660212
  3  0.200328
  4  0.173776
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/62756': 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) = 7166.14065435
delta logL = 0.00128226282868

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  4.190e+00  2.994e+00  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  2.335e+00  6.602e-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.190e+00  1.738e-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.478e-01  2.003e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 5.64
Ra Dec: 160.150 6.285
Photon Index (Free Index): 2.34 +/- 0.66
Photon Flux (Free Index): 4.83e-08 +/- 4.51e-08
Energy Flux (Free Index): 1.73e-05 +/- 1.27e-05

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 /scratch/kocevski/62756/cmap_HighResolution_293500801_293760001_4FGL_J1040.5+0617_daily_bin209.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='5.00e-08', energy_flux2='1.73e-05', photon_flux_error='3.34e-08', dlogl='1.28e-03', energy_flux='1.71e-05', photon_flux2='4.83e-08', job_status='DONE', time_completed='2021-09-02 08:23:51.500549', photon_index_error2='0.66', photon_index2='2.34', ts='5.64', fit_tolerance='1e-08', GAL='1.19', photon_index_error='0.00', energy_flux_error2='1.27e-05', EG='0.85', time_epoch_completed='1630596231.5', return_code='0', job_id='62756', GAL2='1.19', EG2='0.85', return_code2='0', energy_flux_error='1.14e-05', photon_flux_error2='4.51e-08', ts2='5.64', photon_index='2.37' WHERE bin_id='209' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:23:51 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0114>
Subject: Job 62756: <4FGL_J1040.5+0617_daily_bin209> in cluster <slac> Done

Job <4FGL_J1040.5+0617_daily_bin209> was submitted from host <rhel6-64k> by user <kocevski> in cluster <slac> at Thu Sep  2 08:11:10 2021
Job was executed on host(s) <bullet0114>, in queue <medium>, as user <kocevski> in cluster <slac> at Thu Sep  2 08:11:15 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:11:15 2021
Terminated at Thu Sep  2 08:23:52 2021
Results reported at Thu Sep  2 08:23:52 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin209 160.15 6.2848 293500801 293760001 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 :                                   574.00 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             274.83 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   756 sec.
    Turnaround time :                            762 sec.

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

