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


Performing analysis on: 4FGL_J0840.8+1317_daily_bin254
RA = 130.222, Dec = 13.2871
tmin = 305164801, tmax = 305424001
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='608814', job_status='RUN', time_executed='2021-08-30 03:12:35.659382', time_epoch_executed='1630318355.66' WHERE source_name='4FGL J0840.8+1317' and cadence='daily' and bin_id='254'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/608814

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/608814/ft1_4FGL_J0840.8+1317_daily_bin254.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/608814/ft2_4FGL_J0840.8+1317_daily_bin254.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/608814/ft1_4FGL_J0840.8+1317_daily_bin254.fits outfile=/scratch/kocevski/608814/ft1_filteredMKT_4FGL_J0840.8+1317_daily_bin254.fits ra=130.222 dec=13.2871 rad=12.0 tmin=305164801.0 tmax=305424001.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 6.68
user 3.17
sys 3.26

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/608814/ft2_4FGL_J0840.8+1317_daily_bin254.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/608814/ft2_4FGL_J0840.8+1317_daily_bin254.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/608814/ft1_filteredMKT_4FGL_J0840.8+1317_daily_bin254.fits evtable="EVENTS" outfile="/scratch/kocevski/608814/ft1_filtered_4FGL_J0840.8+1317_daily_bin254.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 3.72
user 0.31
sys 3.11

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/608814/ft1_filtered_4FGL_J0840.8+1317_daily_bin254.fits" evtable="EVENTS" scfile=/scratch/kocevski/608814/ft2_4FGL_J0840.8+1317_daily_bin254.fits sctable="SC_DATA" outfile=/scratch/kocevski/608814/ltcube_305164801_305424001_4FGL_J0840.8+1317_daily_bin254.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/608814/ft2_4FGL_J0840.8+1317_daily_bin254.fits
.....................!
real 16.37
user 11.90
sys 4.09

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/608814/ft1_filtered_4FGL_J0840.8+1317_daily_bin254.fits evtable="EVENTS" scfile=/scratch/kocevski/608814/ft2_4FGL_J0840.8+1317_daily_bin254.fits sctable="SC_DATA" expcube=/scratch/kocevski/608814/ltcube_305164801_305424001_4FGL_J0840.8+1317_daily_bin254.fits outfile=/scratch/kocevski/608814/expmap_305164801_305424001_4FGL_J0840.8+1317_daily_bin254.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/608814/ltcube_305164801_305424001_4FGL_J0840.8+1317_daily_bin254.fits
.....................!
real 198.75
user 186.41
sys 10.21

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 160 point sources and 0 extended sources

Setting source of interest to:
4FGL J0840.8+1317 @ 130.222 13.2871

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/608814/ft1_filtered_4FGL_J0840.8+1317_daily_bin254.fits scfile=/scratch/kocevski/608814/ft2_4FGL_J0840.8+1317_daily_bin254.fits outfile=/scratch/kocevski/608814/cmap_305164801_305424001_4FGL_J0840.8+1317_daily_bin254.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=130.222 yref=13.2871 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.65
user 0.38
sys 3.21

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/608814/ft1_filtered_4FGL_J0840.8+1317_daily_bin254.fits scfile=/scratch/kocevski/608814/ft2_4FGL_J0840.8+1317_daily_bin254.fits outfile=/scratch/kocevski/608814/cmap_HighResolution_305164801_305424001_4FGL_J0840.8+1317_daily_bin254.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=130.222 yref=13.2871 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.62
user 0.37
sys 3.23

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/608814/ft1_filtered_4FGL_J0840.8+1317_daily_bin254.fits evtable="EVENTS" scfile=/scratch/kocevski/608814/ft2_4FGL_J0840.8+1317_daily_bin254.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/608814/Model_4FGL_J0840.8+1317_daily_bin254.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/608814/ft1_filtered_4FGL_J0840.8+1317_daily_bin254.fits.....................!
real 64.27
user 58.66
sys 5.32

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/608814/ft1_filtered_4FGL_J0840.8+1317_daily_bin254.fits', '/scratch/kocevski/608814/ft2_4FGL_J0840.8+1317_daily_bin254.fits', expMap='/scratch/kocevski/608814/expmap_305164801_305424001_4FGL_J0840.8+1317_daily_bin254.fits', expCube='/scratch/kocevski/608814/ltcube_305164801_305424001_4FGL_J0840.8+1317_daily_bin254.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/608814/Model_4FGL_J0840.8+1317_daily_bin254.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J0840.8+1317'

