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


Performing analysis on: 4FGL_J0840.8+1317_daily_bin382
RA = 130.222, Dec = 13.2871
tmin = 338342401, tmax = 338601601
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='609014', job_status='RUN', time_executed='2021-08-30 03:13:30.956412', time_epoch_executed='1630318410.96' WHERE source_name='4FGL J0840.8+1317' and cadence='daily' and bin_id='382'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/609014

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

Retrieving the FT1 file...

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

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

Retrieving 52 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/609014/ft1_4FGL_J0840.8+1317_daily_bin382.fits


Retrieving the FT1 file...

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

Retrieving 52 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/609014/ft2_4FGL_J0840.8+1317_daily_bin382.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/609014/ft1_4FGL_J0840.8+1317_daily_bin382.fits outfile=/scratch/kocevski/609014/ft1_filteredMKT_4FGL_J0840.8+1317_daily_bin382.fits ra=130.222 dec=13.2871 rad=12.0 tmin=338342401.0 tmax=338601601.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 12.17
user 6.31
sys 5.64

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/609014/ft2_4FGL_J0840.8+1317_daily_bin382.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/609014/ft1_filteredMKT_4FGL_J0840.8+1317_daily_bin382.fits evtable="EVENTS" outfile="/scratch/kocevski/609014/ft1_filtered_4FGL_J0840.8+1317_daily_bin382.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 6.10
user 0.34
sys 5.65

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/609014/ft1_filtered_4FGL_J0840.8+1317_daily_bin382.fits" evtable="EVENTS" scfile=/scratch/kocevski/609014/ft2_4FGL_J0840.8+1317_daily_bin382.fits sctable="SC_DATA" outfile=/scratch/kocevski/609014/ltcube_338342401_338601601_4FGL_J0840.8+1317_daily_bin382.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/609014/ft2_4FGL_J0840.8+1317_daily_bin382.fits
.....................!
real 18.15
user 11.43
sys 6.44

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/609014/ft1_filtered_4FGL_J0840.8+1317_daily_bin382.fits evtable="EVENTS" scfile=/scratch/kocevski/609014/ft2_4FGL_J0840.8+1317_daily_bin382.fits sctable="SC_DATA" expcube=/scratch/kocevski/609014/ltcube_338342401_338601601_4FGL_J0840.8+1317_daily_bin382.fits outfile=/scratch/kocevski/609014/expmap_338342401_338601601_4FGL_J0840.8+1317_daily_bin382.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/609014/ltcube_338342401_338601601_4FGL_J0840.8+1317_daily_bin382.fits
.....................!
real 198.66
user 185.76
sys 11.90

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/609014/ft1_filtered_4FGL_J0840.8+1317_daily_bin382.fits scfile=/scratch/kocevski/609014/ft2_4FGL_J0840.8+1317_daily_bin382.fits outfile=/scratch/kocevski/609014/cmap_338342401_338601601_4FGL_J0840.8+1317_daily_bin382.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 5.91
user 0.39
sys 5.47

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/609014/ft1_filtered_4FGL_J0840.8+1317_daily_bin382.fits scfile=/scratch/kocevski/609014/ft2_4FGL_J0840.8+1317_daily_bin382.fits outfile=/scratch/kocevski/609014/cmap_HighResolution_338342401_338601601_4FGL_J0840.8+1317_daily_bin382.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 5.88
user 0.39
sys 5.41

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

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/609014/ft1_filtered_4FGL_J0840.8+1317_daily_bin382.fits', '/scratch/kocevski/609014/ft2_4FGL_J0840.8+1317_daily_bin382.fits', expMap='/scratch/kocevski/609014/expmap_338342401_338601601_4FGL_J0840.8+1317_daily_bin382.fits', expCube='/scratch/kocevski/609014/ltcube_338342401_338601601_4FGL_J0840.8+1317_daily_bin382.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/609014/Model_4FGL_J0840.8+1317_daily_bin382.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/609014/ft1_filtered_4FGL_J0840.8+1317_daily_bin382.fits
Spacecraft file(s): /scratch/kocevski/609014/ft2_4FGL_J0840.8+1317_daily_bin382.fits
Exposure map: /scratch/kocevski/609014/expmap_338342401_338601601_4FGL_J0840.8+1317_daily_bin382.fits
Exposure cube: /scratch/kocevski/609014/ltcube_338342401_338601601_4FGL_J0840.8+1317_daily_bin382.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/609014/Model_4FGL_J0840.8+1317_daily_bin382.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) = 5937.43693383

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10006E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10658E-03   1.0000         .10000E-03   10000.    
     3 'norm      '    .10055E-03   1.0000         .10000E-03   10000.    
     4 'norm      '    .10020E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    .22186E-02   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
     7 'norm      '    .10011E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    .10160E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10005E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    70.124       1.0000         .10000E-03   10000.    
    12 'norm      '    4.1864       1.0000         .10000E-03   10000.    
    13 'Prefactor '    13.977       1.0000         .10000E-03   10000.    
    14 'norm      '    2.2506       1.0000         .10000E-03   10000.    
    15 'norm      '    26.114       1.0000         .10000E-03   10000.    
    16 'Normalizat'    1.5456       1.0000         .10000E-01   10.000    
    17 'Prefactor '    .82165       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.

 FCN=   5937.432     FROM MIGRAD    STATUS=CONVERGED    354 CALLS     1592 TOTAL
                     EDM=   .69E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    5.2655        .90712E-02** at limit **
   2  Prefactor     .10000E-03    38.607        .90712E-02** at limit **
   3  norm          .10000E-03    45.190        .90712E-02** at limit **
   4  norm          .10000E-03    13.033        .90712E-02** at limit **
   5  Prefactor     .10001E-03    37.095        .13519    ** at limit **
   6  Prefactor     .10000E-03    4.0458        .90712E-02** at limit **
   7  norm          .10000E-03    .56471        .90712E-02** at limit **
   8  norm          .10000E-03    .55209        .21414E-01** at limit **
   9  Prefactor     .10000E-03    2.4362        .90712E-02** at limit **
  10  Prefactor     .10000E-03    1.6361        .90712E-02** at limit **
  11  Prefactor     70.130        49.990        .11984E-02   -.98041E-03
  12  norm          4.1864        1.1921        .49243E-02    .64535E-04
  13  Prefactor     13.969        15.550        .26784E-02   -.34404E-03
  14  norm          2.2479        10.146        .68473E-02    .26021E-03
  15  norm          26.108        48.890        .19598E-02    .56538E-03
  16  Normalizat    1.5455        .21531        .55885E-01   -.89072E-05
  17  Prefactor     .82182        .17169        .43998E-01    .93511E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  norm       = 0.0001
  Prefactor  = 0.000100014
  Prefactor  = 0.0001
  norm       = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 70.1303
  norm       = 4.18644
  Prefactor  = 13.9689
  norm       = 2.24795
  norm       = 26.1075
  Normalizat = 1.54552
  Prefactor  = 0.821819
 **********
 **   18 **HESSE 
 **********

 FCN=   5937.432     FROM HESSE     STATUS=OK           221 CALLS     1813 TOTAL
                     EDM=   .68E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    5.2721        .17268E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    38.611        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          .10000E-03    45.204        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  norm          .10000E-03    13.059        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .10001E-03    330.13        .89575E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    4.0495        .15136E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  norm          .10000E-03    .58910        .11301E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          .10000E-03    1.1057        .11104E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     .10000E-03    2.4414        .11745E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .10000E-03    1.6373        .96252E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     70.130        50.263        .47936E-04   -1.4031    
  12  norm          4.1864        1.1940        .41666E-04   -1.5299    
  13  Prefactor     13.969        15.555        .10713E-03   -1.4960    
  14  norm          2.2479        10.141        .27389E-03   -1.5408    
  15  norm          26.108        48.871        .78392E-04   -1.4686    
  16  Normalizat    1.5455        .25385        .24710E-03   -.76507    
  17  Prefactor     .82182        .20309        .26572E-03   -.98929    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 6.78665e-09
