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


Performing analysis on: 4FGL_J1040.5+0617_daily_bin354
RA = 160.15, Dec = 6.2848
tmin = 331084801, tmax = 331344001
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='62948', job_status='RUN', time_executed='2021-09-02 08:16:58.608205', time_epoch_executed='1630595818.61' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='354'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/62948

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/62948/ft1_4FGL_J1040.5+0617_daily_bin354.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/62948/ft2_4FGL_J1040.5+0617_daily_bin354.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/62948/ft1_4FGL_J1040.5+0617_daily_bin354.fits outfile=/scratch/kocevski/62948/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin354.fits ra=160.15 dec=6.2848 rad=12.0 tmin=331084801.0 tmax=331344001.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 3.41
user 3.18
sys 0.18

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

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

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

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/62948/ft1_filtered_4FGL_J1040.5+0617_daily_bin354.fits evtable="EVENTS" scfile=/scratch/kocevski/62948/ft2_4FGL_J1040.5+0617_daily_bin354.fits sctable="SC_DATA" expcube=/scratch/kocevski/62948/ltcube_331084801_331344001_4FGL_J1040.5+0617_daily_bin354.fits outfile=/scratch/kocevski/62948/expmap_331084801_331344001_4FGL_J1040.5+0617_daily_bin354.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/62948/ltcube_331084801_331344001_4FGL_J1040.5+0617_daily_bin354.fits
.....................!
real 193.28
user 188.20
sys 4.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/62948/ft1_filtered_4FGL_J1040.5+0617_daily_bin354.fits scfile=/scratch/kocevski/62948/ft2_4FGL_J1040.5+0617_daily_bin354.fits outfile=/scratch/kocevski/62948/cmap_331084801_331344001_4FGL_J1040.5+0617_daily_bin354.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.56
user 0.40
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/62948/ft1_filtered_4FGL_J1040.5+0617_daily_bin354.fits scfile=/scratch/kocevski/62948/ft2_4FGL_J1040.5+0617_daily_bin354.fits outfile=/scratch/kocevski/62948/cmap_HighResolution_331084801_331344001_4FGL_J1040.5+0617_daily_bin354.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.56
user 0.41
sys 0.14

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10131E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     3 'norm      '    6.1670       1.0000         .10000E-03   10000.    
     4 'Prefactor '    6.5889       1.0000         .10000E-03   10000.    
     5 'Prefactor '    76.003       1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10340E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10036E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    1.1490       1.0000         .10000E-03   10000.    
     9 'Prefactor '    8.1817       1.0000         .10000E-03   10000.    
    10 'Prefactor '    3.5513       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .11753E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    3.9616       1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    15 'norm      '    3.1945       1.0000         .10000E-03   10000.    
    16 'Prefactor '    13.646       1.0000         .10000E-03   10000.    
    17 'norm      '    .10033E-03   1.0000         .10000E-03   10000.    
    18 'Normalizat'    .84193       1.0000         .10000E-01   10.000    
    19 'Prefactor '    1.2240       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=   6487.113     FROM MIGRAD    STATUS=CONVERGED    379 CALLS     1862 TOTAL
                     EDM=   .11E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    5.2132        .90712E-02** at limit **
   2  Prefactor     .10000E-03    10.092        .90712E-02** at limit **
   3  norm          6.1702        17.993        .40415E-02   -.72986E-03
   4  Prefactor     6.5919        10.333        .39084E-02    .45823E-03
   5  Prefactor     76.004        72.123        .11515E-02   -.90622E-03
   6  Prefactor     .10000E-03    23.592        .90712E-02** at limit **
   7  Prefactor     .10000E-03    6.0377        .90712E-02** at limit **
   8  norm          1.1491        1.3466        .10801E-01    .80296E-03
   9  Prefactor     8.1833        7.1249        .35041E-02    .13762E-03
  10  Prefactor     3.5524        3.0826        .53620E-02    .26426E-03
  11  Prefactor     .10000E-03    12.316        .90712E-02** at limit **
  12  Prefactor     .10000E-03    1.9114        .90712E-02** at limit **
  13  norm          3.9622        .86781        .50664E-02    .55272E-04
  14  Prefactor     .10000E-03    4.2022        .90712E-02** at limit **
  15  norm          3.1944        1.4569        .56676E-02    .79082E-04
  16  Prefactor     13.649        15.784        .27107E-02   -.10816E-02
  17  norm          .10001E-03    11.580        .90712E-02** at limit **
  18  Normalizat    .84144        .20028        .71167E-01    .24895E-04
  19  Prefactor     1.2243        .16783        .52233E-01    .36766E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 0.000100001
  norm       = 6.17024
  Prefactor  = 6.59188
  Prefactor  = 76.0039
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 1.14911
  Prefactor  = 8.18326
  Prefactor  = 3.5524
  Prefactor  = 0.000100003
  Prefactor  = 0.0001
  norm       = 3.96216
  Prefactor  = 0.0001
  norm       = 3.19444
  Prefactor  = 13.6492
  norm       = 0.000100007
  Normalizat = 0.841439
  Prefactor  = 1.22434
 **********
 **   18 **HESSE 
 **********

 FCN=   6487.113     FROM HESSE     STATUS=OK           266 CALLS     2128 TOTAL
                     EDM=   .10E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    5.2191        .17952E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    10.095        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          6.1702        17.877        .16166E-03   -1.5211    
   4  Prefactor     6.5919        10.272        .15634E-03   -1.5194    
   5  Prefactor     76.004        72.185        .46059E-04   -1.3962    
   6  Prefactor     .10000E-03    23.595        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    6.0387        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          1.1491        1.3156        .96067E-04   -1.5494    
   9  Prefactor     8.1833        7.1103        .14016E-03   -1.5136    
  10  Prefactor     3.5524        3.0796        .12591E-03   -1.5331    
  11  Prefactor     .10000E-03    12.780        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .10000E-03    1.9146        .10873E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          3.9622        .86775        .33428E-04   -1.5310    
  14  Prefactor     .10000E-03    4.2101        .16113E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          3.1944        1.4569        .63070E-04   -1.5350    
  16  Prefactor     13.649        15.790        .10843E-03   -1.4969    
  17  norm          .10001E-03    11.700        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Normalizat    .84144        .23538        .31491E-03   -.98550    
  19  Prefactor     1.2243        .19814        .23092E-03   -.85585    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.04943e-08