4FGL J0840.8+1317
   Spectrum: PowerLaw
297    Prefactor:  5.096e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-13)
298        Index:  2.494e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
299        Scale:  7.999e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/608814/ft1_filtered_4FGL_J0840.8+1317_daily_bin254.fits
Spacecraft file(s): /scratch/kocevski/608814/ft2_4FGL_J0840.8+1317_daily_bin254.fits
Exposure map: /scratch/kocevski/608814/expmap_305164801_305424001_4FGL_J0840.8+1317_daily_bin254.fits
Exposure cube: /scratch/kocevski/608814/ltcube_305164801_305424001_4FGL_J0840.8+1317_daily_bin254.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/608814/Model_4FGL_J0840.8+1317_daily_bin254.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) = 5556.83453535

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    4.8825       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     3 'norm      '    117.98       1.0000         .10000E-03   10000.    
     4 'norm      '    20.663       1.0000         .10000E-03   10000.    
     5 'Prefactor '    7.3659       1.0000         .10000E-03   10000.    
     6 'Prefactor '    18.652       1.0000         .10000E-03   10000.    
     7 'norm      '    1.5443       1.0000         .10000E-03   10000.    
     8 'norm      '    2.1446       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    2.6434       1.0000         .10000E-03   10000.    
    11 'Prefactor '    9.9135       1.0000         .10000E-03   10000.    
    12 'norm      '    2.6420       1.0000         .10000E-03   10000.    
    13 'Prefactor '    11.131       1.0000         .10000E-03   10000.    
    14 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
    15 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    16 'Normalizat'    1.5708       1.0000         .10000E-01   10.000    
    17 'Prefactor '    .56534       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5150E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   5556.831     FROM MIGRAD    STATUS=CONVERGED    314 CALLS     1549 TOTAL
                     EDM=   .14E-10  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  3.5%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     4.8866        14.833       -.62587E-07   -.55954E-05
   2  Prefactor     .10000E-03    37.536       -.16685E-06** at limit **
   3  norm          117.97        110.45        .12736E-05   -.65588E-06
   4  norm          20.667        22.984       -.75157E-06   -.12626E-04
   5  Prefactor     7.3555        39.304        .41714E-05    .18423E-05
   6  Prefactor     18.661        17.702       -.88962E-06   -.25321E-04
   7  norm          1.5447        1.0562        .57000E-08   -.25896E-04
   8  norm          2.1449        1.1420        .10594E-07   -.53250E-04
   9  Prefactor     .10000E-03    6.0470        .11767E-06** at limit **
  10  Prefactor     2.6433        5.3509        .28472E-05   -.32762E-04
  11  Prefactor     9.8893        33.337        .68656E-05   -.36050E-05
  12  norm          2.6425        .93210       -.20219E-07   -.99084E-04
  13  Prefactor     11.131        8.0408        .25202E-07   -.37402E-05
  14  norm          .10000E-03    3.5666        .43305E-08** at limit **
  15  norm          .10000E-03    11.437        .14722E-07** at limit **
  16  Normalizat    1.5702        .20213        .14045E-06    .18078E-04
  17  Prefactor     .56584        .15607       -.13295E-05   -.57064E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 4.8866
  Prefactor  = 0.0001
  norm       = 117.972
  norm       = 20.6671
  Prefactor  = 7.35546
  Prefactor  = 18.6608
  norm       = 1.54465
  norm       = 2.14489
  Prefactor  = 0.0001
  Prefactor  = 2.64331
  Prefactor  = 9.88931
  norm       = 2.64252
  Prefactor  = 11.1311
  norm       = 0.0001
  norm       = 0.0001
  Normalizat = 1.57017
  Prefactor  = 0.565837
 **********
 **   18 **HESSE 
 **********

 FCN=   5556.831     FROM HESSE     STATUS=OK           229 CALLS     1778 TOTAL
                     EDM=   .35E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     4.8866        14.868        .18204E-03   -1.5266    
   2  Prefactor     .10000E-03    37.538        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          117.97        110.46        .37045E-04   -1.3531    
   4  norm          20.667        22.967        .88114E-04   -1.4798    
   5  Prefactor     7.3555        39.401        .14778E-03   -1.5165    
   6  Prefactor     18.661        17.761        .92737E-04   -1.4844    
   7  norm          1.5447        1.0564        .34297E-04   -1.5459    
   8  norm          2.1449        1.1421        .56093E-04   -1.5415    
   9  Prefactor     .10000E-03    6.0873        .17893E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     2.6433        5.3834        .11918E-02   -1.5383    
  11  Prefactor     9.8893        33.408        .12727E-03   -1.5079    
  12  norm          2.6425        .93421        .40755E-04   -1.5383    
  13  Prefactor     11.131        8.0414        .12008E-03   -1.5041    
  14  norm          .10000E-03    3.5739        .13749E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          .10000E-03    11.438        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Normalizat    1.5702        .23745        .22350E-03   -.75825    
  17  Prefactor     .56584        .18072        .28433E-03   -1.0904    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.51297e-11
