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


Performing analysis on: 4FGL_J1040.5+0617_daily_bin544
RA = 160.15, Dec = 6.2848
tmin = 380332801, tmax = 380592001
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='64479', job_status='RUN', time_executed='2021-09-02 08:21:53.745687', time_epoch_executed='1630596113.75' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='544'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/64479

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/64479/ft1_4FGL_J1040.5+0617_daily_bin544.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/64479/ft2_4FGL_J1040.5+0617_daily_bin544.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/64479/ft1_4FGL_J1040.5+0617_daily_bin544.fits outfile=/scratch/kocevski/64479/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin544.fits ra=160.15 dec=6.2848 rad=12.0 tmin=380332801.0 tmax=380592001.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.50
user 3.27
sys 0.21

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/64479/ft1_filtered_4FGL_J1040.5+0617_daily_bin544.fits" evtable="EVENTS" scfile=/scratch/kocevski/64479/ft2_4FGL_J1040.5+0617_daily_bin544.fits sctable="SC_DATA" outfile=/scratch/kocevski/64479/ltcube_380332801_380592001_4FGL_J1040.5+0617_daily_bin544.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/64479/ft2_4FGL_J1040.5+0617_daily_bin544.fits
.....................!
real 14.14
user 13.74
sys 0.33

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/64479/ft1_filtered_4FGL_J1040.5+0617_daily_bin544.fits evtable="EVENTS" scfile=/scratch/kocevski/64479/ft2_4FGL_J1040.5+0617_daily_bin544.fits sctable="SC_DATA" expcube=/scratch/kocevski/64479/ltcube_380332801_380592001_4FGL_J1040.5+0617_daily_bin544.fits outfile=/scratch/kocevski/64479/expmap_380332801_380592001_4FGL_J1040.5+0617_daily_bin544.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/64479/ltcube_380332801_380592001_4FGL_J1040.5+0617_daily_bin544.fits
.....................!
real 193.95
user 187.99
sys 5.23

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/64479/ft1_filtered_4FGL_J1040.5+0617_daily_bin544.fits scfile=/scratch/kocevski/64479/ft2_4FGL_J1040.5+0617_daily_bin544.fits outfile=/scratch/kocevski/64479/cmap_380332801_380592001_4FGL_J1040.5+0617_daily_bin544.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.55
user 0.37
sys 0.16

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/64479/ft1_filtered_4FGL_J1040.5+0617_daily_bin544.fits scfile=/scratch/kocevski/64479/ft2_4FGL_J1040.5+0617_daily_bin544.fits outfile=/scratch/kocevski/64479/cmap_HighResolution_380332801_380592001_4FGL_J1040.5+0617_daily_bin544.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.38
sys 0.16

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .14399       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10004E-03   1.0000         .10000E-03   10000.    
     3 'norm      '    1.2024       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    71.775       1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10006E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    .26890E-01   1.0000         .10000E-03   10000.    
     9 'Prefactor '    6.9332       1.0000         .10000E-03   10000.    
    10 'Prefactor '    2.9503       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10109E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    .10007E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    2.1799       1.0000         .10000E-03   10000.    
    15 'norm      '    .10004E-03   1.0000         .10000E-03   10000.    
    16 'Prefactor '    24.608       1.0000         .10000E-03   10000.    
    17 'norm      '    .25562       1.0000         .10000E-03   10000.    
    18 'Normalizat'    .97520       1.0000         .10000E-01   10.000    
    19 'Prefactor '    .91555       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=   5693.948     FROM MIGRAD    STATUS=CONVERGED    729 CALLS     2555 TOTAL
                     EDM=   .38E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .80476E-01    13.401        .69053E-01    .45431E-03
   2  Prefactor     .10000E-03    16.721        .18142E-02** at limit **
   3  norm          1.2072        52.387        .41372E-03   -.55590E-04
   4  Prefactor     .10000E-03    4.9153        .16258E-02** at limit **
   5  Prefactor     71.752        61.848        .47386E-04    .48655E-04
   6  Prefactor     .10000E-03    20.449        .18142E-02** at limit **
   7  Prefactor     .10000E-03    5.4229        .17155E-02** at limit **
   8  norm          .34092E-01    10.702        .11019E-02   -.56027E-03
   9  Prefactor     6.9299        6.2201        .15236E-03   -.44694E-04
  10  Prefactor     2.9497        2.8678        .12061E-03   -.41475E-05
  11  Prefactor     .10000E-03    10.124        .36285E-03** at limit **
  12  Prefactor     .10000E-03    2.6350        .11933E-02** at limit **
  13  norm          .10000E-03    .17542        .56239E-03** at limit **
  14  Prefactor     2.1854        5.6472        .27642E-03    .14560E-03
  15  norm          .10000E-03    1.3016        .11730E-02** at limit **
  16  Prefactor     24.622        21.074        .80751E-04    .10390E-03
  17  norm          .26403        56.097        .39265E-02   -.17769E-03
  18  Normalizat    .97549        .21610        .24749E-03    .19927E-03
  19  Prefactor     .91521        .17967        .21746E-03   -.49612E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.080476
  Prefactor  = 0.0001
  norm       = 1.20721
  Prefactor  = 0.0001
  Prefactor  = 71.7518
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0340921
  Prefactor  = 6.92991
  Prefactor  = 2.94974
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 2.18541
  norm       = 0.0001
  Prefactor  = 24.6216
  norm       = 0.264027
  Normalizat = 0.975486
  Prefactor  = 0.915211
 **********
 **   18 **HESSE 
 **********

 FCN=   5693.948     FROM HESSE     STATUS=OK           262 CALLS     2817 TOTAL
                     EDM=   .44E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .80476E-01    12.110        .73535E-01   -1.5651    
   2  Prefactor     .10000E-03    16.722        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          1.2072        51.126        .16549E-04   -1.5488    
   4  Prefactor     .10000E-03    4.9166        .32516E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     71.752        61.836        .94772E-05   -1.4012    
   6  Prefactor     .10000E-03    20.449        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    5.4230        .34311E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          .34092E-01    10.720        .44075E-04   -1.5671    
   9  Prefactor     6.9299        6.2112        .60946E-05   -1.5181    
  10  Prefactor     2.9497        2.8673        .48243E-05   -1.5364    
  11  Prefactor     .10000E-03    10.124        .72569E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .10000E-03    2.6352        .23866E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          .10000E-03    .17544        .11248E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     2.1854        5.6444        .11057E-04   -1.5412    
  15  norm          .10000E-03    1.3064        .23461E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     24.622        21.068        .32301E-05   -1.4715    
  17  norm          .26403        57.329        .15706E-03   -1.5605    
  18  Normalizat    .97549        .21603        .98997E-05   -.93856    
  19  Prefactor     .91521        .17956        .86986E-05   -.95612    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 4.41733e-09