Minuit parameter uncertainties:
  1  7.63792e-06
  2  0.000206459
  3  17.8928
  4  10.2748
  5  72.2683
  6  5.40123e-05
  7  1.69899e-05
  8  1.31562
  9  7.11105
  10  3.07976
  11  0.000358015
  12  3.80671e-07
  13  0.867754
  14  1.28734e-06
  15  1.4569
  16  15.7945
  17  0.000559248
  18  0.235668
  19  0.198265
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  3.552e+00  3.080e+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.224e+00  1.983e-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.414e-01  2.357e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 2.40
Ra Dec: 160.150 6.285
Photon Index (Fixed Index): 2.37 +/- 0.00
Photon Flux (Fixed Index): 4.29e-08 +/- 3.72e-08
Energy Flux (Fixed Index): 1.47e-05 +/- 1.27e-05

TS (Fixed Index): 2.40
Ra Dec: 160.150 6.285
Photon Flux Upper Limit: 1.28e-07 ph cm-2 s-1
Energy Flux Upper Limit: 9.87e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/62948/likelihoodResults_331084801_331344001_4FGL_J1040.5+0617_daily_bin354.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) = 6487.09159747
delta logL = 0.0214346874018

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 6487.0860395
delta logL = 0.0269926559049

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    3.2276       1.0000         .10000E-03   10000.    
     2 'Index     '    2.5575       1.0000          .0000       10.000    
     3 'Normalizat'    .83032       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.2304       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=   6487.086     FROM MIGRAD    STATUS=CONVERGED     56 CALLS      223 TOTAL
                     EDM=   .52E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     3.2268        68.503        .56370E-02    .29611E-03
   2  Index         2.5577        6.1980        .16438        .92397E-04
   3  Normalizat    .83035        .87693E-01    .71588E-01    .23365E-04
   4  Prefactor     1.2303        .61453E-01    .52123E-01    .18945E-06
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 3.22678
  Index      = 2.55769
  Normalizat = 0.830352
  Prefactor  = 1.23032
 **********
 **   18 **HESSE 
 **********

 FCN=   6487.086     FROM HESSE     STATUS=OK            33 CALLS      256 TOTAL
                     EDM=   .56E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     3.2268        3.4426        .11406E-03   -1.5349    
   2  Index         2.5577        .87322        .90118E-02   -.51033    
   3  Normalizat    .83035        .23213        .31679E-03   -.98953    
   4  Prefactor     1.2303        .19815        .23044E-03   -.85403    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 5.58965e-09
Minuit parameter uncertainties:
  1  3.44282
  2  0.879162
  3  0.232409
  4  0.198268
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/62948': 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) = 6487.08603944
delta logL = 0.0269927150703

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  3.227e+00  3.443e+00  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  2.558e+00  8.792e-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.230e+00  1.983e-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.304e-01  2.324e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 2.46
Ra Dec: 160.150 6.285
Photon Index (Free Index): 2.56 +/- 0.88
Photon Flux (Free Index): 5.16e-08 +/- 5.45e-08
Energy Flux (Free Index): 1.41e-05 +/- 1.21e-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/62948/cmap_HighResolution_331084801_331344001_4FGL_J1040.5+0617_daily_bin354.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='9.87e-03', comment='SUCCESS', photon_flux='4.29e-08', energy_flux2='1.41e-05', photon_flux_error='3.72e-08', dlogl='2.70e-02', energy_flux='1.47e-05', photon_flux2='5.16e-08', job_status='DONE', time_completed='2021-09-02 08:26:46.381724', photon_index_error2='0.88', photon_index2='2.56', ts='2.40', fit_tolerance='1e-08', GAL='1.22', photon_index_error='0.00', photon_flux_upper_limit='1.28e-07', energy_flux_error2='1.21e-05', EG='0.84', time_epoch_completed='1630596406.38', return_code='0', job_id='62948', GAL2='1.23', EG2='0.83', return_code2='0', energy_flux_error='1.27e-05', photon_flux_error2='5.45e-08', ts2='2.46', photon_index='2.37' WHERE bin_id='354' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:26:46 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0196>
Subject: Job 62948: <4FGL_J1040.5+0617_daily_bin354> in cluster <slac> Done

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

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin354 160.15 6.2848 331084801 331344001 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 :                                   586.00 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             282.76 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   763 sec.
    Turnaround time :                            921 sec.

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

