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


Performing analysis on: 4FGL_J1040.5+0617_daily_bin794
RA = 160.15, Dec = 6.2848
tmin = 445132801, tmax = 445392001
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='66691', job_status='RUN', time_executed='2021-09-02 08:28:58.764745', time_epoch_executed='1630596538.76' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='794'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/66691

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

Retrieving the FT1 file...

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

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

Retrieving 48 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/66691/ft1_4FGL_J1040.5+0617_daily_bin794.fits


Retrieving the FT1 file...

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

Retrieving 48 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/66691/ft2_4FGL_J1040.5+0617_daily_bin794.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/66691/ft1_4FGL_J1040.5+0617_daily_bin794.fits outfile=/scratch/kocevski/66691/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin794.fits ra=160.15 dec=6.2848 rad=12.0 tmin=445132801.0 tmax=445392001.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.65
user 3.42
sys 0.19

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/66691/ft1_filtered_4FGL_J1040.5+0617_daily_bin794.fits" evtable="EVENTS" scfile=/scratch/kocevski/66691/ft2_4FGL_J1040.5+0617_daily_bin794.fits sctable="SC_DATA" outfile=/scratch/kocevski/66691/ltcube_445132801_445392001_4FGL_J1040.5+0617_daily_bin794.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/66691/ft2_4FGL_J1040.5+0617_daily_bin794.fits
.....................!
real 14.31
user 13.95
sys 0.32

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/66691/ft1_filtered_4FGL_J1040.5+0617_daily_bin794.fits evtable="EVENTS" scfile=/scratch/kocevski/66691/ft2_4FGL_J1040.5+0617_daily_bin794.fits sctable="SC_DATA" expcube=/scratch/kocevski/66691/ltcube_445132801_445392001_4FGL_J1040.5+0617_daily_bin794.fits outfile=/scratch/kocevski/66691/expmap_445132801_445392001_4FGL_J1040.5+0617_daily_bin794.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/66691/ltcube_445132801_445392001_4FGL_J1040.5+0617_daily_bin794.fits
.....................!
real 190.34
user 185.63
sys 4.19

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/66691/ft1_filtered_4FGL_J1040.5+0617_daily_bin794.fits scfile=/scratch/kocevski/66691/ft2_4FGL_J1040.5+0617_daily_bin794.fits outfile=/scratch/kocevski/66691/cmap_445132801_445392001_4FGL_J1040.5+0617_daily_bin794.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.54
user 0.38
sys 0.15

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

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    4.7223       1.0000         .10000E-03   10000.    
     2 'Prefactor '    26.967       1.0000         .10000E-03   10000.    
     3 'norm      '    .10162E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10038E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    .19391E-02   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10084E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    11.967       1.0000         .10000E-03   10000.    
     8 'norm      '    6.2240       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10023E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    11.248       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10016E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    5.4174       1.0000         .10000E-03   10000.    
    13 'norm      '    3.1420       1.0000         .10000E-03   10000.    
    14 'Prefactor '    1.5100       1.0000         .10000E-03   10000.    
    15 'norm      '    3.5446       1.0000         .10000E-03   10000.    
    16 'Prefactor '    .10012E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    18 'Normalizat'    .59221       1.0000         .10000E-01   10.000    
    19 'Prefactor '    1.2163       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=   6893.623     FROM MIGRAD    STATUS=CONVERGED    394 CALLS     1676 TOTAL
                     EDM=   .86E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.1%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     4.7283        11.282       -.47670E-05   -.46794E-03
   2  Prefactor     26.980        38.694        .18493E-05    .96313E-04
   3  norm          .10000E-03    7.2292       -.18630E-06** at limit **
   4  Prefactor     .10000E-03    3.6536        .13458E-07** at limit **
   5  Prefactor     .10001E-03    300.20       -.61067E-05** at limit **
   6  Prefactor     .10000E-03    22.550       -.34873E-06** at limit **
   7  Prefactor     11.968        12.814       -.10765E-05   -.24007E-03
   8  norm          6.2238        1.8039       -.19544E-07    .42981E-05
   9  Prefactor     .10000E-03    4.7018        .89132E-07** at limit **
  10  Prefactor     11.248        3.8050       -.13501E-06   -.61355E-05
  11  Prefactor     .10000E-03    3.4970        .57105E-08** at limit **
  12  Prefactor     5.4173        5.2804        .19489E-05   -.15026E-02
  13  norm          3.1421        .82615       -.26885E-07    .26313E-04
  14  Prefactor     1.5085        12.748       -.39626E-06   -.26027E-03
  15  norm          3.5446        1.4585       -.22114E-07   -.45685E-04
  16  Prefactor     .10000E-03    9.6394        .40643E-07** at limit **
  17  norm          .10000E-03    3.9723       -.27657E-07** at limit **
  18  Normalizat    .59213        .19126        .11124E-05    .12417E-04
  19  Prefactor     1.2164        .16322       -.48044E-06    .95761E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 4.72834
  Prefactor  = 26.9801
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.000100008
  Prefactor  = 0.0001
  Prefactor  = 11.9683
  norm       = 6.22383
  Prefactor  = 0.0001
  Prefactor  = 11.2481
  Prefactor  = 0.0001
  Prefactor  = 5.4173
  norm       = 3.1421
  Prefactor  = 1.50846
  norm       = 3.5446
  Prefactor  = 0.0001
  norm       = 0.0001
  Normalizat = 0.59213
  Prefactor  = 1.21644
 **********
 **   18 **HESSE 
 **********

 FCN=   6893.623     FROM HESSE     STATUS=OK           266 CALLS     1942 TOTAL
                     EDM=   .27E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     4.7283        12.037        .18517E-03   -1.5273    
   2  Prefactor     26.980        38.785        .77144E-04   -1.4669    
   3  norm          .10000E-03    7.2380        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10000E-03    3.6674        .15502E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .10001E-03    303.22        .40513E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    22.553        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     11.968        12.859        .11580E-03   -1.5016    
   8  norm          6.2238        1.8030        .56851E-04   -1.5209    
   9  Prefactor     .10000E-03    4.7927        .17559E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     11.248        3.8119        .89179E-04   -1.5037    
  11  Prefactor     .10000E-03    3.5575        .15157E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     5.4173        6.1053        .86324E-03   -1.5242    
  13  norm          3.1421        .83024        .30511E-04   -1.5353    
  14  Prefactor     1.5085        13.179        .34810E-03   -1.5462    
  15  norm          3.5446        1.4577        .61574E-04   -1.5331    
  16  Prefactor     .10000E-03    9.6844        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          .10000E-03    3.9939        .16161E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Normalizat    .59213        .21497        .33539E-03   -1.0832    
  19  Prefactor     1.2164        .18459        .21398E-03   -.85827    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.72712e-09
