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


Performing analysis on: 4FGL_J1040.5+0617_daily_bin424
RA = 160.15, Dec = 6.2848
tmin = 349228801, tmax = 349488001
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='64304', job_status='RUN', time_executed='2021-09-02 08:18:55.467457', time_epoch_executed='1630595935.47' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='424'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/64304

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/64304/ft1_4FGL_J1040.5+0617_daily_bin424.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/64304/ft2_4FGL_J1040.5+0617_daily_bin424.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/64304/ft1_4FGL_J1040.5+0617_daily_bin424.fits outfile=/scratch/kocevski/64304/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin424.fits ra=160.15 dec=6.2848 rad=12.0 tmin=349228801.0 tmax=349488001.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.53
user 3.29
sys 0.21

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/64304/ft1_filtered_4FGL_J1040.5+0617_daily_bin424.fits" evtable="EVENTS" scfile=/scratch/kocevski/64304/ft2_4FGL_J1040.5+0617_daily_bin424.fits sctable="SC_DATA" outfile=/scratch/kocevski/64304/ltcube_349228801_349488001_4FGL_J1040.5+0617_daily_bin424.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/64304/ft2_4FGL_J1040.5+0617_daily_bin424.fits
.....................!
real 15.62
user 15.25
sys 0.32

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/64304/ft1_filtered_4FGL_J1040.5+0617_daily_bin424.fits evtable="EVENTS" scfile=/scratch/kocevski/64304/ft2_4FGL_J1040.5+0617_daily_bin424.fits sctable="SC_DATA" expcube=/scratch/kocevski/64304/ltcube_349228801_349488001_4FGL_J1040.5+0617_daily_bin424.fits outfile=/scratch/kocevski/64304/expmap_349228801_349488001_4FGL_J1040.5+0617_daily_bin424.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/64304/ltcube_349228801_349488001_4FGL_J1040.5+0617_daily_bin424.fits
.....................!
real 191.46
user 185.75
sys 5.11

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/64304/ft1_filtered_4FGL_J1040.5+0617_daily_bin424.fits scfile=/scratch/kocevski/64304/ft2_4FGL_J1040.5+0617_daily_bin424.fits outfile=/scratch/kocevski/64304/cmap_349228801_349488001_4FGL_J1040.5+0617_daily_bin424.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.16

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/64304/ft1_filtered_4FGL_J1040.5+0617_daily_bin424.fits scfile=/scratch/kocevski/64304/ft2_4FGL_J1040.5+0617_daily_bin424.fits outfile=/scratch/kocevski/64304/cmap_HighResolution_349228801_349488001_4FGL_J1040.5+0617_daily_bin424.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.41
sys 0.14

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    14.942       1.0000         .10000E-03   10000.    
     2 'Prefactor '    9.7423       1.0000         .10000E-03   10000.    
     3 'norm      '    9.9376       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10278E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    43.361       1.0000         .10000E-03   10000.    
     6 'Prefactor '    64.911       1.0000         .10000E-03   10000.    
     7 'Prefactor '    .20841E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    .84705       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    .22893E-01   1.0000         .10000E-03   10000.    
    11 'Prefactor '    13.407       1.0000         .10000E-03   10000.    
    12 'Prefactor '    12.205       1.0000         .10000E-03   10000.    
    13 'norm      '    .95240       1.0000         .10000E-03   10000.    
    14 'Prefactor '    11.188       1.0000         .10000E-03   10000.    
    15 'norm      '    .91057       1.0000         .10000E-03   10000.    
    16 'Prefactor '    2.0207       1.0000         .10000E-03   10000.    
    17 'norm      '    9.4237       1.0000         .10000E-03   10000.    
    18 'Normalizat'    .37114       1.0000         .10000E-01   10.000    
    19 'Prefactor '    1.4631       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.

 FCN=   6795.983     FROM MIGRAD    STATUS=CONVERGED    698 CALLS     2309 TOTAL
                     EDM=   .57E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     14.946        13.000        .10362E-03    .21944E-04
   2  Prefactor     9.7417        35.132        .12839E-03   -.34535E-05
   3  norm          9.9291        11.944        .12711E-03   -.32108E-04
   4  Prefactor     .10000E-03    6.3465        .18142E-02** at limit **
   5  Prefactor     43.352        59.218        .60881E-04    .15312E-04
   6  Prefactor     64.938        48.389        .24906E-03   -.97684E-05
   7  Prefactor     .10000E-03    60.075        .47150E-02** at limit **
   8  norm          .84683        1.0055        .96161E-03   -.27757E-03
   9  Prefactor     .10000E-03    7.9904        .36285E-03** at limit **
  10  Prefactor     .28952E-01    4.5996        .30841E-01    .52129E-03
  11  Prefactor     13.402        7.4239        .10940E-03    .77735E-04
  12  Prefactor     12.199        8.5405        .11467E-03   -.62165E-04
  13  norm          .95235        .62341        .44140E-04    .26528E-04
  14  Prefactor     11.188        9.3331        .11977E-03    .27526E-05
  15  norm          .91058        .96751        .87317E-03   -.19823E-03
  16  Prefactor     2.0216        33.643        .14556E-02   -.88490E-05
  17  norm          9.4236        10.622        .13055E-03   -.11147E-04
  18  Normalizat    .37115        .21720        .41200E-03   -.23814E-04
  19  Prefactor     1.4631        .18087        .19696E-03   -.21761E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 14.946
  Prefactor  = 9.74172
  norm       = 9.92907
  Prefactor  = 0.0001
  Prefactor  = 43.352
  Prefactor  = 64.9379
  Prefactor  = 0.0001
  norm       = 0.846825
  Prefactor  = 0.0001
  Prefactor  = 0.0289517
  Prefactor  = 13.4019
  Prefactor  = 12.1992
  norm       = 0.952346
  Prefactor  = 11.1881
  norm       = 0.91058
  Prefactor  = 2.02161
  norm       = 9.42356
  Normalizat = 0.371145
  Prefactor  = 1.46308
 **********
 **   18 **HESSE 
 **********

 FCN=   6795.983     FROM HESSE     STATUS=OK           264 CALLS     2573 TOTAL
                     EDM=   .22E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     14.946        12.998        .41446E-05   -1.4935    
   2  Prefactor     9.7417        35.114        .51354E-05   -1.5084    
   3  norm          9.9291        11.944        .50845E-05   -1.5078    
   4  Prefactor     .10000E-03    6.3485        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     43.352        59.212        .24352E-05   -1.4390    
   6  Prefactor     64.938        48.122        .99623E-05   -1.4095    
   7  Prefactor     .10000E-03    60.212        .94299E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          .84683        1.0048        .38464E-04   -1.5524    
   9  Prefactor     .10000E-03    7.9909        .72569E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .28952E-01    3.0721        .39207E-01   -1.5674    
  11  Prefactor     13.402        7.4217        .43758E-05   -1.4976    
  12  Prefactor     12.199        8.4944        .45866E-05   -1.5009    
  13  norm          .95235        .62338        .17656E-05   -1.5513    
  14  Prefactor     11.188        9.3323        .47910E-05   -1.5039    
  15  norm          .91058        .96680        .34927E-04   -1.5517    
  16  Prefactor     2.0216        33.563        .58225E-04   -1.5424    
  17  norm          9.4236        10.620        .52219E-05   -1.5094    
  18  Normalizat    .37115        .21660        .16480E-04   -1.1882    
  19  Prefactor     1.4631        .18084        .78784E-05   -.78579    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.18833e-10
