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


Performing analysis on: 4FGL_J1040.5+0617_daily_bin724
RA = 160.15, Dec = 6.2848
tmin = 426988801, tmax = 427248001
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='65674', job_status='RUN', time_executed='2021-09-02 08:25:24.872779', time_epoch_executed='1630596324.87' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='724'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/65674

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/65674/ft1_4FGL_J1040.5+0617_daily_bin724.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/65674/ft2_4FGL_J1040.5+0617_daily_bin724.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/65674/ft1_4FGL_J1040.5+0617_daily_bin724.fits outfile=/scratch/kocevski/65674/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin724.fits ra=160.15 dec=6.2848 rad=12.0 tmin=426988801.0 tmax=427248001.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 5.81
user 5.55
sys 0.23

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

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

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

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/65674/ft1_filtered_4FGL_J1040.5+0617_daily_bin724.fits evtable="EVENTS" scfile=/scratch/kocevski/65674/ft2_4FGL_J1040.5+0617_daily_bin724.fits sctable="SC_DATA" expcube=/scratch/kocevski/65674/ltcube_426988801_427248001_4FGL_J1040.5+0617_daily_bin724.fits outfile=/scratch/kocevski/65674/expmap_426988801_427248001_4FGL_J1040.5+0617_daily_bin724.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/65674/ltcube_426988801_427248001_4FGL_J1040.5+0617_daily_bin724.fits
.....................!
real 191.65
user 187.32
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/65674/ft1_filtered_4FGL_J1040.5+0617_daily_bin724.fits scfile=/scratch/kocevski/65674/ft2_4FGL_J1040.5+0617_daily_bin724.fits outfile=/scratch/kocevski/65674/cmap_426988801_427248001_4FGL_J1040.5+0617_daily_bin724.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.39
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/65674/ft1_filtered_4FGL_J1040.5+0617_daily_bin724.fits scfile=/scratch/kocevski/65674/ft2_4FGL_J1040.5+0617_daily_bin724.fits outfile=/scratch/kocevski/65674/cmap_HighResolution_426988801_427248001_4FGL_J1040.5+0617_daily_bin724.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.62
user 0.41
sys 0.14

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    13.072       1.0000         .10000E-03   10000.    
     2 'Prefactor '    34.739       1.0000         .10000E-03   10000.    
     3 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10013E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    18.199       1.0000         .10000E-03   10000.    
     6 'Prefactor '    .11150E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .88109       1.0000         .10000E-03   10000.    
     8 'norm      '    .37603       1.0000         .10000E-03   10000.    
     9 'Prefactor '    9.3514       1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    6.8538       1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10074E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    1.5281       1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10090E-03   1.0000         .10000E-03   10000.    
    15 'norm      '    2.6541       1.0000         .10000E-03   10000.    
    16 'Prefactor '    33.647       1.0000         .10000E-03   10000.    
    17 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    18 'Normalizat'    1.1498       1.0000         .10000E-01   10.000    
    19 'Prefactor '    .91597       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=   5538.379     FROM MIGRAD    STATUS=CONVERGED    387 CALLS     1631 TOTAL
                     EDM=   .50E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .4%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     13.073        9.3614       -.58772E-06    .69792E-04
   2  Prefactor     34.730        31.710       -.69121E-05    .19138E-04
   3  norm          .10000E-03    5.2621        .14997E-06** at limit **
   4  Prefactor     .10000E-03    3.3191        .17066E-06** at limit **
   5  Prefactor     18.207        28.911        .90142E-05    .55427E-04
   6  Prefactor     .10000E-03    77.333        .12951E-05** at limit **
   7  Prefactor     .83043        11.749       -.32100E-05    .51933E-04
   8  norm          .37586        1.1345       -.53378E-06   -.14973E-02
   9  Prefactor     9.3484        7.3523       -.19495E-06   -.85063E-06
  10  Prefactor     .10000E-03    1.0321       -.15731E-06** at limit **
  11  Prefactor     6.8495        8.8487       -.15179E-05   -.13143E-03
  12  Prefactor     .10000E-03    6.7020        .24330E-06** at limit **
  13  norm          1.5267        .68934       -.28569E-07   -.77609E-04
  14  Prefactor     .10000E-03    10.968       -.23826E-06** at limit **
  15  norm          2.6536        1.5396        .53159E-07   -.51856E-04
  16  Prefactor     33.631        22.726       -.42318E-05    .77468E-05
  17  norm          .10000E-03    4.2312        .17551E-06** at limit **
  18  Normalizat    1.1500        .20798        .12076E-05    .14641E-03
  19  Prefactor     .91590        .17281        .44150E-06    .18227E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 13.0734
  Prefactor  = 34.7303
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 18.2074
  Prefactor  = 0.0001
  Prefactor  = 0.830433
  norm       = 0.375864
  Prefactor  = 9.34841
  Prefactor  = 0.0001
  Prefactor  = 6.84952
  Prefactor  = 0.0001
  norm       = 1.52674
  Prefactor  = 0.0001
  norm       = 2.65356
  Prefactor  = 33.6306
  norm       = 0.0001
  Normalizat = 1.15001
  Prefactor  = 0.915901
 **********
 **   18 **HESSE 
 **********

 FCN=   5538.379     FROM HESSE     STATUS=OK           270 CALLS     1901 TOTAL
                     EDM=   .11E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     13.073        9.3564        .11079E-03   -1.4985    
   2  Prefactor     34.730        31.373        .67991E-04   -1.4529    
   3  norm          .10000E-03    5.2665        .16670E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10000E-03    3.3244        .13235E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     18.207        28.847        .93886E-04   -1.4854    
   6  Prefactor     .10000E-03    77.683        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .83043        47.810        .48470E-02   -1.5526    
   8  norm          .37586        1.1272        .13239E-03   -1.5585    
   9  Prefactor     9.3484        7.3336        .13105E-03   -1.5096    
  10  Prefactor     .10000E-03    1.0387        .73813E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     6.8495        8.9350        .15325E-03   -1.5184    
  12  Prefactor     .10000E-03    6.7907        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          1.5267        .68212        .39328E-04   -1.5461    
  14  Prefactor     .10000E-03    11.084        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          2.6536        1.5361        .67159E-04   -1.5382    
  16  Prefactor     33.631        22.702        .69083E-04   -1.4547    
  17  norm          .10000E-03    4.2366        .14950E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Normalizat    1.1500        .24869        .25687E-03   -.88162    
  19  Prefactor     .91590        .20637        .24403E-03   -.95588    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.0779e-09
