/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 148 seconds before starting...
Proceeding.

Importing modules...
This is make3FGLxml version 01r0.
The default diffuse model files and names are for pass 8 and assume you have v10r00p05 of the Fermi Science Tools or higher.
This is make4FGLxml version 01r04.
The default diffuse model files and names are for pass 8 and 4FGL and assume you have v11r5p3 of the Fermi Science Tools or higher.

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

/nfs/farm/g/glast/g/LCRepository/bin/miniconda2/envs/fermitools_v1.0.5/lib/python2.7/site-packages/matplotlib/cbook/deprecation.py:106: MatplotlibDeprecationWarning: The mpl_toolkits.axes_grid module was deprecated in version 2.1. Use mpl_toolkits.axes_grid1 and mpl_toolkits.axisartist provies the same functionality instead.
  warnings.warn(message, mplDeprecation, stacklevel=1)

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

number of points = 7380
number of fields = 30
RA_SUN column already exists. File will not be modified.
Done.


Performing analysis on: 4FGL_J1040.5+0617_daily_bin804
RA = 160.15, Dec = 6.2848
tmin = 447724801, tmax = 447984001
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='66705', job_status='RUN', time_executed='2021-09-02 08:28:48.408433', time_epoch_executed='1630596528.41' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='804'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/66705

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/66705/ft1_4FGL_J1040.5+0617_daily_bin804.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/66705/ft2_4FGL_J1040.5+0617_daily_bin804.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/66705/ft1_4FGL_J1040.5+0617_daily_bin804.fits outfile=/scratch/kocevski/66705/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin804.fits ra=160.15 dec=6.2848 rad=12.0 tmin=447724801.0 tmax=447984001.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.46
user 3.19
sys 0.19

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

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

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

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/66705/ft1_filtered_4FGL_J1040.5+0617_daily_bin804.fits evtable="EVENTS" scfile=/scratch/kocevski/66705/ft2_4FGL_J1040.5+0617_daily_bin804.fits sctable="SC_DATA" expcube=/scratch/kocevski/66705/ltcube_447724801_447984001_4FGL_J1040.5+0617_daily_bin804.fits outfile=/scratch/kocevski/66705/expmap_447724801_447984001_4FGL_J1040.5+0617_daily_bin804.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/66705/ltcube_447724801_447984001_4FGL_J1040.5+0617_daily_bin804.fits
.....................!
real 193.78
user 187.65
sys 5.26

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/66705/ft1_filtered_4FGL_J1040.5+0617_daily_bin804.fits scfile=/scratch/kocevski/66705/ft2_4FGL_J1040.5+0617_daily_bin804.fits outfile=/scratch/kocevski/66705/cmap_447724801_447984001_4FGL_J1040.5+0617_daily_bin804.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.37
sys 0.16

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/66705/ft1_filtered_4FGL_J1040.5+0617_daily_bin804.fits scfile=/scratch/kocevski/66705/ft2_4FGL_J1040.5+0617_daily_bin804.fits outfile=/scratch/kocevski/66705/cmap_HighResolution_447724801_447984001_4FGL_J1040.5+0617_daily_bin804.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.40
sys 0.15

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    4.2036       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10082E-03   1.0000         .10000E-03   10000.    
     3 'norm      '    .11551E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10092E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    67.586       1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10695E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .17019E-02   1.0000         .10000E-03   10000.    
     8 'norm      '    2.1844       1.0000         .10000E-03   10000.    
     9 'Prefactor '    10.124       1.0000         .10000E-03   10000.    
    10 'Prefactor '    2.8886       1.0000         .10000E-03   10000.    
    11 'Prefactor '    6.2769       1.0000         .10000E-03   10000.    
    12 'Prefactor '    12.228       1.0000         .10000E-03   10000.    
    13 'norm      '    2.7584       1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10016E-03   1.0000         .10000E-03   10000.    
    15 'norm      '    6.1017       1.0000         .10000E-03   10000.    
    16 'Prefactor '    .10040E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    .10030E-03   1.0000         .10000E-03   10000.    
    18 'Normalizat'    1.1036       1.0000         .10000E-01   10.000    
    19 'Prefactor '    1.0182       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5360E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   5732.276     FROM MIGRAD    STATUS=CONVERGED    378 CALLS     1879 TOTAL
                     EDM=   .11E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.9%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     4.2026        9.8744        .84476E-05    .32190E-03
   2  Prefactor     .10000E-03    40.553       -.26195E-06** at limit **
   3  norm          .10000E-03    13.330       -.34811E-05** at limit **
   4  Prefactor     .10000E-03    5.3235       -.13274E-05** at limit **
   5  Prefactor     67.492        62.305       -.97923E-06   -.12164E-03
   6  Prefactor     .10000E-03    38.407       -.24719E-05** at limit **
   7  Prefactor     .10027E-03    12.038       -.40444E-05** at limit **
   8  norm          2.1842        1.6156        .70093E-07    .29392E-03
   9  Prefactor     10.126        8.3152       -.42545E-07    .34644E-04
  10  Prefactor     2.8896        3.2566        .66401E-07    .12067E-03
  11  Prefactor     6.2806        7.2526       -.14333E-06    .23673E-04
  12  Prefactor     12.229        11.487        .58799E-08    .66702E-04
  13  norm          2.7579        .86496        .16282E-06    .28334E-03
  14  Prefactor     .10000E-03    27.508        .14503E-05** at limit **
  15  norm          6.1027        1.8147       -.12068E-06    .60661E-04
  16  Prefactor     .10000E-03    18.257       -.10695E-06** at limit **
  17  norm          .10000E-03    9.8200        .29886E-06** at limit **
  18  Normalizat    1.1029        .22553        .54559E-05    .13350E-03
  19  Prefactor     1.0186        .18567       -.43086E-05    .44687E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 4.20256
  Prefactor  = 0.000100001
  norm       = 0.000100001
  Prefactor  = 0.0001
  Prefactor  = 67.4916
  Prefactor  = 0.0001
  Prefactor  = 0.000100268
  norm       = 2.18417
  Prefactor  = 10.1255
  Prefactor  = 2.88957
  Prefactor  = 6.28061
  Prefactor  = 12.2292
  norm       = 2.75791
  Prefactor  = 0.0001
  norm       = 6.10267
  Prefactor  = 0.000100001
  norm       = 0.0001
  Normalizat = 1.10292
  Prefactor  = 1.01858
 **********
 **   18 **HESSE 
 **********

 FCN=   5732.276     FROM HESSE     STATUS=OK           270 CALLS     2149 TOTAL
                     EDM=   .64E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     4.2026        10.044        .98278E-03   -1.5298    
   2  Prefactor     .10000E-03    40.670        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          .10000E-03    13.576        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10000E-03    5.3568        .17081E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     67.492        61.740        .24411E-03   -1.4063    
   6  Prefactor     .10000E-03    38.503        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10027E-03    47.824        .47903E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          2.1842        1.6073        .78869E-04   -1.5412    
   9  Prefactor     10.126        8.3075        .12593E-03   -1.5071    
  10  Prefactor     2.8896        3.2381        .13576E-03   -1.5368    
  11  Prefactor     6.2806        7.2601        .16022E-03   -1.5207    
  12  Prefactor     12.229        11.481        .11455E-03   -1.5008    
  13  norm          2.7579        .85876        .36649E-04   -1.5376    
  14  Prefactor     .10000E-03    28.079        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          6.1027        1.8203        .52949E-04   -1.5214    
  16  Prefactor     .10000E-03    18.362        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          .10000E-03    9.9661        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Normalizat    1.1029        .25550        .27646E-03   -.89658    
  19  Prefactor     1.0186        .20904        .24961E-03   -.92113    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 6.36876e-09
