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


Performing analysis on: 4FGL_J1040.5+0617_daily_bin940
RA = 160.15, Dec = 6.2848
tmin = 482976001, tmax = 483235201
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='66955', job_status='RUN', time_executed='2021-09-02 08:29:40.970090', time_epoch_executed='1630596580.97' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='940'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/66955

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/66955/ft1_4FGL_J1040.5+0617_daily_bin940.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/66955/ft2_4FGL_J1040.5+0617_daily_bin940.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/66955/ft1_4FGL_J1040.5+0617_daily_bin940.fits outfile=/scratch/kocevski/66955/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin940.fits ra=160.15 dec=6.2848 rad=12.0 tmin=482976001.0 tmax=483235201.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.20
user 3.91
sys 0.25

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/66955/ft1_filtered_4FGL_J1040.5+0617_daily_bin940.fits" evtable="EVENTS" scfile=/scratch/kocevski/66955/ft2_4FGL_J1040.5+0617_daily_bin940.fits sctable="SC_DATA" outfile=/scratch/kocevski/66955/ltcube_482976001_483235201_4FGL_J1040.5+0617_daily_bin940.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/66955/ft2_4FGL_J1040.5+0617_daily_bin940.fits
.....................!
real 15.21
user 14.81
sys 0.35

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/66955/ft1_filtered_4FGL_J1040.5+0617_daily_bin940.fits evtable="EVENTS" scfile=/scratch/kocevski/66955/ft2_4FGL_J1040.5+0617_daily_bin940.fits sctable="SC_DATA" expcube=/scratch/kocevski/66955/ltcube_482976001_483235201_4FGL_J1040.5+0617_daily_bin940.fits outfile=/scratch/kocevski/66955/expmap_482976001_483235201_4FGL_J1040.5+0617_daily_bin940.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/66955/ltcube_482976001_483235201_4FGL_J1040.5+0617_daily_bin940.fits
.....................!
real 192.65
user 186.56
sys 5.65

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/66955/ft1_filtered_4FGL_J1040.5+0617_daily_bin940.fits scfile=/scratch/kocevski/66955/ft2_4FGL_J1040.5+0617_daily_bin940.fits outfile=/scratch/kocevski/66955/cmap_482976001_483235201_4FGL_J1040.5+0617_daily_bin940.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.66
user 0.38
sys 0.18

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/66955/ft1_filtered_4FGL_J1040.5+0617_daily_bin940.fits scfile=/scratch/kocevski/66955/ft2_4FGL_J1040.5+0617_daily_bin940.fits outfile=/scratch/kocevski/66955/cmap_HighResolution_482976001_483235201_4FGL_J1040.5+0617_daily_bin940.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.68
user 0.39
sys 0.18

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

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/66955/ft1_filtered_4FGL_J1040.5+0617_daily_bin940.fits', '/scratch/kocevski/66955/ft2_4FGL_J1040.5+0617_daily_bin940.fits', expMap='/scratch/kocevski/66955/expmap_482976001_483235201_4FGL_J1040.5+0617_daily_bin940.fits', expCube='/scratch/kocevski/66955/ltcube_482976001_483235201_4FGL_J1040.5+0617_daily_bin940.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/66955/Model_4FGL_J1040.5+0617_daily_bin940.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/66955/ft1_filtered_4FGL_J1040.5+0617_daily_bin940.fits
Spacecraft file(s): /scratch/kocevski/66955/ft2_4FGL_J1040.5+0617_daily_bin940.fits
Exposure map: /scratch/kocevski/66955/expmap_482976001_483235201_4FGL_J1040.5+0617_daily_bin940.fits
Exposure cube: /scratch/kocevski/66955/ltcube_482976001_483235201_4FGL_J1040.5+0617_daily_bin940.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/66955/Model_4FGL_J1040.5+0617_daily_bin940.xml
Optimizer: MINUIT
Statistic: UNBINNED

Performing an iterative likelihood fit...

Fit tolerance = 1

Performing likelihood fit...
Done.