Minuit parameter uncertainties:
  1  13.0008
  2  35.1881
  3  11.947
  4  3.71915e-06
  5  59.2921
  6  48.1507
  7  8.70281e-05
  8  1.00484
  9  1.56804e-05
  10  0.595469
  11  7.42222
  12  8.49527
  13  0.623382
  14  9.33355
  15  0.966816
  16  16.4849
  17  10.622
  18  0.217088
  19  0.180919
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  2.895e-02  5.955e-01  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.463e+00  1.809e-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:  3.711e-01  2.171e-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: 8.59e-08 ph cm-2 s-1
Energy Flux Upper Limit: 6.62e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/64304/likelihoodResults_349228801_349488001_4FGL_J1040.5+0617_daily_bin424.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) = 6794.74820512
delta logL = 1.23504876969

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 6794.73169377
delta logL = 1.25156012072

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .42929E-01   1.0000         .10000E-03   10000.    
     2 'Index     '    5.2272       1.0000          .0000       10.000    
     3 'Normalizat'    .26947       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.5202       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=   6794.732     FROM MIGRAD    STATUS=CONVERGED     55 CALLS      239 TOTAL
                     EDM=   .71E-09    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .43035E-01    .44195        .26819E-02    .49771E-02
   2  Index         5.2270        2.5075        .13216        .17599E-03
   3  Normalizat    .26924        .41278E-01    .10882        .94352E-04
   4  Prefactor     1.5203        .37426E-01    .43815E-01   -.98302E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.043035
  Index      = 5.22698
  Normalizat = 0.269244
  Prefactor  = 1.52032
 **********
 **   18 **HESSE 
 **********

 FCN=   6794.732     FROM HESSE     STATUS=NOT POSDEF    35 CALLS      274 TOTAL
                     EDM=   .20E-09    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .43035E-01    1.1094        .12224E-03   -1.5667    
   2  Index         5.2270        7.2178        .48343E-02    .45412E-01
   3  Normalizat    .26924        .15641        .48140E-03   -1.2472    
   4  Prefactor     1.5203        .13968        .19365E-03   -.76972    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 1.96043e-10