Minuit parameter uncertainties:
  1  10.048
  2  0.000303836
  3  0.00017392
  4  3.39097e-05
  5  61.7989
  6  0.000110425
  7  0.00716029
  8  1.60736
  9  8.30843
  10  3.23834
  11  7.26113
  12  11.4832
  13  0.858764
  14  6.93692e-05
  15  1.82036
  16  0.000211505
  17  6.52263e-06
  18  0.255791
  19  0.20921
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  2.890e+00  3.238e+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.019e+00  2.092e-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:  1.103e+00  2.558e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 1.12
Ra Dec: 160.150 6.285
Photon Index (Fixed Index): 2.37 +/- 0.00
Photon Flux (Fixed Index): 3.49e-08 +/- 3.91e-08
Energy Flux (Fixed Index): 1.20e-05 +/- 1.34e-05

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

Saving results to:
/scratch/kocevski/66705/likelihoodResults_447724801_447984001_4FGL_J1040.5+0617_daily_bin804.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) = 5732.26103135
delta logL = 0.0148995858344

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 5732.25517583
delta logL = 0.0207551063895

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    2.5298       1.0000         .10000E-03   10000.    
     2 'Index     '    2.5391       1.0000          .0000       10.000    
     3 'Normalizat'    1.0970       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.0220       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=   5732.255     FROM MIGRAD    STATUS=CONVERGED     54 CALLS      208 TOTAL
                     EDM=   .77E-10    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     2.5257        83.688        .64202E-02    .47880E-03
   2  Index         2.5394        6.1640        .17688        .70540E-04
   3  Normalizat    1.0971        .74120E-01    .62642E-01   -.72805E-05
   4  Prefactor     1.0221        .60292E-01    .41942E-01   -.23778E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 2.52569
  Index      = 2.53943
  Normalizat = 1.09708
  Prefactor  = 1.02209
 **********
 **   18 **HESSE 
 **********

 FCN=   5732.255     FROM HESSE     STATUS=OK            33 CALLS      241 TOTAL
                     EDM=   .37E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     2.5257        3.7268        .12406E-03   -1.5390    
   2  Index         2.5394        .93555        .91136E-02   -.51452    
   3  Normalizat    1.0971        .23870        .27708E-03   -.89846    
   4  Prefactor     1.0221        .20724        .24923E-03   -.91997    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.74738e-09