Minuit parameter uncertainties:
  1  1.18408e-06
  2  2.43322e-05
  3  4.89691e-05
  4  3.41979e-06
  5  0.0042532
  6  3.44835e-07
  7  1.65721e-07
  8  2.46233e-08
  9  9.19366e-07
  10  5.38988e-07
  11  50.2937
  12  1.19396
  13  15.5592
  14  9.55141
  15  48.9461
  16  0.25406
  17  0.20328
Done.

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

Extracting fit parameters...

4FGL J0840.8+1317
   Spectrum: PowerLaw
297    Prefactor:  7.013e+01  5.029e+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:  8.218e-01  2.033e-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.546e+00  2.541e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 2.63
Ra Dec: 130.222 13.287
Photon Index (Fixed Index): 2.49 +/- 0.00
Photon Flux (Fixed Index): 8.40e-08 +/- 6.02e-08
Energy Flux (Fixed Index): 2.45e-05 +/- 1.76e-05

TS (Fixed Index): 2.63
Ra Dec: 130.222 13.287
Photon Flux Upper Limit: 2.00e-07 ph cm-2 s-1
Energy Flux Upper Limit: 1.55e-02 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/609014/likelihoodResults_338342401_338601601_4FGL_J0840.8+1317_daily_bin382.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) = 5936.16658383
delta logL = 1.26587566036

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 5936.15237355
delta logL = 1.28008593423

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    21.618       1.0000         .10000E-03   10000.    
     2 'Index     '    3.5961       1.0000          .0000       10.000    
     3 'Normalizat'    1.4575       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .87357       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.

 FCN=   5936.152     FROM MIGRAD    STATUS=CONVERGED     90 CALLS      316 TOTAL
                     EDM=   .11E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     21.594        49.173        .86148E-04   -.24704E-03
   2  Index         3.5968        1.3082        .40734E-02   -.11467E-03
   3  Normalizat    1.4575        .25798        .25274E-03    .14124E-03
   4  Prefactor     .87353        .20680        .25849E-03    .17012E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 21.5944
  Index      = 3.59683
  Normalizat = 1.45751
  Prefactor  = 0.87353
 **********
 **   18 **HESSE 
 **********

 FCN=   5936.152     FROM HESSE     STATUS=OK            25 CALLS      341 TOTAL
                     EDM=   .15E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     21.594        31.468        .34459E-05   -1.4778    
   2  Index         3.5968        .84168        .16293E-03   -.28445    
   3  Normalizat    1.4575        .25781        .50548E-04   -.78979    
   4  Prefactor     .87353        .20587        .10340E-04   -.97072    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.53407e-10
