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


Performing analysis on: 4FGL_J1040.5+0617_daily_bin431
RA = 160.15, Dec = 6.2848
tmin = 351043201, tmax = 351302401
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='64315', job_status='RUN', time_executed='2021-09-02 08:20:54.434125', time_epoch_executed='1630596054.43' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='431'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/64315

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/64315/ft1_4FGL_J1040.5+0617_daily_bin431.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/64315/ft2_4FGL_J1040.5+0617_daily_bin431.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/64315/ft1_4FGL_J1040.5+0617_daily_bin431.fits outfile=/scratch/kocevski/64315/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin431.fits ra=160.15 dec=6.2848 rad=12.0 tmin=351043201.0 tmax=351302401.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.23
sys 0.19

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/64315/ft1_filtered_4FGL_J1040.5+0617_daily_bin431.fits" evtable="EVENTS" scfile=/scratch/kocevski/64315/ft2_4FGL_J1040.5+0617_daily_bin431.fits sctable="SC_DATA" outfile=/scratch/kocevski/64315/ltcube_351043201_351302401_4FGL_J1040.5+0617_daily_bin431.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/64315/ft2_4FGL_J1040.5+0617_daily_bin431.fits
.....................!
real 15.53
user 15.18
sys 0.30

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/64315/ft1_filtered_4FGL_J1040.5+0617_daily_bin431.fits evtable="EVENTS" scfile=/scratch/kocevski/64315/ft2_4FGL_J1040.5+0617_daily_bin431.fits sctable="SC_DATA" expcube=/scratch/kocevski/64315/ltcube_351043201_351302401_4FGL_J1040.5+0617_daily_bin431.fits outfile=/scratch/kocevski/64315/expmap_351043201_351302401_4FGL_J1040.5+0617_daily_bin431.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/64315/ltcube_351043201_351302401_4FGL_J1040.5+0617_daily_bin431.fits
.....................!
real 191.35
user 186.94
sys 3.93

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/64315/ft1_filtered_4FGL_J1040.5+0617_daily_bin431.fits scfile=/scratch/kocevski/64315/ft2_4FGL_J1040.5+0617_daily_bin431.fits outfile=/scratch/kocevski/64315/cmap_351043201_351302401_4FGL_J1040.5+0617_daily_bin431.fits algorithm="CMAP" ebinalg="LOG" emin=30.0 emax=200000.0 ebinfile=NONE tbinalg="LIN" tbinfile=NONE nxpix=160 nypix=160 binsz=0.25 coordsys="CEL" xref=160.15 yref=6.2848 axisrot=0.0 rafield="RA" decfield="DEC" proj="AIT" hpx_ordering_scheme="RING" hpx_order=3 hpx_ebin=yes hpx_region="" evtable="EVENTS" sctable="SC_DATA" efield="ENERGY" tfield="TIME" chatter=2 clobber=yes debug=no gui=no mode="ql"

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

This is gtbin version HEAD
real 0.56
user 0.40
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/64315/ft1_filtered_4FGL_J1040.5+0617_daily_bin431.fits scfile=/scratch/kocevski/64315/ft2_4FGL_J1040.5+0617_daily_bin431.fits outfile=/scratch/kocevski/64315/cmap_HighResolution_351043201_351302401_4FGL_J1040.5+0617_daily_bin431.fits algorithm="CMAP" ebinalg="LOG" emin=30.0 emax=200000.0 ebinfile=NONE tbinalg="LIN" tbinfile=NONE nxpix=500 nypix=500 binsz=0.1 coordsys="CEL" xref=160.15 yref=6.2848 axisrot=0.0 rafield="RA" decfield="DEC" proj="AIT" hpx_ordering_scheme="RING" hpx_order=3 hpx_ebin=yes hpx_region="" evtable="EVENTS" sctable="SC_DATA" efield="ENERGY" tfield="TIME" chatter=2 clobber=yes debug=no gui=no mode="ql"

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