Minuit parameter uncertainties:
  1  14.8789
  2  3.82341e-06
  3  110.65
  4  22.9769
  5  34.0824
  6  17.7662
  7  1.05645
  8  1.14213
  9  3.87303e-06
  10  5.38439
  11  33.4714
  12  0.934215
  13  8.04216
  14  1.02482e-06
  15  9.82062e-07
  16  0.237622
  17  0.180909
Done.

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

Extracting fit parameters...

4FGL J0840.8+1317
   Spectrum: PowerLaw
297    Prefactor:  9.889e+00  3.347e+01  1.000e-04  1.000e+04 ( 1.000e-13)
298        Index:  2.494e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
299        Scale:  7.999e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
512    Prefactor:  5.658e-01  1.809e-01  0.000e+00  1.000e+01 ( 1.000e+00)
513        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
514        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
511   Normalization:  1.570e+00  2.376e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 0.11
Ra Dec: 130.222 13.287
Photon Flux Upper Limit: 1.11e-07 ph cm-2 s-1
Energy Flux Upper Limit: 8.63e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/608814/likelihoodResults_305164801_305424001_4FGL_J0840.8+1317_daily_bin254.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) = 5556.02119511
delta logL = 0.809945887883

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 5555.96812635
delta logL = 0.863014647999

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    2.9850       1.0000         .10000E-03   10000.    
     2 'Index     '    4.3989       1.0000          .0000       10.000    
     3 'Normalizat'    1.4795       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .61014       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5150E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

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

 FCN=   5555.968     FROM MIGRAD    STATUS=FAILED        82 CALLS      291 TOTAL
                     EDM=   .39E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     2.9843        93.035        .98342E-04   -.32349E-02
   2  Index         4.3990        7.1577        .50212E-02   -.64371E-03
   3  Normalizat    1.4796        .22245        .22882E-03   -.85216E-03
   4  Prefactor     .61010        .17600        .27453E-03   -.49406E-03
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   5555.968     FROM SIMPLEX   STATUS=UNCHANGED     90 CALLS      381 TOTAL
                     EDM=   .15E-04    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     2.9843        93.035        .24675E-03   -.32349E-02
   2  Index         4.3990        7.1577        .16261E-02   -.64371E-03
   3  Normalizat    1.4796        .22245        .15619E-03   -.85216E-03
   4  Prefactor     .61010        .17600        .12265E-03   -.49406E-03
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   5555.968     FROM MIGRAD    STATUS=CONVERGED     27 CALLS      408 TOTAL
                     EDM=   .25E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     2.9839        8.2318        .39337E-05   -.36074E-02
   2  Index         4.3991        1.5248        .20085E-03   -.54015E-03
   3  Normalizat    1.4796        .23476        .45765E-04   -.82688E-03
   4  Prefactor     .61010        .18382        .54905E-04   -.47951E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 2.98387
  Index      = 4.39911
  Normalizat = 1.47962
  Prefactor  = 0.610095
 **********
 **   18 **HESSE 
 **********

 FCN=   5555.968     FROM HESSE     STATUS=OK            23 CALLS      431 TOTAL
                     EDM=   .25E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     2.9839        8.0646        .78673E-06   -1.5362    
   2  Index         4.3991        1.4947        .40170E-04   -.12047    
   3  Normalizat    1.4796        .23478        .91529E-05   -.78353    
   4  Prefactor     .61010        .18383        .10981E-04   -1.0716    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.5141e-09
