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


Performing analysis on: 4FGL_J1040.5+0617_daily_bin292
RA = 160.15, Dec = 6.2848
tmin = 315014401, tmax = 315273601
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='62864', job_status='RUN', time_executed='2021-09-02 08:16:10.323616', time_epoch_executed='1630595770.32' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='292'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/62864

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/62864/ft1_4FGL_J1040.5+0617_daily_bin292.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/62864/ft2_4FGL_J1040.5+0617_daily_bin292.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/62864/ft1_4FGL_J1040.5+0617_daily_bin292.fits outfile=/scratch/kocevski/62864/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin292.fits ra=160.15 dec=6.2848 rad=12.0 tmin=315014401.0 tmax=315273601.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.60
user 3.38
sys 0.20

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/62864/ft1_filtered_4FGL_J1040.5+0617_daily_bin292.fits" evtable="EVENTS" scfile=/scratch/kocevski/62864/ft2_4FGL_J1040.5+0617_daily_bin292.fits sctable="SC_DATA" outfile=/scratch/kocevski/62864/ltcube_315014401_315273601_4FGL_J1040.5+0617_daily_bin292.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/62864/ft2_4FGL_J1040.5+0617_daily_bin292.fits
.....................!
real 17.39
user 16.99
sys 0.34

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/62864/ft1_filtered_4FGL_J1040.5+0617_daily_bin292.fits evtable="EVENTS" scfile=/scratch/kocevski/62864/ft2_4FGL_J1040.5+0617_daily_bin292.fits sctable="SC_DATA" expcube=/scratch/kocevski/62864/ltcube_315014401_315273601_4FGL_J1040.5+0617_daily_bin292.fits outfile=/scratch/kocevski/62864/expmap_315014401_315273601_4FGL_J1040.5+0617_daily_bin292.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/62864/ltcube_315014401_315273601_4FGL_J1040.5+0617_daily_bin292.fits
.....................!
real 192.99
user 188.01
sys 4.26

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/62864/ft1_filtered_4FGL_J1040.5+0617_daily_bin292.fits scfile=/scratch/kocevski/62864/ft2_4FGL_J1040.5+0617_daily_bin292.fits outfile=/scratch/kocevski/62864/cmap_315014401_315273601_4FGL_J1040.5+0617_daily_bin292.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.56
user 0.39
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/62864/ft1_filtered_4FGL_J1040.5+0617_daily_bin292.fits scfile=/scratch/kocevski/62864/ft2_4FGL_J1040.5+0617_daily_bin292.fits outfile=/scratch/kocevski/62864/cmap_HighResolution_315014401_315273601_4FGL_J1040.5+0617_daily_bin292.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.39
sys 0.16

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10020E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    .38529E-01   1.0000         .10000E-03   10000.    
     3 'norm      '    .10012E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .17264E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    .14720E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    53.615       1.0000         .10000E-03   10000.    
     7 'Prefactor '    .14912E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    .10021E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    .11308E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    .25009       1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10023E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    .46233       1.0000         .10000E-03   10000.    
    14 'Prefactor '    23.288       1.0000         .10000E-03   10000.    
    15 'norm      '    .17930       1.0000         .10000E-03   10000.    
    16 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    18 'Normalizat'    1.7030       1.0000         .10000E-01   10.000    
    19 'Prefactor '    .63701       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=   5056.205     FROM MIGRAD    STATUS=CONVERGED    442 CALLS     2327 TOTAL
                     EDM=   .13E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  4.6%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    4.9401       -.34821E-06** at limit **
   2  Prefactor     .25797E-03    61.304       -.59558E-05** at limit **
   3  norm          .10000E-03    7.8085       -.88467E-06** at limit **
   4  Prefactor     .10000E-03    12.404       -.49086E-05** at limit **
   5  Prefactor     .10000E-03    47.825       -.27920E-05** at limit **
   6  Prefactor     53.655        61.452        .56997E-06   -.38580E-04
   7  Prefactor     .10000E-03    21.629       -.48755E-05** at limit **
   8  norm          .10000E-03    .87857       -.74205E-07** at limit **
   9  Prefactor     .10000E-03    21.537        .63363E-06** at limit **
  10  Prefactor     .10000E-03    .88149       -.23456E-07** at limit **
  11  Prefactor     .24352        5.5121       -.53902E-06    .13935E-03
  12  Prefactor     .10000E-03    13.374        .21775E-06** at limit **
  13  norm          .46527        1.2288        .94892E-06    .10206E-02
  14  Prefactor     23.234        24.036       -.22343E-05   -.19444E-03
  15  norm          .17955        .65934        .35710E-06   -.13947E-03
  16  Prefactor     .10000E-03    6.3421        .51536E-07** at limit **
  17  norm          .10000E-03    3.4355        .24839E-07** at limit **
  18  Normalizat    1.7029        .23124        .91339E-06   -.51302E-05
  19  Prefactor     .63692        .18578       -.18495E-05    .86813E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 0.000257972
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 53.6548
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.243519
  Prefactor  = 0.0001
  norm       = 0.465267
  Prefactor  = 23.2345
  norm       = 0.17955
  Prefactor  = 0.0001
  norm       = 0.0001
  Normalizat = 1.70294
  Prefactor  = 0.636924
 **********
 **   18 **HESSE 
 **********

 FCN=   5056.205     FROM HESSE     STATUS=OK           274 CALLS     2601 TOTAL
                     EDM=   .14E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    4.9470        .15429E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .25797E-03    51.770        .14733       -1.5705    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          .10000E-03    7.8004        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10000E-03    11.861        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .10000E-03    47.780        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     53.655        61.399        .54778E-04   -1.4242    
   7  Prefactor     .10000E-03    21.115        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          .10000E-03    .90151        .12994E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     .10000E-03    22.392        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .10000E-03    .88323        .65188E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     .24352        22.807        .31698E-02   -1.5609    
  12  Prefactor     .10000E-03    13.582        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          .46527        1.1106        .72752E-04   -1.5572    
  14  Prefactor     23.234        22.077        .83005E-04   -1.4744    
  15  norm          .17955        .72195        .10577E-02   -1.5623    
  16  Prefactor     .10000E-03    6.3461        .17490E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          .10000E-03    3.4371        .12872E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Normalizat    1.7029        .27299        .23039E-03   -.72225    
  19  Prefactor     .63692        .21798        .29174E-03   -1.0605    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.40345e-08
