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


Performing analysis on: 4FGL_J1040.5+0617_daily_bin858
RA = 160.15, Dec = 6.2848
tmin = 461721601, tmax = 461980801
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='66842', job_status='RUN', time_executed='2021-09-02 08:29:44.326739', time_epoch_executed='1630596584.33' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='858'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/66842

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/66842/ft1_4FGL_J1040.5+0617_daily_bin858.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/66842/ft2_4FGL_J1040.5+0617_daily_bin858.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/66842/ft1_4FGL_J1040.5+0617_daily_bin858.fits outfile=/scratch/kocevski/66842/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin858.fits ra=160.15 dec=6.2848 rad=12.0 tmin=461721601.0 tmax=461980801.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.14
user 3.84
sys 0.24

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

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

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

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/66842/ft1_filtered_4FGL_J1040.5+0617_daily_bin858.fits evtable="EVENTS" scfile=/scratch/kocevski/66842/ft2_4FGL_J1040.5+0617_daily_bin858.fits sctable="SC_DATA" expcube=/scratch/kocevski/66842/ltcube_461721601_461980801_4FGL_J1040.5+0617_daily_bin858.fits outfile=/scratch/kocevski/66842/expmap_461721601_461980801_4FGL_J1040.5+0617_daily_bin858.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/66842/ltcube_461721601_461980801_4FGL_J1040.5+0617_daily_bin858.fits
.....................!
real 190.82
user 185.98
sys 4.32

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/66842/ft1_filtered_4FGL_J1040.5+0617_daily_bin858.fits scfile=/scratch/kocevski/66842/ft2_4FGL_J1040.5+0617_daily_bin858.fits outfile=/scratch/kocevski/66842/cmap_461721601_461980801_4FGL_J1040.5+0617_daily_bin858.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 3.81
user 0.40
sys 0.18

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/66842/ft1_filtered_4FGL_J1040.5+0617_daily_bin858.fits scfile=/scratch/kocevski/66842/ft2_4FGL_J1040.5+0617_daily_bin858.fits outfile=/scratch/kocevski/66842/cmap_HighResolution_461721601_461980801_4FGL_J1040.5+0617_daily_bin858.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.81
user 0.40
sys 0.14

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    8.1277       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     3 'norm      '    .10004E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    7.0343       1.0000         .10000E-03   10000.    
     5 'Prefactor '    12.806       1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10216E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    6.2347       1.0000         .10000E-03   10000.    
     8 'norm      '    5.2894       1.0000         .10000E-03   10000.    
     9 'Prefactor '    10.128       1.0000         .10000E-03   10000.    
    10 'Prefactor '    .92633       1.0000         .10000E-03   10000.    
    11 'Prefactor '    4.7725       1.0000         .10000E-03   10000.    
    12 'Prefactor '    2.3142       1.0000         .10000E-03   10000.    
    13 'norm      '    1.4020       1.0000         .10000E-03   10000.    
    14 'Prefactor '    6.6671       1.0000         .10000E-03   10000.    
    15 'norm      '    .10058E-03   1.0000         .10000E-03   10000.    
    16 'Prefactor '    20.170       1.0000         .10000E-03   10000.    
    17 'norm      '    .10005E-03   1.0000         .10000E-03   10000.    
    18 'Normalizat'    1.2204       1.0000         .10000E-01   10.000    
    19 'Prefactor '    1.0519       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=   5564.822     FROM MIGRAD    STATUS=CONVERGED    385 CALLS     1943 TOTAL
                     EDM=   .57E-10  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  5.1%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     8.1280        14.183        .26072E-05    .50590E-04
   2  Prefactor     .10000E-03    17.451       -.37209E-07** at limit **
   3  norm          .10000E-03    10.472        .64958E-06** at limit **
   4  Prefactor     7.0336        9.1604        .71090E-06    .50711E-04
   5  Prefactor     12.877        117.05       -.21573E-04   -.11381E-05
   6  Prefactor     .10000E-03    95.015        .10813E-05** at limit **
   7  Prefactor     6.2332        14.845        .17412E-05    .29151E-04
   8  norm          5.2897        2.1011        .26007E-07    .55154E-04
   9  Prefactor     10.127        9.9713       -.33485E-07    .14519E-04
  10  Prefactor     .92650        2.6609        .27763E-06    .18017E-03
  11  Prefactor     4.7740        6.8807        .49120E-06    .55574E-04
  12  Prefactor     2.3150        7.8399        .77265E-05   -.73353E-04
  13  norm          1.4020        .86609        .95568E-07   -.19572E-04
  14  Prefactor     6.6687        13.776       -.13047E-05   -.59148E-05
  15  norm          .10000E-03    .55299       -.29001E-06** at limit **
  16  Prefactor     20.172        15.532        .65899E-07    .19387E-04
  17  norm          .10000E-03    7.4697       -.18155E-06** at limit **
  18  Normalizat    1.2200        .23032       -.31090E-05    .33860E-04
  19  Prefactor     1.0522        .18778        .25695E-05    .10891E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 8.12796
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 7.03363
  Prefactor  = 12.8766
  Prefactor  = 0.0001
  Prefactor  = 6.23316
  norm       = 5.28968
  Prefactor  = 10.1274
  Prefactor  = 0.926496
  Prefactor  = 4.774
  Prefactor  = 2.31503
  norm       = 1.40203
  Prefactor  = 6.66867
  norm       = 0.0001
  Prefactor  = 20.172
  norm       = 0.0001
  Normalizat = 1.21996
  Prefactor  = 1.05221
 **********
 **   18 **HESSE 
 **********

 FCN=   5564.822     FROM HESSE     STATUS=OK           276 CALLS     2219 TOTAL
                     EDM=   .11E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     8.1280        14.181        .14063E-03   -1.5138    
   2  Prefactor     .10000E-03    17.458        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          .10000E-03    10.494        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     7.0336        9.1400        .15126E-03   -1.5177    
   5  Prefactor     12.877        118.66        .11193E-03   -1.4990    
   6  Prefactor     .10000E-03    95.049        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     6.2332        14.825        .80384E-03   -1.5209    
   8  norm          5.2897        2.0991        .64477E-04   -1.5248    
   9  Prefactor     10.127        9.9580        .12591E-03   -1.5071    
  10  Prefactor     .92650        2.6206        .19507E-03   -1.5515    
  11  Prefactor     4.7740        6.9028        .18417E-03   -1.5271    
  12  Prefactor     2.3150        7.9132        .13484E-02   -1.5404    
  13  norm          1.4020        .86606        .21688E-03   -1.5471    
  14  Prefactor     6.6687        13.898        .15541E-03   -1.5191    
  15  norm          .10000E-03    .85024        .10706E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     20.172        15.539        .89182E-04   -1.4809    
  17  norm          .10000E-03    7.4940        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Normalizat    1.2200        .27273        .26989E-03   -.85988    
  19  Prefactor     1.0522        .22468        .25279E-03   -.91009    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.11348e-10