Minuit parameter uncertainties:
  1  0.436507
  2  5.22405
  3  0.156665
  4  0.139717
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/64304': 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) = 6794.7316902
delta logL = 1.25156369298

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  4.303e-02  4.365e-01  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  5.227e+00  5.224e+00  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.520e+00  1.397e-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:  2.692e-01  1.567e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 2.76
Ra Dec: 160.150 6.285
Photon Index (Free Index): 5.23 +/- 5.22
Photon Flux (Free Index): 8.07e-08 +/- 5.67e-08
Energy Flux (Free Index): 1.05e-05 +/- 8.88e-06

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/64304/cmap_HighResolution_349228801_349488001_4FGL_J1040.5+0617_daily_bin424.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='6.62e-03', comment='SUCCESS', energy_flux2='1.05e-05', dlogl='1.25e+00', photon_flux2='8.07e-08', job_status='DONE', time_completed='2021-09-02 08:29:29.182378', photon_index_error2='5.22', photon_index2='5.23', ts='0.00', fit_tolerance='1e-08', GAL='1.46', photon_index_error='0.00', photon_flux_upper_limit='8.59e-08', energy_flux_error2='8.88e-06', EG='0.37', time_epoch_completed='1630596569.18', return_code='0', job_id='64304', GAL2='1.52', EG2='0.27', return_code2='102', photon_flux_error2='5.67e-08', ts2='2.76', photon_index='2.37' WHERE bin_id='424' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:29:29 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0107>
Subject: Job 64304: <4FGL_J1040.5+0617_daily_bin424> in cluster <slac> Done

Job <4FGL_J1040.5+0617_daily_bin424> was submitted from host <rhel6-64p> by user <kocevski> in cluster <slac> at Thu Sep  2 08:16:21 2021
Job was executed on host(s) <bullet0107>, in queue <medium>, as user <kocevski> in cluster <slac> at Thu Sep  2 08:17:34 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:17:34 2021
Terminated at Thu Sep  2 08:29:29 2021
Results reported at Thu Sep  2 08:29:29 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin424 160.15 6.2848 349228801 349488001 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 :                                   630.00 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             299.62 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   715 sec.
    Turnaround time :                            788 sec.

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

