/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 15 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 = 7284
number of fields = 22
No RA_SUN column yet. Adding RA_SUN/DEC_SUN columns.
Done.


Performing analysis on: 4FGL_J1040.5+0617_daily_bin118
RA = 160.15, Dec = 6.2848
tmin = 269913601, tmax = 270172801
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='60764', job_status='RUN', time_executed='2021-09-02 08:06:48.250558', time_epoch_executed='1630595208.25' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='118'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/60764

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/60764/ft1_4FGL_J1040.5+0617_daily_bin118.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/60764/ft2_4FGL_J1040.5+0617_daily_bin118.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/60764/ft1_4FGL_J1040.5+0617_daily_bin118.fits outfile=/scratch/kocevski/60764/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin118.fits ra=160.15 dec=6.2848 rad=12.0 tmin=269913601.0 tmax=270172801.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 1.67
user 1.48
sys 0.18

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/60764/ft2_4FGL_J1040.5+0617_daily_bin118.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/60764/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin118.fits evtable="EVENTS" outfile="/scratch/kocevski/60764/ft1_filtered_4FGL_J1040.5+0617_daily_bin118.fits" apply_filter=yes overwrite=yes header_obstimes=yes tstart=0.0 tstop=0.0 gtifile="default" chatter=3 clobber=yes debug=no gui=no mode="ql"

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

This is gtmktime version HEAD
Applying GTI filter:
IN_SAA!=T && LIVETIME>0 && gtifilter('/nfs/farm/g/glast/g/LCRepository/Likelihood/GTIs/nogrb.gti',(START+STOP)/2) && (angsep(RA_SUN,DEC_SUN,RA_ZENITH,DEC_ZENITH)>115 || gtifilter('/nfs/farm/g/glast/g/LCRepository/Likelihood/GTIs/nosolarflares.gti',(START+STOP)/2))
real 0.50
user 0.35
sys 0.14

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/60764/ft1_filtered_4FGL_J1040.5+0617_daily_bin118.fits" evtable="EVENTS" scfile=/scratch/kocevski/60764/ft2_4FGL_J1040.5+0617_daily_bin118.fits sctable="SC_DATA" outfile=/scratch/kocevski/60764/ltcube_269913601_270172801_4FGL_J1040.5+0617_daily_bin118.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/60764/ft2_4FGL_J1040.5+0617_daily_bin118.fits
.....................!
real 14.88
user 14.44
sys 0.34

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/60764/ft1_filtered_4FGL_J1040.5+0617_daily_bin118.fits evtable="EVENTS" scfile=/scratch/kocevski/60764/ft2_4FGL_J1040.5+0617_daily_bin118.fits sctable="SC_DATA" expcube=/scratch/kocevski/60764/ltcube_269913601_270172801_4FGL_J1040.5+0617_daily_bin118.fits outfile=/scratch/kocevski/60764/expmap_269913601_270172801_4FGL_J1040.5+0617_daily_bin118.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/60764/ltcube_269913601_270172801_4FGL_J1040.5+0617_daily_bin118.fits
.....................!
real 193.26
user 187.49
sys 5.17

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

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

This is gtbin version HEAD
real 0.54
user 0.38
sys 0.15

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

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

This is gtbin version HEAD
real 0.55
user 0.38
sys 0.16

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    13.584       1.0000         .10000E-03   10000.    
     2 'Prefactor '    15.816       1.0000         .10000E-03   10000.    
     3 'norm      '    .10005E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    25.249       1.0000         .10000E-03   10000.    
     5 'Prefactor '    51.199       1.0000         .10000E-03   10000.    
     6 'Prefactor '    37.409       1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10044E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    .10137E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    8.1926       1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    .64493       1.0000         .10000E-03   10000.    
    14 'Prefactor '    8.0734       1.0000         .10000E-03   10000.    
    15 'norm      '    .34760E-03   1.0000         .10000E-03   10000.    
    16 'Prefactor '    9.1463       1.0000         .10000E-03   10000.    
    17 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    18 'Normalizat'    1.4023       1.0000         .10000E-01   10.000    
    19 'Prefactor '    .91924       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=   8679.149     FROM MIGRAD    STATUS=CONVERGED    377 CALLS     1964 TOTAL
                     EDM=   .12E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  4.5%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     13.584        10.997        .57918E-07   -.18704E-03
   2  Prefactor     15.814        25.420       -.99070E-06   -.11697E-03
   3  norm          .10000E-03    4.6825       -.47409E-06** at limit **
   4  Prefactor     25.249        12.821       -.11331E-06    .30573E-03
   5  Prefactor     51.204        57.653        .27250E-05    .23515E-03
   6  Prefactor     37.412        40.349        .23069E-05    .30106E-03
   7  Prefactor     .10000E-03    5.7842        .11265E-05** at limit **
   8  norm          .10000E-03    .57068       -.25090E-06** at limit **
   9  Prefactor     .10000E-03    1.5715        .12237E-05** at limit **
  10  Prefactor     .10000E-03    1.6569       -.56871E-06** at limit **
  11  Prefactor     8.1942        6.4390        .15135E-05   -.11241E-02
  12  Prefactor     .10000E-03    3.9203       -.60052E-06** at limit **
  13  norm          .64485        .65512        .10056E-06   -.96013E-04
  14  Prefactor     8.0737        7.6589        .41827E-08    .56539E-04
  15  norm          .10022E-03    .48465       -.42348E-06** at limit **
  16  Prefactor     9.1468        10.446        .24488E-06    .10160E-03
  17  norm          .10000E-03    3.3323        .52165E-06** at limit **
  18  Normalizat    1.4023        .18205       -.95719E-06    .35819E-03
  19  Prefactor     .91931        .14837        .14673E-06    .17994E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 13.5836
  Prefactor  = 15.8142
  norm       = 0.0001
  Prefactor  = 25.249
  Prefactor  = 51.2038
  Prefactor  = 37.4123
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.000100001
  Prefactor  = 0.0001
  Prefactor  = 8.19424
  Prefactor  = 0.0001
  norm       = 0.644854
  Prefactor  = 8.07373
  norm       = 0.00010022
  Prefactor  = 9.14684
  norm       = 0.0001
  Normalizat = 1.40225
  Prefactor  = 0.919314
 **********
 **   18 **HESSE 
 **********

 FCN=   8679.149     FROM HESSE     STATUS=OK           268 CALLS     2232 TOTAL
                     EDM=   .20E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     13.584        11.092        .54339E-03   -1.4971    
   2  Prefactor     15.814        25.558        .10071E-03   -1.4912    
   3  norm          .10000E-03    4.7066        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     25.249        12.816        .79721E-04   -1.4703    
   5  Prefactor     51.204        58.227        .56049E-04   -1.4276    
   6  Prefactor     37.412        40.806        .65528E-04   -1.4484    
   7  Prefactor     .10000E-03    5.8131        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          .10000E-03    1.6548        .13413E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     .10000E-03    1.6681        .11708E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .10000E-03    1.7282        .23498E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     8.1942        7.9390        .70035E-03   -1.5135    
  12  Prefactor     .10000E-03    3.9849        .18041E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          .64485        .62353        .62570E-04   -1.5547    
  14  Prefactor     8.0737        7.5157        .14111E-03   -1.5140    
  15  norm          .10022E-03    12.336        .11696E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     9.1468        10.445        .13252E-03   -1.5103    
  17  norm          .10000E-03    3.3541        .16649E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Normalizat    1.4023        .21632        .25497E-03   -.80564    
  19  Prefactor     .91931        .17677        .26190E-03   -.95469    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.0015e-08