Minuit parameter uncertainties:
  1  9.35747
  2  31.3884
  3  8.53138e-06
  4  8.60387e-07
  5  28.8693
  6  0.000164775
  7  12.6118
  8  1.12729
  9  7.33432
  10  5.9947e-07
  11  8.93671
  12  2.48767e-06
  13  0.682128
  14  3.67902e-06
  15  1.53612
  16  22.7079
  17  5.2105e-07
  18  0.248944
  19  0.20655
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  1.000e-04  5.995e-07  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:  9.159e-01  2.065e-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.150e+00  2.489e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): -0.00
Ra Dec: 160.150 6.285
Photon Flux Upper Limit: 6.11e-08 ph cm-2 s-1
Energy Flux Upper Limit: 4.71e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/65674/likelihoodResults_426988801_427248001_4FGL_J1040.5+0617_daily_bin724.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): 102
logL (Free Index) = 5538.38378655
delta logL = -0.00449757694605

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 5538.37928898
delta logL = -5.59612090001e-09

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10028E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.3575       1.0000          .0000       10.000    
     3 'Normalizat'    1.1500       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .91595       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=   5538.379     FROM MIGRAD    STATUS=CONVERGED     99 CALLS      249 TOTAL
                     EDM=   .12E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    6.2205        .74155E-02** at limit **
   2  Index         2.0651        8.9619        .50000        .32026E-05
   3  Normalizat    1.1500        .11917E-01    .25687E-03    .10596E-03
   4  Prefactor     .91590        .10285E-01    .24403E-03    .12588E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000100004
  Index      = 2.06513
  Normalizat = 1.15001
  Prefactor  = 0.9159
 **********
 **   18 **HESSE 
 **********

 FCN=   5538.379     FROM HESSE     STATUS=NOT POSDEF    29 CALLS      278 TOTAL
                     EDM=   .12E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    63.415        .76661E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         2.0651        5.7167        .50000       -.62732    
   3  Normalizat    1.1500        .40439E-01    .10275E-04   -.88162    
   4  Prefactor     .91590        .34900E-01    .97613E-05   -.95588    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 1.18961e-08
Minuit parameter uncertainties:
  1  0.00105032
  2  459.584
  3  0.0404397
  4  0.0349005
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/65674': 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): 102
logL (Free Index) = 5538.37928567
delta logL = 3.30024522555e-06

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  1.000e-04  1.050e-03  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  2.065e+00  4.596e+02  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:  9.159e-01  3.490e-02  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.150e+00  4.044e-02  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): -0.00
Ra Dec: 160.150 6.285

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/65674/cmap_HighResolution_426988801_427248001_4FGL_J1040.5+0617_daily_bin724.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='4.71e-03', job_status='DONE', photon_flux_upper_limit='6.11e-08', time_completed='2021-09-02 08:34:40.598326', job_id='65674', GAL2='0.92', fit_tolerance='1e-08', EG2='1.15', EG='1.15', time_epoch_completed='1630596880.6', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.92', dlogl='3.30e-06', ts2='-0.00', photon_index_error='0.00', photon_index='2.37' WHERE bin_id='724' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:34:40 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0108>
Subject: Job 65674: <4FGL_J1040.5+0617_daily_bin724> in cluster <slac> Done

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

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin724 160.15 6.2848 426988801 427248001 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 :                                   553.00 sec.
    Max Memory :                                 1255 MB
    Average Memory :                             309.82 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   644 sec.
    Turnaround time :                            803 sec.

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

