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


Performing analysis on: 4FGL_J1040.5+0617_daily_bin1033
RA = 160.15, Dec = 6.2848
tmin = 507081601, tmax = 507340801
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='67936', job_status='RUN', time_executed='2021-09-02 08:36:06.784852', time_epoch_executed='1630596966.78' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='1033'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/67936

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/67936/ft1_4FGL_J1040.5+0617_daily_bin1033.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/67936/ft2_4FGL_J1040.5+0617_daily_bin1033.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/67936/ft1_4FGL_J1040.5+0617_daily_bin1033.fits outfile=/scratch/kocevski/67936/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin1033.fits ra=160.15 dec=6.2848 rad=12.0 tmin=507081601.0 tmax=507340801.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.63
user 4.40
sys 0.19

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

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

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

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/67936/ft1_filtered_4FGL_J1040.5+0617_daily_bin1033.fits evtable="EVENTS" scfile=/scratch/kocevski/67936/ft2_4FGL_J1040.5+0617_daily_bin1033.fits sctable="SC_DATA" expcube=/scratch/kocevski/67936/ltcube_507081601_507340801_4FGL_J1040.5+0617_daily_bin1033.fits outfile=/scratch/kocevski/67936/expmap_507081601_507340801_4FGL_J1040.5+0617_daily_bin1033.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/67936/ltcube_507081601_507340801_4FGL_J1040.5+0617_daily_bin1033.fits
.....................!
real 191.52
user 186.16
sys 4.73

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/67936/ft1_filtered_4FGL_J1040.5+0617_daily_bin1033.fits scfile=/scratch/kocevski/67936/ft2_4FGL_J1040.5+0617_daily_bin1033.fits outfile=/scratch/kocevski/67936/cmap_507081601_507340801_4FGL_J1040.5+0617_daily_bin1033.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.54
user 0.38
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/67936/ft1_filtered_4FGL_J1040.5+0617_daily_bin1033.fits scfile=/scratch/kocevski/67936/ft2_4FGL_J1040.5+0617_daily_bin1033.fits outfile=/scratch/kocevski/67936/cmap_HighResolution_507081601_507340801_4FGL_J1040.5+0617_daily_bin1033.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.55
user 0.39
sys 0.15

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    1.3444       1.0000         .10000E-03   10000.    
     2 'Prefactor '    72.655       1.0000         .10000E-03   10000.    
     3 'norm      '    10.577       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10006E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    30.477       1.0000         .10000E-03   10000.    
     7 'Prefactor '    .12031E-01   1.0000         .10000E-03   10000.    
     8 'norm      '    7.7945       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .88782E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    9.4138       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10013E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    .45286       1.0000         .10000E-03   10000.    
    14 'Prefactor '    13.686       1.0000         .10000E-03   10000.    
    15 'norm      '    1.8253       1.0000         .10000E-03   10000.    
    16 'Prefactor '    .31212E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    3.5992       1.0000         .10000E-03   10000.    
    18 'Normalizat'    .98303       1.0000         .10000E-01   10.000    
    19 'Prefactor '    1.0455       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=   4896.953     FROM MIGRAD    STATUS=CONVERGED    417 CALLS     2194 TOTAL
                     EDM=   .13E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  2.2%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     1.3441        17.968        .13288E-05   -.13684E-03
   2  Prefactor     72.696        67.844        .98836E-05    .36017E-03
   3  norm          10.579        10.789       -.43555E-06   -.99684E-04
   4  Prefactor     .10000E-03    6.9589       -.38254E-07** at limit **
   5  Prefactor     .10000E-03    29.015       -.14521E-06** at limit **
   6  Prefactor     30.559        52.790       -.82241E-06   -.13498E-03
   7  Prefactor     .10000E-03    25.396        .71895E-06** at limit **
   8  norm          7.7950        2.5316       -.13633E-06   -.22179E-04
   9  Prefactor     .10000E-03    6.9830       -.25814E-06** at limit **
  10  Prefactor     9.4124        4.4522        .10221E-06   -.74754E-04
  11  Prefactor     .10000E-03    1.9821       -.36801E-08** at limit **
  12  Prefactor     .10000E-03    3.1885        .36461E-08** at limit **
  13  norm          .45288        .62720       -.10865E-06   -.41750E-03
  14  Prefactor     13.682        10.328        .10771E-05    .31432E-03
  15  norm          1.8250        1.3121        .16412E-07   -.12983E-03
  16  Prefactor     .10000E-03    55.411        .62748E-06** at limit **
  17  norm          3.5985        7.1732        .31587E-05   -.12132E-02
  18  Normalizat    .98282        .21906       -.13695E-05   -.23182E-04
  19  Prefactor     1.0456        .18898       -.14219E-06   -.64892E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 1.34414
  Prefactor  = 72.6958
  norm       = 10.5793
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 30.5593
  Prefactor  = 0.000100002
  norm       = 7.79502
  Prefactor  = 0.000100001
  Prefactor  = 9.41242
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.45288
  Prefactor  = 13.6822
  norm       = 1.82501
  Prefactor  = 0.0001
  norm       = 3.59852
  Normalizat = 0.982818
  Prefactor  = 1.04558
 **********
 **   18 **HESSE 
 **********

 FCN=   4896.953     FROM HESSE     STATUS=OK           284 CALLS     2478 TOTAL
                     EDM=   .48E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     1.3441        18.127        .37776E-03   -1.5476    
   2  Prefactor     72.696        71.022        .47100E-04   -1.4001    
   3  norm          10.579        10.727        .12320E-03   -1.5057    
   4  Prefactor     .10000E-03    6.9639        .17977E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .10000E-03    29.049        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     30.559        54.612        .72576E-04   -1.4602    
   7  Prefactor     .10000E-03    34.858        .89250E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          7.7950        2.5183        .59740E-04   -1.5150    
   9  Prefactor     .10000E-03    22.638        .35365E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     9.4124        4.4587        .96299E-04   -1.5094    
  11  Prefactor     .10000E-03    1.9892        .96203E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .10000E-03    3.1999        .12199E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          .45288        .59017        .54328E-03   -1.5573    
  14  Prefactor     13.682        10.320        .10827E-03   -1.4968    
  15  norm          1.8250        1.3035        .65117E-04   -1.5438    
  16  Prefactor     .10000E-03    57.740        .42746E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          3.5985        9.3189        .10650E-02   -1.5329    
  18  Normalizat    .98282        .25168        .27147E-03   -.93608    
  19  Prefactor     1.0456        .21785        .23434E-03   -.91225    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 4.84251e-09