Minuit parameter uncertainties:
  1  1.97357
  2  9.05607e-06
  3  15.7261
  4  4.14925e-05
  5  61.8911
  6  4.38466e-05
  7  1.05898e-05
  8  1.2075
  9  6.21177
  10  2.86748
  11  1.4545e-05
  12  2.93008e-07
  13  1.12338e-06
  14  5.64578
  15  6.98132e-06
  16  21.0747
  17  7.78717
  18  0.216223
  19  0.17968
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  2.950e+00  2.867e+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:  9.152e-01  1.797e-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.755e-01  2.162e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 1.55
Ra Dec: 160.150 6.285
Photon Index (Fixed Index): 2.37 +/- 0.00
Photon Flux (Fixed Index): 3.56e-08 +/- 3.46e-08
Energy Flux (Fixed Index): 1.22e-05 +/- 1.19e-05

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

Saving results to:
/scratch/kocevski/64479/likelihoodResults_380332801_380592001_4FGL_J1040.5+0617_daily_bin544.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) = 5693.8096594
delta logL = 0.138113160012

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 5693.79792427
delta logL = 0.149848284106

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    3.5822       1.0000         .10000E-03   10000.    
     2 'Index     '    1.9378       1.0000          .0000       10.000    
     3 'Normalizat'    .98849       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .90786       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=   5693.798     FROM MIGRAD    STATUS=CONVERGED     50 CALLS      236 TOTAL
                     EDM=   .95E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     3.5815        135.01        .53379E-02    .29315E-03
   2  Index         1.9371        5.3402        .26160       -.18069E-04
   3  Normalizat    .98855        .10578        .46023E-01   -.22616E-04
   4  Prefactor     .90782        .76672E-01    .45105E-01    .93945E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 3.5815
  Index      = 1.93711
  Normalizat = 0.98855
  Prefactor  = 0.907819
 **********
 **   18 **HESSE 
 **********

 FCN=   5693.798     FROM HESSE     STATUS=OK            33 CALLS      269 TOTAL
                     EDM=   .68E-11    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     3.5815        3.3786        .12983E-03   -1.5329    
   2  Index         1.9371        .70008        .90878E-02   -.65932    
   3  Normalizat    .98855        .20654        .24600E-03   -.93415    
   4  Prefactor     .90782        .17622        .21821E-03   -.95868    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 6.75497e-12
