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


Performing analysis on: 4FGL_J1040.5+0617_daily_bin1103
RA = 160.15, Dec = 6.2848
tmin = 525225601, tmax = 525484801
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='68024', job_status='RUN', time_executed='2021-09-02 08:36:32.779652', time_epoch_executed='1630596992.78' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='1103'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/68024

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/68024/ft1_4FGL_J1040.5+0617_daily_bin1103.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/68024/ft2_4FGL_J1040.5+0617_daily_bin1103.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/68024/ft1_4FGL_J1040.5+0617_daily_bin1103.fits outfile=/scratch/kocevski/68024/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin1103.fits ra=160.15 dec=6.2848 rad=12.0 tmin=525225601.0 tmax=525484801.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 4.14
user 3.88
sys 0.21

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/68024/ft2_4FGL_J1040.5+0617_daily_bin1103.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/68024/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin1103.fits evtable="EVENTS" outfile="/scratch/kocevski/68024/ft1_filtered_4FGL_J1040.5+0617_daily_bin1103.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.56
user 0.34
sys 0.17

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

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/68024/ft1_filtered_4FGL_J1040.5+0617_daily_bin1103.fits evtable="EVENTS" scfile=/scratch/kocevski/68024/ft2_4FGL_J1040.5+0617_daily_bin1103.fits sctable="SC_DATA" expcube=/scratch/kocevski/68024/ltcube_525225601_525484801_4FGL_J1040.5+0617_daily_bin1103.fits outfile=/scratch/kocevski/68024/expmap_525225601_525484801_4FGL_J1040.5+0617_daily_bin1103.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/68024/ltcube_525225601_525484801_4FGL_J1040.5+0617_daily_bin1103.fits
.....................!
real 192.75
user 186.70
sys 5.14

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/68024/ft1_filtered_4FGL_J1040.5+0617_daily_bin1103.fits scfile=/scratch/kocevski/68024/ft2_4FGL_J1040.5+0617_daily_bin1103.fits outfile=/scratch/kocevski/68024/cmap_525225601_525484801_4FGL_J1040.5+0617_daily_bin1103.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.59
user 0.40
sys 0.16

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/68024/ft1_filtered_4FGL_J1040.5+0617_daily_bin1103.fits scfile=/scratch/kocevski/68024/ft2_4FGL_J1040.5+0617_daily_bin1103.fits outfile=/scratch/kocevski/68024/cmap_HighResolution_525225601_525484801_4FGL_J1040.5+0617_daily_bin1103.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.57
user 0.41
sys 0.15

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10055E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    .11386E-03   1.0000         .10000E-03   10000.    
     3 'norm      '    30.032       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .56004       1.0000         .10000E-03   10000.    
     5 'Prefactor '    119.24       1.0000         .10000E-03   10000.    
     6 'Prefactor '    137.28       1.0000         .10000E-03   10000.    
     7 'Prefactor '    .11365E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    4.6653       1.0000         .10000E-03   10000.    
     9 'Prefactor '    4.4009       1.0000         .10000E-03   10000.    
    10 'Prefactor '    10.046       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .29589       1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10028E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    15 'norm      '    .27695E-03   1.0000         .10000E-03   10000.    
    16 'Prefactor '    .10402E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    .10007E-03   1.0000         .10000E-03   10000.    
    18 'Normalizat'    1.1982       1.0000         .10000E-01   10.000    
    19 'Prefactor '    1.3300       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=   6052.978     FROM MIGRAD    STATUS=CONVERGED    424 CALLS     1999 TOTAL
                     EDM=   .25E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  6.1%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    9.0696       -.98814E-06** at limit **
   2  Prefactor     .10000E-03    145.41       -.18225E-05** at limit **
   3  norm          30.026        23.474       -.32508E-06   -.94185E-04
   4  Prefactor     .54908        55.716        .57794E-05   -.13553E-04
   5  Prefactor     119.23        106.31       -.20435E-06   -.33162E-04
   6  Prefactor     137.12        82.961       -.50742E-06    .12601E-04
   7  Prefactor     .10000E-03    14.312        .17663E-05** at limit **
   8  norm          4.6651        1.8548       -.39175E-07   -.30210E-04
   9  Prefactor     4.4022        8.2793       -.51687E-06   -.16912E-04
  10  Prefactor     10.046        4.8821        .79250E-08    .61194E-04
  11  Prefactor     .30174        5.9708        .10915E-05   -.65138E-04
  12  Prefactor     .10000E-03    4.3805       -.36958E-06** at limit **
  13  norm          .10000E-03    .21003       -.78144E-07** at limit **
  14  Prefactor     .10000E-03    1.8403       -.85408E-07** at limit **
  15  norm          .10000E-03    .62458        .49669E-07** at limit **
  16  Prefactor     .10000E-03    43.063       -.15837E-05** at limit **
  17  norm          .10000E-03    20.495       -.96670E-06** at limit **
  18  Normalizat    1.1981        .24815       -.13706E-05    .30725E-03
  19  Prefactor     1.3299        .21750        .26410E-05    .13018E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 0.000100001
  norm       = 30.0262
  Prefactor  = 0.549078
  Prefactor  = 119.234
  Prefactor  = 137.12
  Prefactor  = 0.0001
  norm       = 4.66515
  Prefactor  = 4.40221
  Prefactor  = 10.0456
  Prefactor  = 0.301739
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Normalizat = 1.19806
  Prefactor  = 1.3299
 **********
 **   18 **HESSE 
 **********

 FCN=   6052.978     FROM HESSE     STATUS=OK           270 CALLS     2269 TOTAL
                     EDM=   .42E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    9.1317        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    148.26        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          30.026        23.486        .73111E-04   -1.4611    
   4  Prefactor     .54908        62.128        .40052E-02   -1.5560    
   5  Prefactor     119.23        107.46        .18426E-03   -1.3520    
   6  Prefactor     137.12        84.701        .17188E-03   -1.3361    
   7  Prefactor     .10000E-03    14.530        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          4.6651        1.8538        .64284E-04   -1.5276    
   9  Prefactor     4.4022        8.2879        .19198E-03   -1.5288    
  10  Prefactor     10.046        4.8966        .11297E-03   -1.5074    
  11  Prefactor     .30174        36.380        .29087E-02   -1.5598    
  12  Prefactor     .10000E-03    4.4280        .15924E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          .10000E-03    .52944        .68133E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     .10000E-03    1.8421        .10309E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          .10000E-03    3.7672        .11721E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     .10000E-03    45.241        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          .10000E-03    21.139        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Normalizat    1.1981        .27248        .29447E-03   -.86663    
  19  Prefactor     1.3299        .22904        .25080E-03   -.82422    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 4.22935e-08