Minuit parameter uncertainties:
  1  11.0934
  2  25.5757
  3  4.89028e-05
  4  12.8173
  5  58.2922
  6  40.8363
  7  9.75514e-05
  8  5.74929e-05
  9  6.65387e-05
  10  2.88186e-05
  11  7.94006
  12  4.65193e-05
  13  0.623535
  14  7.51661
  15  0.00329505
  16  10.4476
  17  4.20434e-05
  18  0.216461
  19  0.176877
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  1.000e-04  2.882e-05  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.193e-01  1.769e-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.402e+00  2.165e-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.21e-08 ph cm-2 s-1
Energy Flux Upper Limit: 4.79e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/60764/likelihoodResults_269913601_270172801_4FGL_J1040.5+0617_daily_bin118.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) = 8679.15154315
delta logL = -0.0027614224673

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 8679.14878042
delta logL = 1.31145316118e-06

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.4032       1.0000          .0000       10.000    
     3 'Normalizat'    1.4022       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .91937       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=   8679.133     FROM MIGRAD    STATUS=CONVERGED    123 CALLS      278 TOTAL
                     EDM=   .43E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10900        1.5437        .18644E-01    .26925E-02
   2  Index         3.5088        .67258        .50000        .71833E-05
   3  Normalizat    1.3918        .88565E-02    .57841E-01   -.75985E-05
   4  Prefactor     .92412        .75966E-02    .45251E-01   -.52559E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.109003
  Index      = 3.50881
  Normalizat = 1.39184
  Prefactor  = 0.924117
 **********
 **   18 **HESSE 
 **********

 FCN=   8679.133     FROM HESSE     STATUS=OK            35 CALLS      313 TOTAL
                     EDM=   .21E-06    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10900        5.0599        .11110E-02   -1.5642    
   2  Index         3.5088        3.9472        .63217E-02   -.30285    
   3  Normalizat    1.3918        .21742        .25579E-03   -.80865    
   4  Prefactor     .92412        .17692        .26129E-03   -.95303    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.10966e-07
Minuit parameter uncertainties:
  1  1.48476
  2  4.64778
  3  0.217564
  4  0.177025
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/60764': 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) = 8679.13316724
delta logL = 0.015614490223

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  1.090e-01  1.485e+00  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  3.509e+00  4.648e+00  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.241e-01  1.770e-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.392e+00  2.176e-01  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 -1.000e-01 [aplpy.core]
INFO: Auto-setting vmax to  1.110e+00 [aplpy.core]
Saving /scratch/kocevski/60764/cmap_HighResolution_269913601_270172801_4FGL_J1040.5+0617_daily_bin118.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='4.79e-03', job_status='DONE', photon_flux_upper_limit='6.21e-08', time_completed='2021-09-02 08:18:27.688022', job_id='60764', GAL2='0.92', fit_tolerance='1e-08', EG2='1.39', EG='1.40', time_epoch_completed='1630595907.69', return_code2='0', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.92', dlogl='1.56e-02', ts2='0.04', photon_index_error='0.00', photon_index='2.37' WHERE bin_id='118' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:18:27 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0098>
Subject: Job 60764: <4FGL_J1040.5+0617_daily_bin118> in cluster <slac> Done

Job <4FGL_J1040.5+0617_daily_bin118> was submitted from host <rhel6-64k> by user <kocevski> in cluster <slac> at Thu Sep  2 08:06:13 2021
Job was executed on host(s) <bullet0098>, in queue <medium>, as user <kocevski> in cluster <slac> at Thu Sep  2 08:06:22 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:06:22 2021
Terminated at Thu Sep  2 08:18:28 2021
Results reported at Thu Sep  2 08:18:28 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin118 160.15 6.2848 269913601 270172801 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 :                                   698.00 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             346.27 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   725 sec.
    Turnaround time :                            735 sec.

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

