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


Performing analysis on: 4FGL_J1040.5+0617_daily_bin306
RA = 160.15, Dec = 6.2848
tmin = 318643201, tmax = 318902401
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='62882', job_status='RUN', time_executed='2021-09-02 08:15:17.889676', time_epoch_executed='1630595717.89' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='306'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/62882

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/62882/ft1_4FGL_J1040.5+0617_daily_bin306.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/62882/ft2_4FGL_J1040.5+0617_daily_bin306.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/62882/ft1_4FGL_J1040.5+0617_daily_bin306.fits outfile=/scratch/kocevski/62882/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin306.fits ra=160.15 dec=6.2848 rad=12.0 tmin=318643201.0 tmax=318902401.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.41
user 3.22
sys 0.18

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/62882/ft1_filtered_4FGL_J1040.5+0617_daily_bin306.fits" evtable="EVENTS" scfile=/scratch/kocevski/62882/ft2_4FGL_J1040.5+0617_daily_bin306.fits sctable="SC_DATA" outfile=/scratch/kocevski/62882/ltcube_318643201_318902401_4FGL_J1040.5+0617_daily_bin306.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/62882/ft2_4FGL_J1040.5+0617_daily_bin306.fits
.....................!
real 15.35
user 14.99
sys 0.31

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/62882/ft1_filtered_4FGL_J1040.5+0617_daily_bin306.fits evtable="EVENTS" scfile=/scratch/kocevski/62882/ft2_4FGL_J1040.5+0617_daily_bin306.fits sctable="SC_DATA" expcube=/scratch/kocevski/62882/ltcube_318643201_318902401_4FGL_J1040.5+0617_daily_bin306.fits outfile=/scratch/kocevski/62882/expmap_318643201_318902401_4FGL_J1040.5+0617_daily_bin306.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/62882/ltcube_318643201_318902401_4FGL_J1040.5+0617_daily_bin306.fits
.....................!
real 193.71
user 189.43
sys 3.82

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/62882/ft1_filtered_4FGL_J1040.5+0617_daily_bin306.fits scfile=/scratch/kocevski/62882/ft2_4FGL_J1040.5+0617_daily_bin306.fits outfile=/scratch/kocevski/62882/cmap_318643201_318902401_4FGL_J1040.5+0617_daily_bin306.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.41
sys 0.13

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/62882/ft1_filtered_4FGL_J1040.5+0617_daily_bin306.fits scfile=/scratch/kocevski/62882/ft2_4FGL_J1040.5+0617_daily_bin306.fits outfile=/scratch/kocevski/62882/cmap_HighResolution_318643201_318902401_4FGL_J1040.5+0617_daily_bin306.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/62882/ft1_filtered_4FGL_J1040.5+0617_daily_bin306.fits evtable="EVENTS" scfile=/scratch/kocevski/62882/ft2_4FGL_J1040.5+0617_daily_bin306.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/62882/Model_4FGL_J1040.5+0617_daily_bin306.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/62882/ft1_filtered_4FGL_J1040.5+0617_daily_bin306.fits.....................!
real 48.38
user 47.03
sys 1.08

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     3 'norm      '    .10007E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    21.286       1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10094E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10007E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10004E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    .10022E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    .40047E-02   1.0000         .10000E-03   10000.    
    10 'Prefactor '    3.3160       1.0000         .10000E-03   10000.    
    11 'Prefactor '    2.3671       1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    .79303       1.0000         .10000E-03   10000.    
    14 'Prefactor '    .44525E-03   1.0000         .10000E-03   10000.    
    15 'norm      '    .10033E-03   1.0000         .10000E-03   10000.    
    16 'Prefactor '    .63774       1.0000         .10000E-03   10000.    
    17 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    18 'Normalizat'    .92017       1.0000         .10000E-01   10.000    
    19 'Prefactor '    1.1075       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=   4750.186     FROM MIGRAD    STATUS=CONVERGED    421 CALLS     1693 TOTAL
                     EDM=   .18E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.3%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    4.7731       -.54399E-09** at limit **
   2  Prefactor     .10000E-03    13.708       -.16266E-07** at limit **
   3  norm          .10000E-03    16.133        .15762E-07** at limit **
   4  Prefactor     21.285        12.538       -.14548E-07    .10741E-03
   5  Prefactor     .10001E-03    66.763       -.29075E-07** at limit **
   6  Prefactor     .10001E-03    41.733        .31127E-07** at limit **
   7  Prefactor     .10000E-03    12.083        .27407E-08** at limit **
   8  norm          .10000E-03    .94555       -.21752E-08** at limit **
   9  Prefactor     .10000E-03    7.2142       -.24912E-07** at limit **
  10  Prefactor     3.3156        2.9096       -.47151E-08    .38871E-04
  11  Prefactor     2.3652        .87722       -.39732E-06   -.18195E-03
  12  Prefactor     .10000E-03    4.5608       -.66057E-09** at limit **
  13  norm          .79288        .57332        .34618E-09    .12408E-03
  14  Prefactor     .10041E-03    9.9271       -.63855E-07** at limit **
  15  norm          .10000E-03    .82091        .78799E-08** at limit **
  16  Prefactor     .61402        14.251       -.48264E-07    .11086E-03
  17  norm          .10000E-03    4.9753       -.87181E-09** at limit **
  18  Normalizat    .92034        .19833        .16965E-06   -.99634E-05
  19  Prefactor     1.1074        .17577       -.44341E-07    .18241E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 0.000100003
  norm       = 0.000100003
  Prefactor  = 21.2854
  Prefactor  = 0.000100007
  Prefactor  = 0.000100012
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.000100002
  Prefactor  = 3.31564
  Prefactor  = 2.36516
  Prefactor  = 0.0001
  norm       = 0.792876
  Prefactor  = 0.000100411
  norm       = 0.0001
  Prefactor  = 0.614019
  norm       = 0.0001
  Normalizat = 0.920344
  Prefactor  = 1.10742
 **********
 **   18 **HESSE 
 **********

 FCN=   4750.186     FROM HESSE     STATUS=OK           272 CALLS     1965 TOTAL
                     EDM=   .12E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    4.7809        .14704E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    13.714        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          .10000E-03    16.233        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     21.285        12.533        .86815E-04   -1.4785    
   5  Prefactor     .10001E-03    67.023        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10001E-03    41.764        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    12.105        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          .10000E-03    .98569        .13060E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     .10000E-03    46.739        .35384E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     3.3156        2.9064        .10578E-03   -1.5344    
  11  Prefactor     2.3652        7.2531        .13316E-02   -1.5400    
  12  Prefactor     .10000E-03    4.5916        .14365E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          .79288        .52156        .39170E-04   -1.5530    
  14  Prefactor     .10041E-03    38.089        .38216E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          .10000E-03    1.8861        .12046E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     .61402        126.05        .49130E-02   -1.5551    
  17  norm          .10000E-03    4.9957        .15014E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Normalizat    .92034        .23481        .25694E-03   -.95749    
  19  Prefactor     1.1074        .20326        .21376E-03   -.89230    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.23819e-08