Minuit parameter uncertainties:
  1  3.58589e-05
  2  0.000675764
  3  23.4928
  4  11.6927
  5  107.632
  6  84.7764
  7  0.000139266
  8  1.85379
  9  8.29004
  10  4.89684
  11  6.62941
  12  1.52084e-05
  13  7.56618e-06
  14  2.03596e-06
  15  2.6502e-05
  16  0.000221556
  17  9.08224e-05
  18  0.272805
  19  0.229217
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  1.005e+01  4.897e+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.330e+00  2.292e-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.198e+00  2.728e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 6.74
Ra Dec: 160.150 6.285
Photon Index (Fixed Index): 2.37 +/- 0.00
Photon Flux (Fixed Index): 1.21e-07 +/- 5.91e-08
Energy Flux (Fixed Index): 4.15e-05 +/- 2.03e-05

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) = 6051.95901026
delta logL = 1.01876104425

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 6051.94703021
delta logL = 1.03074108984

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    4.4139       1.0000         .10000E-03   10000.    
     2 'Index     '    3.1656       1.0000          .0000       10.000    
     3 'Normalizat'    1.1021       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.3900       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=   6051.947     FROM MIGRAD    STATUS=CONVERGED     82 CALLS      278 TOTAL
                     EDM=   .67E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     4.4132        6.4811        .63000E-04   -.49048E-03
   2  Index         3.1657        .91678        .36733E-02   -.13515E-03
   3  Normalizat    1.1021        .26849        .30475E-03   -.31310E-03
   4  Prefactor     1.3900        .23431        .24624E-03   -.59193E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 4.4132
  Index      = 3.16567
  Normalizat = 1.10212
  Prefactor  = 1.38997
 **********
 **   18 **HESSE 
 **********

 FCN=   6051.947     FROM HESSE     STATUS=OK            25 CALLS      303 TOTAL
                     EDM=   .66E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     4.4132        4.7968        .25200E-05   -1.5288    
   2  Index         3.1657        .67978        .14693E-03   -.37564    
   3  Normalizat    1.1021        .26570        .60950E-04   -.89684    
   4  Prefactor     1.3900        .23176        .49248E-04   -.80670    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 6.63896e-10
Minuit parameter uncertainties:
  1  4.79717
  2  0.682221
  3  0.266028
  4  0.231936
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/68024': 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) = 6051.94703018
delta logL = 1.03074111879

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  4.413e+00  4.797e+00  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  3.166e+00  6.822e-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.390e+00  2.319e-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.102e+00  2.660e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 9.12
Ra Dec: 160.150 6.285
Photon Index (Free Index): 3.17 +/- 0.68
Photon Flux (Free Index): 1.88e-07 +/- 8.33e-08
Energy Flux (Free Index): 3.49e-05 +/- 1.51e-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/68024/cmap_HighResolution_525225601_525484801_4FGL_J1040.5+0617_daily_bin1103.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='1.21e-07', energy_flux2='3.49e-05', photon_flux_error='5.91e-08', dlogl='1.03e+00', energy_flux='4.15e-05', photon_flux2='1.88e-07', job_status='DONE', time_completed='2021-09-02 08:46:12.823837', photon_index_error2='0.68', photon_index2='3.17', ts='6.74', fit_tolerance='1e-08', GAL='1.33', photon_index_error='0.00', energy_flux_error2='1.51e-05', EG='1.20', time_epoch_completed='1630597572.82', return_code='0', job_id='68024', GAL2='1.39', EG2='1.10', return_code2='0', energy_flux_error='2.03e-05', photon_flux_error2='8.33e-08', ts2='9.12', photon_index='2.37' WHERE bin_id='1103' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:46:12 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0262>
Subject: Job 68024: <4FGL_J1040.5+0617_daily_bin1103> in cluster <slac> Done

Job <4FGL_J1040.5+0617_daily_bin1103> was submitted from host <rhel6-64j> by user <kocevski> in cluster <slac> at Thu Sep  2 08:31:31 2021
Job was executed on host(s) <bullet0262>, in queue <medium>, as user <kocevski> in cluster <slac> at Thu Sep  2 08:33:00 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:33:00 2021
Terminated at Thu Sep  2 08:46:13 2021
Results reported at Thu Sep  2 08:46:13 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin1103 160.15 6.2848 525225601 525484801 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 :                                   558.00 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             289.37 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   793 sec.
    Turnaround time :                            882 sec.

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

