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


Performing analysis on: 4FGL_J1040.5+0617_daily_bin388
RA = 160.15, Dec = 6.2848
tmin = 339897601, tmax = 340156801
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='64252', job_status='RUN', time_executed='2021-09-02 08:20:21.515288', time_epoch_executed='1630596021.52' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='388'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/64252

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

Retrieving the FT1 file...

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

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

Retrieving 48 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/64252/ft1_4FGL_J1040.5+0617_daily_bin388.fits


Retrieving the FT1 file...

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

Retrieving 48 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/64252/ft2_4FGL_J1040.5+0617_daily_bin388.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/64252/ft1_4FGL_J1040.5+0617_daily_bin388.fits outfile=/scratch/kocevski/64252/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin388.fits ra=160.15 dec=6.2848 rad=12.0 tmin=339897601.0 tmax=340156801.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 2.73
user 2.51
sys 0.21

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/64252/ft1_filtered_4FGL_J1040.5+0617_daily_bin388.fits" evtable="EVENTS" scfile=/scratch/kocevski/64252/ft2_4FGL_J1040.5+0617_daily_bin388.fits sctable="SC_DATA" outfile=/scratch/kocevski/64252/ltcube_339897601_340156801_4FGL_J1040.5+0617_daily_bin388.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/64252/ft2_4FGL_J1040.5+0617_daily_bin388.fits
.....................!
real 10.41
user 10.09
sys 0.27

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/64252/ft1_filtered_4FGL_J1040.5+0617_daily_bin388.fits evtable="EVENTS" scfile=/scratch/kocevski/64252/ft2_4FGL_J1040.5+0617_daily_bin388.fits sctable="SC_DATA" expcube=/scratch/kocevski/64252/ltcube_339897601_340156801_4FGL_J1040.5+0617_daily_bin388.fits outfile=/scratch/kocevski/64252/expmap_339897601_340156801_4FGL_J1040.5+0617_daily_bin388.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/64252/ltcube_339897601_340156801_4FGL_J1040.5+0617_daily_bin388.fits
.....................!
real 156.23
user 152.08
sys 3.73

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/64252/ft1_filtered_4FGL_J1040.5+0617_daily_bin388.fits scfile=/scratch/kocevski/64252/ft2_4FGL_J1040.5+0617_daily_bin388.fits outfile=/scratch/kocevski/64252/cmap_339897601_340156801_4FGL_J1040.5+0617_daily_bin388.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.47
user 0.31
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/64252/ft1_filtered_4FGL_J1040.5+0617_daily_bin388.fits scfile=/scratch/kocevski/64252/ft2_4FGL_J1040.5+0617_daily_bin388.fits outfile=/scratch/kocevski/64252/cmap_HighResolution_339897601_340156801_4FGL_J1040.5+0617_daily_bin388.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.48
user 0.33
sys 0.14

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10061E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     3 'norm      '    10.272       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10034E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .83555E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10767E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    .10378E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10031E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    2.9716       1.0000         .10000E-03   10000.    
    11 'Prefactor '    3.4571       1.0000         .10000E-03   10000.    
    12 'Prefactor '    53.232       1.0000         .10000E-03   10000.    
    13 'norm      '    3.7971       1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10057E-03   1.0000         .10000E-03   10000.    
    15 'norm      '    1.2736       1.0000         .10000E-03   10000.    
    16 'Prefactor '    20.506       1.0000         .10000E-03   10000.    
    17 'norm      '    10.110       1.0000         .10000E-03   10000.    
    18 'Normalizat'    1.3613       1.0000         .10000E-01   10.000    
    19 'Prefactor '    .78465       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=   8217.442     FROM MIGRAD    STATUS=CONVERGED    669 CALLS     1960 TOTAL
                     EDM=   .30E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    9.6260        .18142E-02** at limit **
   2  Prefactor     .10000E-03    15.173        .18142E-02** at limit **
   3  norm          10.263        11.547        .12502E-03    .23807E-03
   4  Prefactor     .10000E-03    18.903        .36285E-02** at limit **
   5  Prefactor     .10000E-03    18.604        .18142E-02** at limit **
   6  Prefactor     .10000E-03    39.045        .15399    ** at limit **
   7  Prefactor     .10000E-03    16.408        .18142E-02** at limit **
   8  norm          .10001E-03    3.3022        .11533E-02** at limit **
   9  Prefactor     .10000E-03    5.4698        .36285E-03** at limit **
  10  Prefactor     2.9726        2.7092        .13571E-03    .15699E-03
  11  Prefactor     3.4593        4.2954        .20237E-03    .10348E-03
  12  Prefactor     53.235        11.167        .54974E-04    .11961E-03
  13  norm          3.7971        .75889        .33569E-04    .33799E-03
  14  Prefactor     .10000E-03    9.7327        .18142E-02** at limit **
  15  norm          1.2744        1.1917        .92187E-04    .43656E-04
  16  Prefactor     20.517        20.847        .88449E-04   -.98971E-04
  17  norm          10.111        13.763        .12602E-03    .59540E-04
  18  Normalizat    1.3605        .21964        .25743E-03    .45929E-03
  19  Prefactor     .78506        .17600        .27592E-03    .34347E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 10.2631
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.000100001
  Prefactor  = 0.0001
  norm       = 0.000100009
  Prefactor  = 0.0001
  Prefactor  = 2.9726
  Prefactor  = 3.45929
  Prefactor  = 53.2346
  norm       = 3.79714
  Prefactor  = 0.0001
  norm       = 1.27444
  Prefactor  = 20.517
  norm       = 10.1112
  Normalizat = 1.36055
  Prefactor  = 0.785055
 **********
 **   18 **HESSE 
 **********

 FCN=   8217.442     FROM HESSE     STATUS=OK           258 CALLS     2218 TOTAL
                     EDM=   .31E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    9.6291        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    15.173        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          10.263        11.544        .50007E-05   -1.5067    
   4  Prefactor     .10000E-03    18.997        .72569E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .10000E-03    18.604        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    39.074        .15372       -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    16.412        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          .10001E-03    3.3521        .23067E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     .10000E-03    5.4701        .72569E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     2.9726        2.7090        .54285E-05   -1.5363    
  11  Prefactor     3.4593        4.2952        .80946E-05   -1.5336    
  12  Prefactor     53.235        11.167        .10995E-04   -1.4247    
  13  norm          3.7971        .75878        .13427E-05   -1.5318    
  14  Prefactor     .10000E-03    9.7384        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          1.2744        1.1916        .36875E-05   -1.5482    
  16  Prefactor     20.517        20.842        .35380E-05   -1.4802    
  17  norm          10.111        13.763        .50409E-05   -1.5072    
  18  Normalizat    1.3605        .21984        .51485E-04   -.81777    
  19  Prefactor     .78506        .17617        .11037E-04   -1.0028    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.06322e-09