Minuit parameter uncertainties:
  1  6.73339e-06
  2  0.000394199
  3  0.000467961
  4  12.5349
  5  0.00134256
  6  0.00143182
  7  8.61623e-05
  8  1.11051e-06
  9  0.000657606
  10  2.90652
  11  7.25579
  12  8.8188e-06
  13  0.521559
  14  0.00792011
  15  4.77592e-06
  16  17.6312
  17  2.8893e-06
  18  0.23507
  19  0.203406
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  3.316e+00  2.907e+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.107e+00  2.034e-01  0.000e+00  1.000e+01 ( 1.000e+00)
534        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
535        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
532   Normalization:  9.203e-01  2.351e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 2.70
Ra Dec: 160.150 6.285
Photon Index (Fixed Index): 2.37 +/- 0.00
Photon Flux (Fixed Index): 4.01e-08 +/- 3.51e-08
Energy Flux (Fixed Index): 1.37e-05 +/- 1.20e-05

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

Saving results to:
/scratch/kocevski/62882/likelihoodResults_318643201_318902401_4FGL_J1040.5+0617_daily_bin306.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) = 4750.14896825
delta logL = 0.0370123658859

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 4750.14656826
delta logL = 0.039412355778

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    3.8154       1.0000         .10000E-03   10000.    
     2 'Index     '    2.1523       1.0000          .0000       10.000    
     3 'Normalizat'    .92864       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.1023       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=   4750.147     FROM MIGRAD    STATUS=CONVERGED     48 CALLS      226 TOTAL
                     EDM=   .10E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     3.8154        127.12        .51659E-02    .68959E-03
   2  Index         2.1524        5.1886        .17405        .30048E-04
   3  Normalizat    .92863        .13438        .45266E-01    .10619E-04
   4  Prefactor     1.1023        .90189E-01    .37499E-01    .28707E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 3.81541
  Index      = 2.15236
  Normalizat = 0.928632
  Prefactor  = 1.10233
 **********
 **   18 **HESSE 
 **********

 FCN=   4750.147     FROM HESSE     STATUS=OK            33 CALLS      259 TOTAL
                     EDM=   .42E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     3.8154        3.6687        .11449E-03   -1.5317    
   2  Index         2.1524        .74783        .92334E-02   -.60593    
   3  Normalizat    .92863        .22336        .25591E-03   -.95461    
   4  Prefactor     1.1023        .20135        .21417E-03   -.89392    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 4.21892e-10
