/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 235 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 = 7379
number of fields = 31
RA_SUN column already exists. File will not be modified.
Done.


Performing analysis on: 4FGL_J1040.5+0617_daily_bin1594
RA = 160.15, Dec = 6.2848
tmin = 652492801, tmax = 652752001
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='715087', job_status='RUN', time_executed='2021-09-08 00:22:03.484768', time_epoch_executed='1631085723.48' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='1594'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/715087

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/715087/ft1_4FGL_J1040.5+0617_daily_bin1594.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/715087/ft2_4FGL_J1040.5+0617_daily_bin1594.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/715087/ft1_4FGL_J1040.5+0617_daily_bin1594.fits outfile=/scratch/kocevski/715087/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin1594.fits ra=160.15 dec=6.2848 rad=12.0 tmin=652492801.0 tmax=652752001.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 4.51
user 4.25
sys 0.21

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/715087/ft1_filtered_4FGL_J1040.5+0617_daily_bin1594.fits" evtable="EVENTS" scfile=/scratch/kocevski/715087/ft2_4FGL_J1040.5+0617_daily_bin1594.fits sctable="SC_DATA" outfile=/scratch/kocevski/715087/ltcube_652492801_652752001_4FGL_J1040.5+0617_daily_bin1594.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/715087/ft2_4FGL_J1040.5+0617_daily_bin1594.fits
.....................!
real 17.01
user 16.25
sys 0.37

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/715087/ft1_filtered_4FGL_J1040.5+0617_daily_bin1594.fits evtable="EVENTS" scfile=/scratch/kocevski/715087/ft2_4FGL_J1040.5+0617_daily_bin1594.fits sctable="SC_DATA" expcube=/scratch/kocevski/715087/ltcube_652492801_652752001_4FGL_J1040.5+0617_daily_bin1594.fits outfile=/scratch/kocevski/715087/expmap_652492801_652752001_4FGL_J1040.5+0617_daily_bin1594.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/715087/ltcube_652492801_652752001_4FGL_J1040.5+0617_daily_bin1594.fits
.....................!
real 192.58
user 187.38
sys 4.60

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/715087/ft1_filtered_4FGL_J1040.5+0617_daily_bin1594.fits scfile=/scratch/kocevski/715087/ft2_4FGL_J1040.5+0617_daily_bin1594.fits outfile=/scratch/kocevski/715087/cmap_652492801_652752001_4FGL_J1040.5+0617_daily_bin1594.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.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/715087/ft1_filtered_4FGL_J1040.5+0617_daily_bin1594.fits scfile=/scratch/kocevski/715087/ft2_4FGL_J1040.5+0617_daily_bin1594.fits outfile=/scratch/kocevski/715087/cmap_HighResolution_652492801_652752001_4FGL_J1040.5+0617_daily_bin1594.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.57
user 0.41
sys 0.15

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    16.009       1.0000         .10000E-03   10000.    
     2 'Prefactor '    46.172       1.0000         .10000E-03   10000.    
     3 'norm      '    11.802       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    2.8711       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10006E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    27.638       1.0000         .10000E-03   10000.    
    13 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10060E-03   1.0000         .10000E-03   10000.    
    15 'norm      '    7.5222       1.0000         .10000E-03   10000.    
    16 'Prefactor '    130.35       1.0000         .10000E-03   10000.    
    17 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    18 'Normalizat'    1.9104       1.0000         .10000E-01   10.000    
    19 'Prefactor '    1.0473       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=   5336.411     FROM MIGRAD    STATUS=CONVERGED    380 CALLS     1916 TOTAL
                     EDM=   .12E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .5%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     16.008        12.640       -.74441E-08    .11757E-04
   2  Prefactor     46.176        55.227        .49791E-05    .41626E-05
   3  norm          11.801        13.165        .24928E-06    .17354E-03
   4  Prefactor     .10000E-03    4.5962        .13436E-05** at limit **
   5  Prefactor     .10000E-03    31.072       -.65809E-05** at limit **
   6  Prefactor     .10000E-03    19.378        .88454E-05** at limit **
   7  Prefactor     .10000E-03    8.5686       -.10203E-04** at limit **
   8  norm          2.8712        2.1025       -.62962E-06   -.36918E-02
   9  Prefactor     .10000E-03    3.8437       -.47209E-06** at limit **
  10  Prefactor     .10000E-03    1.6759        .36385E-07** at limit **
  11  Prefactor     .10000E-03    5.6345       -.39393E-05** at limit **
  12  Prefactor     27.636        15.169       -.10748E-06    .37035E-04
  13  norm          .10000E-03    .26108       -.91357E-08** at limit **
  14  Prefactor     .10000E-03    17.711       -.27848E-05** at limit **
  15  norm          7.5222        3.2387        .65349E-07   -.19293E-03
  16  Prefactor     130.35        56.717       -.28515E-06    .34382E-05
  17  norm          .10000E-03    7.5330        .11731E-04** at limit **
  18  Normalizat    1.9104        .29114        .53690E-07    .59029E-04
  19  Prefactor     1.0473        .23454        .92780E-07    .43490E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 16.0083
  Prefactor  = 46.1762
  norm       = 11.801
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 2.87116
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 27.6358
  norm       = 0.0001
  Prefactor  = 0.0001
  norm       = 7.52217
  Prefactor  = 130.348
  norm       = 0.0001
  Normalizat = 1.91042
  Prefactor  = 1.04726
 **********
 **   18 **HESSE 
 **********

 FCN=   5336.411     FROM HESSE     STATUS=OK           260 CALLS     2176 TOTAL
                     EDM=   .23E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     16.008        12.641        .10010E-03   -1.4908    
   2  Prefactor     46.176        55.283        .59006E-04   -1.4348    
   3  norm          11.801        13.172        .58305E-03   -1.5021    
   4  Prefactor     .10000E-03    4.6014        .15293E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .10000E-03    31.048        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    19.310        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    8.4726        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          2.8712        2.1704        .44602E-03   -1.5369    
   9  Prefactor     .10000E-03    3.8552        .13983E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .10000E-03    1.6810        .92328E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     .10000E-03    5.6415        .16909E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     27.636        15.183        .76205E-04   -1.4656    
  13  norm          .10000E-03    .27089        .72784E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     .10000E-03    18.196        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          7.5222        3.2590        .80916E-04   -1.5159    
  16  Prefactor     130.35        56.762        .35266E-04   -1.3420    
  17  norm          .10000E-03    7.4028        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Normalizat    1.9104        .35141        .30012E-03   -.66815    
  19  Prefactor     1.0473        .28096        .31726E-03   -.91170    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.34301e-09