MINUIT Return Code (Fixed Index): 102
logL (Fixed Index) = 5909.30723636

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10012E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10005E-03   1.0000         .10000E-03   10000.    
     3 'norm      '    2.0652       1.0000         .10000E-03   10000.    
     4 'Prefactor '    8.8376       1.0000         .10000E-03   10000.    
     5 'Prefactor '    20.959       1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10128E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    1.8110       1.0000         .10000E-03   10000.    
     9 'Prefactor '    6.6775       1.0000         .10000E-03   10000.    
    10 'Prefactor '    6.8175       1.0000         .10000E-03   10000.    
    11 'Prefactor '    27.075       1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10321E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    1.9826       1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10005E-03   1.0000         .10000E-03   10000.    
    15 'norm      '    1.8089       1.0000         .10000E-03   10000.    
    16 'Prefactor '    6.7593       1.0000         .10000E-03   10000.    
    17 'norm      '    .10010E-03   1.0000         .10000E-03   10000.    
    18 'Normalizat'    .84770       1.0000         .10000E-01   10.000    
    19 'Prefactor '    1.2355       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=   5909.206     FROM MIGRAD    STATUS=CONVERGED    386 CALLS     1672 TOTAL
                     EDM=   .28E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  2.4%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    3.4771       -.53809E-06** at limit **
   2  Prefactor     .10000E-03    15.997        .11838E-06** at limit **
   3  norm          2.0526        15.205       -.15500E-05   -.60442E-04
   4  Prefactor     8.8443        10.825        .72757E-08    .87167E-04
   5  Prefactor     20.786        65.312       -.24659E-05   -.23214E-04
   6  Prefactor     .10001E-03    74.484       -.11494E-04** at limit **
   7  Prefactor     .10000E-03    15.575       -.43556E-05** at limit **
   8  norm          1.8115        1.7452       -.28995E-07    .74289E-04
   9  Prefactor     6.6748        8.2550        .51178E-07    .10747E-05
  10  Prefactor     6.8187        4.0220       -.36500E-06   -.12883E-03
  11  Prefactor     27.076        9.9768       -.50023E-06   -.40108E-04
  12  Prefactor     .10000E-03    11.734        .78480E-06** at limit **
  13  norm          1.9828        .72562       -.29733E-07   -.46386E-03
  14  Prefactor     .10000E-03    4.4049        .20635E-06** at limit **
  15  norm          1.8087        1.5231       -.69741E-07    .71516E-04
  16  Prefactor     6.7528        21.327       -.65117E-06   -.10978E-04
  17  norm          .10000E-03    13.362        .10867E-05** at limit **
  18  Normalizat    .84763        .25235        .10710E-04   -.56647E-04
  19  Prefactor     1.2356        .20363       -.71075E-05    .17268E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 2.05262
  Prefactor  = 8.84425
  Prefactor  = 20.786
  Prefactor  = 0.000100014
  Prefactor  = 0.000100002
  norm       = 1.81148
  Prefactor  = 6.67476
  Prefactor  = 6.8187
  Prefactor  = 27.0759
  Prefactor  = 0.0001
  norm       = 1.98279
  Prefactor  = 0.0001
  norm       = 1.80869
  Prefactor  = 6.75279
  norm       = 0.0001
  Normalizat = 0.847633
  Prefactor  = 1.23562
 **********
 **   18 **HESSE 
 **********

 FCN=   5909.206     FROM HESSE     STATUS=OK           270 CALLS     1942 TOTAL
                     EDM=   .62E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    3.4848        .14008E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    16.004        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          2.0526        15.086        .28751E-03   -1.5421    
   4  Prefactor     8.8443        10.764        .13483E-03   -1.5113    
   5  Prefactor     20.786        65.459        .87489E-04   -1.4796    
   6  Prefactor     .10001E-03    77.328        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    15.987        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          1.8115        1.7264        .92913E-04   -1.5439    
   9  Prefactor     6.6748        8.2321        .15528E-03   -1.5191    
  10  Prefactor     6.8187        4.0209        .11210E-03   -1.5186    
  11  Prefactor     27.076        9.9742        .76991E-04   -1.4667    
  12  Prefactor     .10000E-03    12.169        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          1.9828        .72405        .37797E-04   -1.5426    
  14  Prefactor     .10000E-03    4.4165        .15744E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          1.8087        1.5132        .82191E-04   -1.5439    
  16  Prefactor     6.7528        21.319        .15433E-03   -1.5188    
  17  norm          .10000E-03    13.630        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Normalizat    .84763        .25694        .31612E-03   -.98325    
  19  Prefactor     1.2356        .20802        .23011E-03   -.85242    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 6.21311e-10