This is gtbin version HEAD
real 0.56
user 0.41
sys 0.14

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10008E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     3 'norm      '    .10011E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    2.3305       1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10176E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .12584E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10156E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    .10208E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    1.3835       1.0000         .10000E-03   10000.    
    10 'Prefactor '    7.1674       1.0000         .10000E-03   10000.    
    11 'Prefactor '    8.2431       1.0000         .10000E-03   10000.    
    12 'Prefactor '    11.843       1.0000         .10000E-03   10000.    
    13 'norm      '    1.5215       1.0000         .10000E-03   10000.    
    14 'Prefactor '    16.536       1.0000         .10000E-03   10000.    
    15 'norm      '    .10005E-03   1.0000         .10000E-03   10000.    
    16 'Prefactor '    7.8966       1.0000         .10000E-03   10000.    
    17 'norm      '    .10002E-03   1.0000         .10000E-03   10000.    
    18 'Normalizat'    .59850       1.0000         .10000E-01   10.000    
    19 'Prefactor '    1.2420       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=   4748.281     FROM MIGRAD    STATUS=CONVERGED    390 CALLS     1659 TOTAL
                     EDM=   .32E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    4.5043        .90712E-02** at limit **
   2  Prefactor     .10000E-03    13.459        .90712E-02** at limit **
   3  norm          .10000E-03    6.0652        .90712E-02** at limit **
   4  Prefactor     2.3223        7.8412        .67158E-02   -.39467E-03
   5  Prefactor     .10000E-03    31.223        .90712E-02** at limit **
   6  Prefactor     .10000E-03    71.112        .90712E-02** at limit **
   7  Prefactor     .10000E-03    8.2191        .90712E-02** at limit **
   8  norm          .10000E-03    .95316        .23125E-01** at limit **
   9  Prefactor     1.3834        13.372        .92470E-02    .71441E-03
  10  Prefactor     7.1674        4.0131        .37458E-02    .92761E-04
  11  Prefactor     8.2432        7.0313        .34909E-02   -.14881E-03
  12  Prefactor     11.843        9.0939        .29102E-02    .43913E-03
  13  norm          1.5216        .78280        .84586E-02    .36371E-03
  14  Prefactor     16.534        11.978        .24623E-02    .17880E-03
  15  norm          .10000E-03    .44521        .90712E-02** at limit **
  16  Prefactor     7.8980        24.460        .35672E-02   -.77288E-04
  17  norm          .10000E-03    5.6023        .90712E-02** at limit **
  18  Normalizat    .59843        .20906        .69743E-01    .47547E-04
  19  Prefactor     1.2421        .18130        .33706E-01    .59006E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 2.32231
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 1.38345
  Prefactor  = 7.16738
  Prefactor  = 8.2432
  Prefactor  = 11.843
  norm       = 1.52164
  Prefactor  = 16.5341
  norm       = 0.0001
  Prefactor  = 7.898
  norm       = 0.0001
  Normalizat = 0.598426
  Prefactor  = 1.24208
 **********
 **   18 **HESSE 
 **********

 FCN=   4748.281     FROM HESSE     STATUS=OK           270 CALLS     1929 TOTAL
                     EDM=   .18E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    4.5111        .14281E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    13.466        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          .10000E-03    6.0699        .16573E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     2.3223        7.7932        .26863E-03   -1.5403    
   5  Prefactor     .10000E-03    31.260        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    71.169        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    8.2206        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          .10000E-03    2.1293        .12901E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     1.3834        13.138        .36988E-03   -1.5473    
  10  Prefactor     7.1674        4.0148        .96420E-04   -1.5172    
  11  Prefactor     8.2432        7.0402        .13964E-03   -1.5134    
  12  Prefactor     11.843        9.0806        .11641E-03   -1.5020    
  13  norm          1.5216        .79237        .37477E-04   -1.5461    
  14  Prefactor     16.534        12.176        .98491E-04   -1.4894    
  15  norm          .10000E-03    .45171        .44844E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     7.8980        24.412        .14269E-03   -1.5146    
  17  norm          .10000E-03    5.6283        .15928E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Normalizat    .59843        .23448        .30869E-03   -1.0805    
  19  Prefactor     1.2421        .20563        .20207E-03   -.85046    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.82991e-09