Minuit parameter uncertainties:
  1  12.6436
  2  55.3442
  3  13.1755
  4  1.16173e-06
  5  2.75559e-06
  6  2.78932e-06
  7  2.71005e-06
  8  2.1705
  9  2.43088e-06
  10  7.95626e-07
  11  2.51265e-06
  12  15.1848
  13  5.04595e-07
  14  4.22167e-05
  15  3.2591
  16  56.7856
  17  4.20851e-06
  18  0.351884
  19  0.281356
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  1.000e-04  7.956e-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:  1.047e+00  2.814e-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.910e+00  3.519e-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: 1.01e-07 ph cm-2 s-1
Energy Flux Upper Limit: 7.78e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/715087/likelihoodResults_652492801_652752001_4FGL_J1040.5+0617_daily_bin1594.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) = 5336.41366492
delta logL = -0.00262151762036

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 5336.41104342
delta logL = -1.77342371899e-08

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.3660       1.0000          .0000       10.000    
     3 'Normalizat'    1.9104       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.0473       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.

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

 FCN=   5336.411     FROM MIGRAD    STATUS=FAILED        86 CALLS      239 TOTAL
                     EDM=   .28E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10011E-03    246.19        .92346E-03** at limit **
   2  Index         2.3299        5.1517        .50000        .78012E-05
   3  Normalizat    1.9104        .11440        .30012E-03    .18485E-05
   4  Prefactor     1.0473        .94148E-01    .31726E-03    .61635E-05
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   5336.411     FROM SIMPLEX   STATUS=UNCHANGED    152 CALLS      391 TOTAL
                     EDM=   .74E-05    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10011E-03    246.19        .19091E-03** at limit **
   2  Index         2.3299        5.1517        .63023E-04    .78012E-05
   3  Normalizat    1.9104        .11440        .25135E-05    .18485E-05
   4  Prefactor     1.0473        .94148E-01    .12322E-05    .61635E-05
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   5336.411     FROM MIGRAD    STATUS=CONVERGED     39 CALLS      430 TOTAL
                     EDM=   .13E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    1.9008        .18469E-03** at limit **
   2  Index         2.2352        5.7412        .50000       -.10439E-06
   3  Normalizat    1.9104        .33766        .60025E-04    .30115E-04
   4  Prefactor     1.0473        .27847        .12690E-04    .26159E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Index      = 2.23515
  Normalizat = 1.91042
  Prefactor  = 1.04726
 **********
 **   18 **HESSE 
 **********

 FCN=   5336.411     FROM HESSE     STATUS=OK            29 CALLS      459 TOTAL
                     EDM=   .12E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    1.6985        .36938E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         2.2352        8.0458        .50000       -.58592    
   3  Normalizat    1.9104        .33767        .12005E-04   -.66815    
   4  Prefactor     1.0473        .27847        .25381E-05   -.91170    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.1549e-11
Minuit parameter uncertainties:
  1  4.81595e-08
  2  125.405
  3  0.338086
  4  0.278853
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/715087': 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) = 5336.41104323
delta logL = 1.74845808942e-07

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  1.000e-04  4.816e-08  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  2.235e+00  1.254e+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:  1.047e+00  2.789e-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.910e+00  3.381e-01  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/715087/cmap_HighResolution_652492801_652752001_4FGL_J1040.5+0617_daily_bin1594.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='7.78e-03', job_status='DONE', photon_flux_upper_limit='1.01e-07', time_completed='2021-09-08 00:31:27.663457', job_id='715087', GAL2='1.05', fit_tolerance='1e-08', EG2='1.91', EG='1.91', time_epoch_completed='1631086287.66', return_code2='0', ts='-0.00', comment='SUCCESS', return_code='0', GAL='1.05', dlogl='1.75e-07', ts2='-0.00', photon_index_error='0.00', photon_index='2.37' WHERE bin_id='1594' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Wed Sep  8 00:31:27 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0282>
Subject: Job 715087: <4FGL_J1040.5+0617_daily_bin1594> in cluster <slac> Done

Job <4FGL_J1040.5+0617_daily_bin1594> was submitted from host <rhel6-64p> by user <kocevski> in cluster <slac> at Wed Sep  8 00:15:32 2021
Job was executed on host(s) <bullet0282>, in queue <medium>, as user <kocevski> in cluster <slac> at Wed Sep  8 00:17:58 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Wed Sep  8 00:17:58 2021
Terminated at Wed Sep  8 00:31:28 2021
Results reported at Wed Sep  8 00:31:28 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin1594 160.15 6.2848 652492801 652752001 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 :                                   566.32 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             278.82 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   809 sec.
    Turnaround time :                            956 sec.

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