Minuit parameter uncertainties:
  1  2.10628e-05
  2  3.55632e-06
  3  11.133
  4  10.7665
  5  65.6861
  6  0.00206399
  7  0.000364379
  8  1.72643
  9  8.23351
  10  4.0211
  11  9.97486
  12  5.31976e-05
  13  0.724049
  14  7.73776e-06
  15  1.51324
  16  21.3428
  17  7.20113e-05
  18  0.257315
  19  0.208162
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  6.819e+00  4.021e+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.236e+00  2.082e-01  0.000e+00  1.000e+01 ( 1.000e+00)
534        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
535        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
532   Normalization:  8.476e-01  2.573e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 5.86
Ra Dec: 160.150 6.285
Photon Index (Fixed Index): 2.37 +/- 0.00
Photon Flux (Fixed Index): 8.24e-08 +/- 4.85e-08
Energy Flux (Fixed Index): 2.82e-05 +/- 1.66e-05

Performing a free index iterative likelihood fit...

Freezing all point sources, except source of interest...

Done.

Freeing candidate source...
Done.

Fit tolerance = 1

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 5908.69374508
delta logL = 0.512573800485

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 5908.68858547
delta logL = 0.517733401905

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    6.3062       1.0000         .10000E-03   10000.    
     2 'Index     '    1.7281       1.0000          .0000       10.000    
     3 'Normalizat'    .89567       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.2170       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=   5908.689     FROM MIGRAD    STATUS=CONVERGED     57 CALLS      220 TOTAL
                     EDM=   .68E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     6.2990        4.3721        .39961E-02    .21123E-04
   2  Index         1.7268        .40305        .20578       -.73165E-04
   3  Normalizat    .89593        .20226        .69668E-01    .25840E-04
   4  Prefactor     1.2168        .17386        .52417E-01    .67895E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 6.29899
  Index      = 1.72676
  Normalizat = 0.895927
  Prefactor  = 1.21678
 **********
 **   18 **HESSE 
 **********

 FCN=   5908.689     FROM HESSE     STATUS=OK            33 CALLS      253 TOTAL
                     EDM=   .53E-11    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     6.2990        5.9032        .12710E-03   -1.5206    
   2  Index         1.7268        .63352        .77548E-02   -.71372    
   3  Normalizat    .89593        .23922        .30824E-03   -.96603    
   4  Prefactor     1.2168        .20441        .23174E-03   -.85817    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 5.2763e-12
Minuit parameter uncertainties:
  1  5.90373
  2  0.636525
  3  0.239501
  4  0.204545
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/66955': 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) = 5908.68858282
delta logL = 0.517736057291

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  6.299e+00  5.904e+00  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  1.727e+00  6.365e-01  0.000e+00  1.000e+01 (-1.000e+00)
218        Scale:  8.643e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
533    Prefactor:  1.217e+00  2.045e-01  0.000e+00  1.000e+01 ( 1.000e+00)
534        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
535        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
532   Normalization:  8.959e-01  2.395e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 6.82
Ra Dec: 160.150 6.285
Photon Index (Free Index): 1.73 +/- 0.64
Photon Flux (Free Index): 3.57e-08 +/- 4.83e-08
Energy Flux (Free Index): 5.35e-05 +/- 5.76e-05

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/66955/cmap_HighResolution_482976001_483235201_4FGL_J1040.5+0617_daily_bin940.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='8.24e-08', energy_flux2='5.35e-05', photon_flux_error='4.85e-08', dlogl='5.18e-01', energy_flux='2.82e-05', photon_flux2='3.57e-08', job_status='DONE', time_completed='2021-09-02 08:38:23.111075', photon_index_error2='0.64', photon_index2='1.73', ts='5.86', fit_tolerance='1e-08', GAL='1.24', photon_index_error='0.00', energy_flux_error2='5.76e-05', EG='0.85', time_epoch_completed='1630597103.11', return_code='0', job_id='66955', GAL2='1.22', EG2='0.90', return_code2='0', energy_flux_error='1.66e-05', photon_flux_error2='4.83e-08', ts2='6.82', photon_index='2.37' WHERE bin_id='940' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:38:23 PDT 2021


------------------------------------------------------------
Sender: LSF System <scs@bullet0160>
Subject: Job 66955: <4FGL_J1040.5+0617_daily_bin940> in cluster <slac> Done

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

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin940 160.15 6.2848 482976001 483235201 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 :                                   514.07 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             295.83 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              7
    Max Threads :                                21
    Run time :                                   696 sec.
    Turnaround time :                            706 sec.

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