Minuit parameter uncertainties:
  1  6.33104e-06
  2  4.66549e-05
  3  11.5468
  4  8.50717e-05
  5  4.03101e-05
  6  0.000282778
  7  3.14452e-05
  8  0.000351221
  9  2.66679e-05
  10  2.7091
  11  4.29562
  12  11.1675
  13  0.758784
  14  3.82567e-05
  15  1.19159
  16  20.8493
  17  13.7672
  18  0.219988
  19  0.176298
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  2.973e+00  2.709e+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:  7.851e-01  1.763e-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.361e+00  2.200e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 1.99
Ra Dec: 160.150 6.285
Photon Index (Fixed Index): 2.37 +/- 0.00
Photon Flux (Fixed Index): 3.59e-08 +/- 3.27e-08
Energy Flux (Fixed Index): 1.23e-05 +/- 1.12e-05

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

Saving results to:
/scratch/kocevski/64252/likelihoodResults_339897601_340156801_4FGL_J1040.5+0617_daily_bin388.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) = 8217.32106432
delta logL = 0.120450077064

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 8217.31940129
delta logL = 0.122113107727

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    2.4517       1.0000         .10000E-03   10000.    
     2 'Index     '    2.6881       1.0000          .0000       10.000    
     3 'Normalizat'    1.3492       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .79063       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=   8217.319     FROM MIGRAD    STATUS=CONVERGED     56 CALLS      276 TOTAL
                     EDM=   .32E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     2.4511        50.990        .65310E-02    .87068E-03
   2  Index         2.6878        6.3435        .15542        .16927E-03
   3  Normalizat    1.3486        .63950E-01    .58404E-01    .24060E-03
   4  Prefactor     .79111        .51847E-01    .43595E-01    .12538E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 2.45113
  Index      = 2.68784
  Normalizat = 1.34864
  Prefactor  = 0.791109
 **********
 **   18 **HESSE 
 **********

 FCN=   8217.319     FROM HESSE     STATUS=OK            31 CALLS      307 TOTAL
                     EDM=   .12E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     2.4511        2.7085        .11217E-03   -1.5395    
   2  Index         2.6878        .69871        .84046E-02   -.48074    
   3  Normalizat    1.3486        .21034        .25828E-03   -.82126    
   4  Prefactor     .79111        .17558        .27469E-03   -1.0006    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.16294e-10
Minuit parameter uncertainties:
  1  2.7086
  2  0.70164
  3  0.210471
  4  0.175703
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/64252': 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) = 8217.3193969
delta logL = 0.122117503024

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  2.451e+00  2.709e+00  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  2.688e+00  7.016e-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:  7.911e-01  1.757e-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.349e+00  2.105e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 2.25
Ra Dec: 160.150 6.285
Photon Index (Free Index): 2.69 +/- 0.70
Photon Flux (Free Index): 4.79e-08 +/- 4.30e-08
Energy Flux (Free Index): 1.16e-05 +/- 9.86e-06

Creating a high resolution counts map...
INFO: Auto-setting vmin to -1.000e-01 [aplpy.core]
INFO: Auto-setting vmax to  1.110e+00 [aplpy.core]
Saving /scratch/kocevski/64252/cmap_HighResolution_339897601_340156801_4FGL_J1040.5+0617_daily_bin388.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='8.41e-03', comment='SUCCESS', photon_flux='3.59e-08', energy_flux2='1.16e-05', photon_flux_error='3.27e-08', dlogl='1.22e-01', energy_flux='1.23e-05', photon_flux2='4.79e-08', job_status='DONE', time_completed='2021-09-02 08:29:42.704849', photon_index_error2='0.70', photon_index2='2.69', ts='1.99', fit_tolerance='1e-08', GAL='0.79', photon_index_error='0.00', photon_flux_upper_limit='1.09e-07', energy_flux_error2='9.86e-06', EG='1.36', time_epoch_completed='1630596582.7', return_code='0', job_id='64252', GAL2='0.79', EG2='1.35', return_code2='0', energy_flux_error='1.12e-05', photon_flux_error2='4.30e-08', ts2='2.25', photon_index='2.37' WHERE bin_id='388' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:29:42 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0023>
Subject: Job 64252: <4FGL_J1040.5+0617_daily_bin388> in cluster <slac> Done

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

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin388 160.15 6.2848 339897601 340156801 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 :                                   557.10 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             265.79 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   773 sec.
    Turnaround time :                            806 sec.

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