Minuit parameter uncertainties:
  1  14.1868
  2  3.96126e-06
  3  8.76614e-05
  4  9.14179
  5  78.3841
  6  0.000385861
  7  14.834
  8  2.09913
  9  9.9596
  10  2.62092
  11  6.90391
  12  7.91677
  13  0.866067
  14  13.9048
  15  7.23122e-07
  16  15.5424
  17  1.28194e-05
  18  0.273054
  19  0.224881
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  9.265e-01  2.621e+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.052e+00  2.249e-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.220e+00  2.731e-01  1.000e-02  1.000e+01 ( 1.000e+00)


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

Saving results to:
/scratch/kocevski/66842/likelihoodResults_461721601_461980801_4FGL_J1040.5+0617_daily_bin858.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): 0
logL (Free Index) = 5564.76208842
delta logL = 0.0597414231734

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 5564.75732032
delta logL = 0.0645095227073

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .73177       1.0000         .10000E-03   10000.    
     2 'Index     '    2.9088       1.0000          .0000       10.000    
     3 'Normalizat'    1.2090       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.0574       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=   5564.757     FROM MIGRAD    STATUS=CONVERGED     53 CALLS      210 TOTAL
                     EDM=   .55E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .73037        39.130        .12183E-01    .11219E-02
   2  Index         2.9099        6.4547        .22325        .57724E-04
   3  Normalizat    1.2091        .40917E-01    .61252E-01    .62207E-05
   4  Prefactor     1.0574        .36033E-01    .57039E-01    .67847E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.730369
  Index      = 2.90987
  Normalizat = 1.20914
  Prefactor  = 1.05744
 **********
 **   18 **HESSE 
 **********

 FCN=   5564.757     FROM HESSE     STATUS=OK            33 CALLS      243 TOTAL
                     EDM=   .15E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .73037        2.4880        .12790E-03   -1.5537    
   2  Index         2.9099        1.8609        .11787E-01   -.43127    
   3  Normalizat    1.2091        .25568        .27092E-03   -.86321    
   4  Prefactor     1.0574        .22304        .25222E-03   -.90839    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.48355e-11
Minuit parameter uncertainties:
  1  2.48831
  2  1.91729
  3  0.255942
  4  0.223238
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/66842': 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) = 5564.75731946
delta logL = 0.0645103779834

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  7.304e-01  2.488e+00  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  2.910e+00  1.917e+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.057e+00  2.232e-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.209e+00  2.559e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 0.15
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/66842/cmap_HighResolution_461721601_461980801_4FGL_J1040.5+0617_daily_bin858.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='7.37e-03', job_status='DONE', photon_flux_upper_limit='9.56e-08', time_completed='2021-09-02 08:39:21.471309', job_id='66842', GAL2='1.06', fit_tolerance='1e-08', EG2='1.21', EG='1.22', time_epoch_completed='1630597161.47', return_code2='0', ts='0.15', comment='SUCCESS', return_code='0', GAL='1.05', dlogl='6.45e-02', ts2='0.28', photon_index_error='0.00', photon_index='2.37' WHERE bin_id='858' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:39:21 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0252>
Subject: Job 66842: <4FGL_J1040.5+0617_daily_bin858> in cluster <slac> Done

Job <4FGL_J1040.5+0617_daily_bin858> was submitted from host <rhel6-64l> by user <kocevski> in cluster <slac> at Thu Sep  2 08:26:30 2021
Job was executed on host(s) <bullet0252>, in queue <medium>, as user <kocevski> in cluster <slac> at Thu Sep  2 08:26:35 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:26:35 2021
Terminated at Thu Sep  2 08:39:21 2021
Results reported at Thu Sep  2 08:39:21 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin858 160.15 6.2848 461721601 461980801 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 :                                   568.17 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             292.35 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   766 sec.
    Turnaround time :                            771 sec.

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