Minuit parameter uncertainties:
  1  3.12007e-06
  2  0.181023
  3  1.27636e-05
  4  9.50926e-05
  5  0.000103706
  6  61.472
  7  0.000121909
  8  2.94519e-06
  9  8.31595e-05
  10  1.99848e-07
  11  4.71427
  12  2.374e-05
  13  1.11068
  14  22.0845
  15  0.719888
  16  1.91528e-06
  17  2.80198e-07
  18  0.27323
  19  0.218267
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  1.000e-04  1.998e-07  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:  6.369e-01  2.183e-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.703e+00  2.732e-01  1.000e-02  1.000e+01 ( 1.000e+00)


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

Saving results to:
/scratch/kocevski/62864/likelihoodResults_315014401_315273601_4FGL_J1040.5+0617_daily_bin292.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): 102
logL (Free Index) = 5056.20456237
delta logL = -2.27011960305e-05

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 5056.2045395
delta logL = 1.64597622643e-07

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10148E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.3336       1.0000          .0000       10.000    
     3 'Normalizat'    1.7029       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .63702       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=   5056.205     FROM MIGRAD    STATUS=CONVERGED     66 CALLS      223 TOTAL
                     EDM=   .73E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    5.9428        .90712E-02** at limit **
   2  Index         1.8884        6.7101        .50000        .86254E-06
   3  Normalizat    1.7029        .13198E-01    .52115E-01    .17747E-03
   4  Prefactor     .63692        .10889E-01    .65933E-01    .19289E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000100001
  Index      = 1.88835
  Normalizat = 1.70294
  Prefactor  = 0.636923
 **********
 **   18 **HESSE 
 **********

 FCN=   5056.205     FROM HESSE     STATUS=NOT POSDEF    31 CALLS      254 TOTAL
                     EDM=   .86E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    69.655        .71686E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         1.8884        8.2023        .50000       -.67172    
   3  Normalizat    1.7029        .48620E-01    .23039E-03   -.72225    
   4  Prefactor     .63692        .40051E-01    .29175E-03   -1.0605    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 8.58218e-08
Minuit parameter uncertainties:
  1  0.000411153
  2  455.118
  3  0.048621
  4  0.0400531
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/62864': 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): 102
logL (Free Index) = 5056.20452993
delta logL = 9.73515398073e-06

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  1.000e-04  4.112e-04  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  1.888e+00  4.551e+02  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:  6.369e-01  4.005e-02  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.703e+00  4.862e-02  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): -0.00
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/62864/cmap_HighResolution_315014401_315273601_4FGL_J1040.5+0617_daily_bin292.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='4.55e-03', job_status='DONE', photon_flux_upper_limit='5.91e-08', time_completed='2021-09-02 08:25:41.570159', job_id='62864', GAL2='0.64', fit_tolerance='1e-08', EG2='1.70', EG='1.70', time_epoch_completed='1630596341.57', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.64', dlogl='9.74e-06', ts2='-0.00', photon_index_error='0.00', photon_index='2.37' WHERE bin_id='292' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:25:41 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0170>
Subject: Job 62864: <4FGL_J1040.5+0617_daily_bin292> in cluster <slac> Done

Job <4FGL_J1040.5+0617_daily_bin292> 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) <bullet0170>, 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:42 2021
Results reported at Thu Sep  2 08:25:42 2021

Your job looked like:

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

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