Minuit parameter uncertainties:
  1  3.72716
  2  0.942907
  3  0.238936
  4  0.2074
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/66705': 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) = 5732.2551743
delta logL = 0.0207566361642

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  2.526e+00  3.727e+00  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  2.539e+00  9.429e-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.022e+00  2.074e-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:  1.097e+00  2.389e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 1.17
Ra Dec: 160.150 6.285
Photon Index (Free Index): 2.54 +/- 0.94
Photon Flux (Free Index): 3.93e-08 +/- 4.52e-08
Energy Flux (Free Index): 1.09e-05 +/- 1.33e-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/66705/cmap_HighResolution_447724801_447984001_4FGL_J1040.5+0617_daily_bin804.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='9.44e-03', comment='SUCCESS', photon_flux='3.49e-08', energy_flux2='1.09e-05', photon_flux_error='3.91e-08', dlogl='2.08e-02', energy_flux='1.20e-05', photon_flux2='3.93e-08', job_status='DONE', time_completed='2021-09-02 08:38:18.371863', photon_index_error2='0.94', photon_index2='2.54', ts='1.12', fit_tolerance='1e-08', GAL='1.02', photon_index_error='0.00', photon_flux_upper_limit='1.22e-07', energy_flux_error2='1.33e-05', EG='1.10', time_epoch_completed='1630597098.37', return_code='0', job_id='66705', GAL2='1.02', EG2='1.10', return_code2='0', energy_flux_error='1.34e-05', photon_flux_error2='4.52e-08', ts2='1.17', photon_index='2.37' WHERE bin_id='804' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:38:18 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0156>
Subject: Job 66705: <4FGL_J1040.5+0617_daily_bin804> in cluster <slac> Done

Job <4FGL_J1040.5+0617_daily_bin804> was submitted from host <rhel6-64l> by user <kocevski> in cluster <slac> at Thu Sep  2 08:26:06 2021
Job was executed on host(s) <bullet0156>, in queue <medium>, as user <kocevski> in cluster <slac> at Thu Sep  2 08:26:10 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Thu Sep  2 08:26:10 2021
Terminated at Thu Sep  2 08:38:19 2021
Results reported at Thu Sep  2 08:38:19 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin804 160.15 6.2848 447724801 447984001 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 :                                   566.24 sec.
    Max Memory :                                 1093 MB
    Average Memory :                             261.79 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   728 sec.
    Turnaround time :                            733 sec.

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