Minuit parameter uncertainties:
  1  3.66891
  2  0.752021
  3  0.223581
  4  0.201491
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/62882': 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) = 4750.14656826
delta logL = 0.0394123588267

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  3.815e+00  3.669e+00  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  2.152e+00  7.520e-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.102e+00  2.015e-01  0.000e+00  1.000e+01 ( 1.000e+00)
534        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
535        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
532   Normalization:  9.286e-01  2.236e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 2.77
Ra Dec: 160.150 6.285
Photon Index (Free Index): 2.15 +/- 0.75
Photon Flux (Free Index): 3.44e-08 +/- 3.63e-08
Energy Flux (Free Index): 1.69e-05 +/- 2.15e-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/62882/cmap_HighResolution_318643201_318902401_4FGL_J1040.5+0617_daily_bin306.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='9.76e-03', comment='SUCCESS', photon_flux='4.01e-08', energy_flux2='1.69e-05', photon_flux_error='3.51e-08', dlogl='3.94e-02', energy_flux='1.37e-05', photon_flux2='3.44e-08', job_status='DONE', time_completed='2021-09-02 08:23:53.014002', photon_index_error2='0.75', photon_index2='2.15', ts='2.70', fit_tolerance='1e-08', GAL='1.11', photon_index_error='0.00', photon_flux_upper_limit='1.27e-07', energy_flux_error2='2.15e-05', EG='0.92', time_epoch_completed='1630596233.01', return_code='0', job_id='62882', GAL2='1.10', EG2='0.93', return_code2='0', energy_flux_error='1.20e-05', photon_flux_error2='3.63e-08', ts2='2.77', photon_index='2.37' WHERE bin_id='306' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:23:53 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0216>
Subject: Job 62882: <4FGL_J1040.5+0617_daily_bin306> in cluster <slac> Done

Job <4FGL_J1040.5+0617_daily_bin306> was submitted from host <rhel6-64k> by user <kocevski> in cluster <slac> at Thu Sep  2 08:11:21 2021
Job was executed on host(s) <bullet0216>, in queue <medium>, as user <kocevski> in cluster <slac> at Thu Sep  2 08:13:16 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:13:16 2021
Terminated at Thu Sep  2 08:23:53 2021
Results reported at Thu Sep  2 08:23:53 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin306 160.15 6.2848 318643201 318902401 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 :                                   511.36 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             307.23 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   637 sec.
    Turnaround time :                            752 sec.

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