Minuit parameter uncertainties:
  1  12.0433
  2  38.8209
  3  7.71347e-05
  4  3.00293e-05
  5  0.00310412
  6  4.54098e-05
  7  12.8618
  8  1.80302
  9  1.24008e-05
  10  3.812
  11  5.69357e-06
  12  6.10599
  13  0.830246
  14  8.91958
  15  1.45767
  16  5.00186e-06
  17  3.62112e-06
  18  0.215272
  19  0.18469
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  1.125e+01  3.812e+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.216e+00  1.847e-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:  5.921e-01  2.153e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 23.65
Ra Dec: 160.150 6.285
Photon Index (Fixed Index): 2.37 +/- 0.00
Photon Flux (Fixed Index): 1.36e-07 +/- 4.60e-08
Energy Flux (Fixed Index): 4.65e-05 +/- 1.58e-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) = 6892.92409629
delta logL = 0.698435722961

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 6892.92229303
delta logL = 0.700238990927

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    13.220       1.0000         .10000E-03   10000.    
     2 'Index     '    2.0079       1.0000          .0000       10.000    
     3 'Normalizat'    .63490       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.1935       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=   6892.922     FROM MIGRAD    STATUS=CONVERGED     48 CALLS      237 TOTAL
                     EDM=   .52E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     13.220        9.3216        .27542E-02   -.26752E-02
   2  Index         2.0079        .53095        .13213        .32642E-04
   3  Normalizat    .63493        .18766        .73411E-01    .33259E-04
   4  Prefactor     1.1935        .16312        .34787E-01    .12473E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 13.2197
  Index      = 2.00789
  Normalizat = 0.63493
  Prefactor  = 1.19347
 **********
 **   18 **HESSE 
 **********

 FCN=   6892.922     FROM HESSE     STATUS=OK            31 CALLS      268 TOTAL
                     EDM=   .14E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     13.220        4.7643        .10418E-03   -1.4981    
   2  Index         2.0079        .29846        .52754E-02   -.64153    
   3  Normalizat    .63493        .20988        .32498E-03   -1.0652    
   4  Prefactor     1.1935        .18427        .21584E-03   -.86533    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.43223e-09
Minuit parameter uncertainties:
  1  4.76441
  2  0.298739
  3  0.210143
  4  0.184374
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/66691': 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) = 6892.92229301
delta logL = 0.700239002991

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  1.322e+01  4.764e+00  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  2.008e+00  2.987e-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.193e+00  1.844e-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:  6.349e-01  2.101e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 24.87
Ra Dec: 160.150 6.285
Photon Index (Free Index): 2.01 +/- 0.30
Photon Flux (Free Index): 9.96e-08 +/- 4.79e-08
Energy Flux (Free Index): 6.75e-05 +/- 3.67e-05

Creating a high resolution counts map...
INFO: Auto-setting vmin to -2.500e-04 [aplpy.core]
INFO: Auto-setting vmax to  2.775e-03 [aplpy.core]
Saving /scratch/kocevski/66691/cmap_HighResolution_445132801_445392001_4FGL_J1040.5+0617_daily_bin794.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='1.36e-07', energy_flux2='6.75e-05', photon_flux_error='4.60e-08', dlogl='7.00e-01', energy_flux='4.65e-05', photon_flux2='9.96e-08', job_status='DONE', time_completed='2021-09-02 08:38:06.264209', photon_index_error2='0.30', photon_index2='2.01', ts='23.65', fit_tolerance='1e-08', GAL='1.22', photon_index_error='0.00', energy_flux_error2='3.67e-05', EG='0.59', time_epoch_completed='1630597086.26', return_code='0', job_id='66691', GAL2='1.19', EG2='0.63', return_code2='0', energy_flux_error='1.58e-05', photon_flux_error2='4.79e-08', ts2='24.87', photon_index='2.37' WHERE bin_id='794' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:38:06 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0166>
Subject: Job 66691: <4FGL_J1040.5+0617_daily_bin794> in cluster <slac> Done

Job <4FGL_J1040.5+0617_daily_bin794> was submitted from host <rhel6-64l> by user <kocevski> in cluster <slac> at Thu Sep  2 08:26:05 2021
Job was executed on host(s) <bullet0166>, in queue <medium>, as user <kocevski> in cluster <slac> at Thu Sep  2 08:26:07 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:07 2021
Terminated at Thu Sep  2 08:38:06 2021
Results reported at Thu Sep  2 08:38:06 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin794 160.15 6.2848 445132801 445392001 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 :                                   546.00 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             313.73 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   719 sec.
    Turnaround time :                            721 sec.

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