Minuit parameter uncertainties:
  1  3.3788
  2  0.703792
  3  0.206708
  4  0.176331
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/64479': 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) = 5693.79792376
delta logL = 0.149848802483

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  3.582e+00  3.379e+00  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  1.937e+00  7.038e-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:  9.078e-01  1.763e-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.886e-01  2.067e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 1.84
Ra Dec: 160.150 6.285
Photon Index (Free Index): 1.94 +/- 0.70
Photon Flux (Free Index): 2.49e-08 +/- 3.17e-08
Energy Flux (Free Index): 2.02e-05 +/- 2.77e-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/64479/cmap_HighResolution_380332801_380592001_4FGL_J1040.5+0617_daily_bin544.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='8.77e-03', comment='SUCCESS', photon_flux='3.56e-08', energy_flux2='2.02e-05', photon_flux_error='3.46e-08', dlogl='1.50e-01', energy_flux='1.22e-05', photon_flux2='2.49e-08', job_status='DONE', time_completed='2021-09-02 08:32:01.330723', photon_index_error2='0.70', photon_index2='1.94', ts='1.55', fit_tolerance='1e-08', GAL='0.92', photon_index_error='0.00', photon_flux_upper_limit='1.14e-07', energy_flux_error2='2.77e-05', EG='0.98', time_epoch_completed='1630596721.33', return_code='0', job_id='64479', GAL2='0.91', EG2='0.99', return_code2='0', energy_flux_error='1.19e-05', photon_flux_error2='3.17e-08', ts2='1.84', photon_index='2.37' WHERE bin_id='544' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:32:01 PDT 2021


------------------------------------------------------------
Sender: LSF System <scs@bullet0284>
Subject: Job 64479: <4FGL_J1040.5+0617_daily_bin544> in cluster <slac> Done

Job <4FGL_J1040.5+0617_daily_bin544> was submitted from host <rhel6-64p> by user <kocevski> in cluster <slac> at Thu Sep  2 08:16:37 2021
Job was executed on host(s) <bullet0284>, in queue <medium>, as user <kocevski> in cluster <slac> at Thu Sep  2 08:19:32 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:19:32 2021
Terminated at Thu Sep  2 08:32:01 2021
Results reported at Thu Sep  2 08:32:01 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin544 160.15 6.2848 380332801 380592001 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 :                                   595.00 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             287.84 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   749 sec.
    Turnaround time :                            924 sec.

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