Minuit parameter uncertainties:
  1  9.87539
  2  71.1053
  3  10.7286
  4  1.24254e-05
  5  6.10607e-07
  6  54.7019
  7  0.000562218
  8  2.51836
  9  0.000356464
  10  4.45887
  11  1.78604e-06
  12  6.28636e-07
  13  0.590179
  14  10.3211
  15  1.30352
  16  0.000189704
  17  9.32263
  18  0.251985
  19  0.21803
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  9.412e+00  4.459e+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.046e+00  2.180e-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:  9.828e-01  2.520e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 8.25
Ra Dec: 160.150 6.285
Photon Index (Fixed Index): 2.37 +/- 0.00
Photon Flux (Fixed Index): 1.14e-07 +/- 5.38e-08
Energy Flux (Fixed Index): 3.89e-05 +/- 1.84e-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) = 4896.74526957
delta logL = 0.207387783279

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 4896.73491155
delta logL = 0.217745796309

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    7.2804       1.0000         .10000E-03   10000.    
     2 'Index     '    2.6530       1.0000          .0000       10.000    
     3 'Normalizat'    .95645       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.0611       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=   4896.735     FROM MIGRAD    STATUS=CONVERGED     81 CALLS      287 TOTAL
                     EDM=   .15E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     7.2811        5.1802        .80215E-04   -.25121E-02
   2  Index         2.6531        .47590        .41242E-02   -.50540E-03
   3  Normalizat    .95641        .25003        .27461E-03    .19520E-03
   4  Prefactor     1.0611        .21916        .23281E-03    .33323E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 7.2811
  Index      = 2.65311
  Normalizat = 0.956415
  Prefactor  = 1.06109
 **********
 **   18 **HESSE 
 **********

 FCN=   4896.735     FROM HESSE     STATUS=OK            23 CALLS      310 TOTAL
                     EDM=   .15E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     7.2811        4.9139        .32086E-05   -1.5168    
   2  Index         2.6531        .45121        .16497E-03   -.48859    
   3  Normalizat    .95641        .25013        .10984E-04   -.94505    
   4  Prefactor     1.0611        .21924        .46561E-04   -.90720    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.5335e-09
Minuit parameter uncertainties:
  1  4.91416
  2  0.451995
  3  0.250438
  4  0.219423
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/67936': 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) = 4896.73491138
delta logL = 0.217745970376

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  7.281e+00  4.914e+00  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  2.653e+00  4.520e-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.061e+00  2.194e-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:  9.564e-01  2.504e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 8.69
Ra Dec: 160.150 6.285
Photon Index (Free Index): 2.65 +/- 0.45
Photon Flux (Free Index): 1.35e-07 +/- 6.62e-08
Energy Flux (Free Index): 3.37e-05 +/- 1.64e-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/67936/cmap_HighResolution_507081601_507340801_4FGL_J1040.5+0617_daily_bin1033.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='1.14e-07', energy_flux2='3.37e-05', photon_flux_error='5.38e-08', dlogl='2.18e-01', energy_flux='3.89e-05', photon_flux2='1.35e-07', job_status='DONE', time_completed='2021-09-02 08:45:08.436524', photon_index_error2='0.45', photon_index2='2.65', ts='8.25', fit_tolerance='1e-08', GAL='1.05', photon_index_error='0.00', energy_flux_error2='1.64e-05', EG='0.98', time_epoch_completed='1630597508.44', return_code='0', job_id='67936', GAL2='1.06', EG2='0.96', return_code2='0', energy_flux_error='1.84e-05', photon_flux_error2='6.62e-08', ts2='8.69', photon_index='2.37' WHERE bin_id='1033' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:45:08 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0096>
Subject: Job 67936: <4FGL_J1040.5+0617_daily_bin1033> in cluster <slac> Done

Job <4FGL_J1040.5+0617_daily_bin1033> was submitted from host <rhel6-64j> by user <kocevski> in cluster <slac> at Thu Sep  2 08:31:24 2021
Job was executed on host(s) <bullet0096>, in queue <medium>, as user <kocevski> in cluster <slac> at Thu Sep  2 08:32:10 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:32:10 2021
Terminated at Thu Sep  2 08:45:09 2021
Results reported at Thu Sep  2 08:45:09 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin1033 160.15 6.2848 507081601 507340801 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 :                                   515.00 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             253.04 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   780 sec.
    Turnaround time :                            825 sec.

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