Minuit parameter uncertainties:
  1  3.42934e-06
  2  2.55603e-05
  3  9.75432e-06
  4  7.79664
  5  0.000109337
  6  1.01612e-05
  7  4.85226e-06
  8  5.33111e-06
  9  8.52889
  10  4.01497
  11  7.04089
  12  9.08166
  13  0.792378
  14  12.1775
  15  2.70624e-07
  16  24.4427
  17  2.5501e-06
  18  0.234872
  19  0.205764
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  7.167e+00  4.015e+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.242e+00  2.058e-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.984e-01  2.349e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 7.62
Ra Dec: 160.150 6.285
Photon Index (Fixed Index): 2.37 +/- 0.00
Photon Flux (Fixed Index): 8.66e-08 +/- 4.85e-08
Energy Flux (Fixed Index): 2.96e-05 +/- 1.66e-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) = 4747.63838929
delta logL = 0.643003364254

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 4747.63692785
delta logL = 0.644464803185

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    4.1294       1.0000         .10000E-03   10000.    
     2 'Index     '    2.9802       1.0000          .0000       10.000    
     3 'Normalizat'    .54657       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.2719       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=   4747.637     FROM MIGRAD    STATUS=CONVERGED     52 CALLS      263 TOTAL
                     EDM=   .10E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     4.1300        32.507        .49591E-02    .12179E-02
   2  Index         2.9803        3.0665        .96471E-01    .32866E-03
   3  Normalizat    .54668        .93876E-01    .72610E-01    .13825E-03
   4  Prefactor     1.2717        .76788E-01    .33119E-01   -.53489E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 4.12995
  Index      = 2.98031
  Normalizat = 0.546677
  Prefactor  = 1.2717
 **********
 **   18 **HESSE 
 **********

 FCN=   4747.637     FROM HESSE     STATUS=OK            31 CALLS      294 TOTAL
                     EDM=   .39E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     4.1300        4.0600        .61353E-04   -1.5301    
   2  Index         2.9803        .64423        .39334E-02   -.41582    
   3  Normalizat    .54668        .22896        .32146E-03   -1.1030    
   4  Prefactor     1.2717        .20654        .19987E-03   -.84152    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.93502e-10
Minuit parameter uncertainties:
  1  4.06025
  2  0.646379
  3  0.229356
  4  0.206673
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/64315': 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) = 4747.63692719
delta logL = 0.644465460947

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  4.130e+00  4.060e+00  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  2.980e+00  6.464e-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.272e+00  2.067e-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.467e-01  2.294e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 9.10
Ra Dec: 160.150 6.285
Photon Index (Free Index): 2.98 +/- 0.65
Photon Flux (Free Index): 1.29e-07 +/- 6.54e-08
Energy Flux (Free Index): 2.60e-05 +/- 1.25e-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/64315/cmap_HighResolution_351043201_351302401_4FGL_J1040.5+0617_daily_bin431.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='8.66e-08', energy_flux2='2.60e-05', photon_flux_error='4.85e-08', dlogl='6.44e-01', energy_flux='2.96e-05', photon_flux2='1.29e-07', job_status='DONE', time_completed='2021-09-02 08:28:49.760421', photon_index_error2='0.65', photon_index2='2.98', ts='7.62', fit_tolerance='1e-08', GAL='1.24', photon_index_error='0.00', energy_flux_error2='1.25e-05', EG='0.60', time_epoch_completed='1630596529.76', return_code='0', job_id='64315', GAL2='1.27', EG2='0.55', return_code2='0', energy_flux_error='1.66e-05', photon_flux_error2='6.54e-08', ts2='9.10', photon_index='2.37' WHERE bin_id='431' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:28:49 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0302>
Subject: Job 64315: <4FGL_J1040.5+0617_daily_bin431> in cluster <slac> Done

Job <4FGL_J1040.5+0617_daily_bin431> was submitted from host <rhel6-64p> by user <kocevski> in cluster <slac> at Thu Sep  2 08:16:22 2021
Job was executed on host(s) <bullet0302>, in queue <medium>, as user <kocevski> in cluster <slac> at Thu Sep  2 08:17:39 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:17:39 2021
Terminated at Thu Sep  2 08:28:50 2021
Results reported at Thu Sep  2 08:28:50 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin431 160.15 6.2848 351043201 351302401 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 :                                   474.00 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             295.09 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   671 sec.
    Turnaround time :                            748 sec.

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