Minuit parameter uncertainties:
  1  8.06751
  2  1.51823
  3  0.234952
  4  0.184012
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/608814': 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) = 5555.96812613
delta logL = 0.863014861454

Extracting fit parameters...

4FGL J0840.8+1317
   Spectrum: PowerLaw
297    Prefactor:  2.984e+00  8.068e+00  1.000e-04  1.000e+04 ( 1.000e-13)
298        Index:  4.399e+00  1.518e+00  0.000e+00  1.000e+01 (-1.000e+00)
299        Scale:  7.999e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
512    Prefactor:  6.101e-01  1.840e-01  0.000e+00  1.000e+01 ( 1.000e+00)
513        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
514        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
511   Normalization:  1.480e+00  2.350e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 1.95
Ra Dec: 130.222 13.287
Photon Index (Free Index): 4.40 +/- 1.52
Photon Flux (Free Index): 8.28e-08 +/- 6.98e-08
Energy Flux (Free Index): 1.17e-05 +/- 9.77e-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/608814/cmap_HighResolution_305164801_305424001_4FGL_J0840.8+1317_daily_bin254.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='8.63e-03', comment='SUCCESS', energy_flux2='1.17e-05', dlogl='8.63e-01', photon_flux2='8.28e-08', job_status='DONE', time_completed='2021-08-30 03:22:09.500588', photon_index_error2='1.52', photon_index2='4.40', ts='0.11', fit_tolerance='1e-08', GAL='0.57', photon_index_error='0.00', photon_flux_upper_limit='1.11e-07', energy_flux_error2='9.77e-06', EG='1.57', time_epoch_completed='1630318929.5', return_code='0', job_id='608814', GAL2='0.61', EG2='1.48', return_code2='0', photon_flux_error2='6.98e-08', ts2='1.95', photon_index='2.49' WHERE bin_id='254' AND source_name='4FGL J0840.8+1317' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Aug 30 03:22:09 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0148>
Subject: Job 608814: <4FGL_J0840.8+1317_daily_bin254> in cluster <slac> Done

Job <4FGL_J0840.8+1317_daily_bin254> was submitted from host <rhel6-64d> by user <kocevski> in cluster <slac> at Mon Aug 30 03:11:16 2021
Job was executed on host(s) <bullet0148>, in queue <medium>, as user <kocevski> in cluster <slac> at Mon Aug 30 03:11:18 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Mon Aug 30 03:11:18 2021
Terminated at Mon Aug 30 03:22:10 2021
Results reported at Mon Aug 30 03:22:10 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J0840.8+1317_daily_bin254 130.222 13.2871 305164801 305424001 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J0840.8+1317 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   605.00 sec.
    Max Memory :                                 1255 MB
    Average Memory :                             313.65 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              7
    Max Threads :                                21
    Run time :                                   652 sec.
    Turnaround time :                            654 sec.

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