Minuit parameter uncertainties:
  1  31.4925
  2  0.846051
  3  0.258037
  4  0.206054
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/609014': 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) = 5936.1523729
delta logL = 1.28008658289

Extracting fit parameters...

4FGL J0840.8+1317
   Spectrum: PowerLaw
297    Prefactor:  2.159e+01  3.149e+01  1.000e-04  1.000e+04 ( 1.000e-13)
298        Index:  3.597e+00  8.461e-01  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:  8.735e-01  2.061e-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.458e+00  2.580e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 5.40
Ra Dec: 130.222 13.287
Photon Index (Free Index): 3.60 +/- 0.85
Photon Flux (Free Index): 1.48e-07 +/- 7.85e-08
Energy Flux (Free Index): 2.40e-05 +/- 1.30e-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/609014/cmap_HighResolution_338342401_338601601_4FGL_J0840.8+1317_daily_bin382.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.55e-02', comment='SUCCESS', photon_flux='8.40e-08', energy_flux2='2.40e-05', photon_flux_error='6.02e-08', dlogl='1.28e+00', energy_flux='2.45e-05', photon_flux2='1.48e-07', job_status='DONE', time_completed='2021-08-30 03:24:09.196090', photon_index_error2='0.85', photon_index2='3.60', ts='2.63', fit_tolerance='1e-08', GAL='0.82', photon_index_error='0.00', photon_flux_upper_limit='2.00e-07', energy_flux_error2='1.30e-05', EG='1.55', time_epoch_completed='1630319049.2', return_code='0', job_id='609014', GAL2='0.87', EG2='1.46', return_code2='0', energy_flux_error='1.76e-05', photon_flux_error2='7.85e-08', ts2='5.40', photon_index='2.49' WHERE bin_id='382' AND source_name='4FGL J0840.8+1317' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Aug 30 03:24:09 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0292>
Subject: Job 609014: <4FGL_J0840.8+1317_daily_bin382> in cluster <slac> Done

Job <4FGL_J0840.8+1317_daily_bin382> was submitted from host <rhel6-64d> by user <kocevski> in cluster <slac> at Mon Aug 30 03:11:32 2021
Job was executed on host(s) <bullet0292>, in queue <medium>, as user <kocevski> in cluster <slac> at Mon Aug 30 03:11:33 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:33 2021
Terminated at Mon Aug 30 03:24:10 2021
Results reported at Mon Aug 30 03:24:10 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J0840.8+1317_daily_bin382 130.222 13.2871 338342401 338601601 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 :                                   709.07 sec.
    Max Memory :                                 1257 MB
    Average Memory :                             241.87 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              7
    Max Threads :                                21
    Run time :                                   757 sec.
    Turnaround time :                            758 sec.

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

