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


Performing analysis on: 4FGL_J1040.5+0617_daily_bin1248
RA = 160.15, Dec = 6.2848
tmin = 562809601, tmax = 563068801
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='69206', job_status='RUN', time_executed='2021-09-02 08:40:30.562553', time_epoch_executed='1630597230.56' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='1248'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/69206

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/69206/ft1_4FGL_J1040.5+0617_daily_bin1248.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/69206/ft2_4FGL_J1040.5+0617_daily_bin1248.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/69206/ft1_4FGL_J1040.5+0617_daily_bin1248.fits outfile=/scratch/kocevski/69206/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin1248.fits ra=160.15 dec=6.2848 rad=12.0 tmin=562809601.0 tmax=563068801.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.42
user 3.21
sys 0.19

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/69206/ft2_4FGL_J1040.5+0617_daily_bin1248.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/69206/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin1248.fits evtable="EVENTS" outfile="/scratch/kocevski/69206/ft1_filtered_4FGL_J1040.5+0617_daily_bin1248.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.33
sys 0.16

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/69206/ft1_filtered_4FGL_J1040.5+0617_daily_bin1248.fits" evtable="EVENTS" scfile=/scratch/kocevski/69206/ft2_4FGL_J1040.5+0617_daily_bin1248.fits sctable="SC_DATA" outfile=/scratch/kocevski/69206/ltcube_562809601_563068801_4FGL_J1040.5+0617_daily_bin1248.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/69206/ft2_4FGL_J1040.5+0617_daily_bin1248.fits
.....................!
real 14.86
user 14.49
sys 0.33

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/69206/ft1_filtered_4FGL_J1040.5+0617_daily_bin1248.fits evtable="EVENTS" scfile=/scratch/kocevski/69206/ft2_4FGL_J1040.5+0617_daily_bin1248.fits sctable="SC_DATA" expcube=/scratch/kocevski/69206/ltcube_562809601_563068801_4FGL_J1040.5+0617_daily_bin1248.fits outfile=/scratch/kocevski/69206/expmap_562809601_563068801_4FGL_J1040.5+0617_daily_bin1248.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/69206/ltcube_562809601_563068801_4FGL_J1040.5+0617_daily_bin1248.fits
.....................!
real 193.29
user 187.67
sys 5.24

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/69206/ft1_filtered_4FGL_J1040.5+0617_daily_bin1248.fits scfile=/scratch/kocevski/69206/ft2_4FGL_J1040.5+0617_daily_bin1248.fits outfile=/scratch/kocevski/69206/cmap_562809601_563068801_4FGL_J1040.5+0617_daily_bin1248.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.37
sys 0.16

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/69206/ft1_filtered_4FGL_J1040.5+0617_daily_bin1248.fits scfile=/scratch/kocevski/69206/ft2_4FGL_J1040.5+0617_daily_bin1248.fits outfile=/scratch/kocevski/69206/cmap_HighResolution_562809601_563068801_4FGL_J1040.5+0617_daily_bin1248.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.57
user 0.42
sys 0.14

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10018E-03   1.0000         .10000E-03   10000.    
     3 'norm      '    .10002E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    2.7612       1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10016E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10086E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    4.1099       1.0000         .10000E-03   10000.    
     8 'norm      '    4.1498       1.0000         .10000E-03   10000.    
     9 'Prefactor '    3.0695       1.0000         .10000E-03   10000.    
    10 'Prefactor '    3.7229       1.0000         .10000E-03   10000.    
    11 'Prefactor '    11.346       1.0000         .10000E-03   10000.    
    12 'Prefactor '    .77824E-02   1.0000         .10000E-03   10000.    
    13 'norm      '    .19830       1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10005E-03   1.0000         .10000E-03   10000.    
    15 'norm      '    .10653E-03   1.0000         .10000E-03   10000.    
    16 'Prefactor '    29.574       1.0000         .10000E-03   10000.    
    17 'norm      '    1.6284       1.0000         .10000E-03   10000.    
    18 'Normalizat'    1.3569       1.0000         .10000E-01   10.000    
    19 'Prefactor '    .83244       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=   8370.974     FROM MIGRAD    STATUS=CONVERGED    416 CALLS     1937 TOTAL
                     EDM=   .22E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.3%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    1.9267        .52111E-07** at limit **
   2  Prefactor     .10000E-03    29.567        .12461E-05** at limit **
   3  norm          .10000E-03    2.6868        .18244E-06** at limit **
   4  Prefactor     2.7618        3.4883        .21652E-06   -.13087E-02
   5  Prefactor     .10000E-03    14.606        .17215E-05** at limit **
   6  Prefactor     .10000E-03    15.855       -.12208E-05** at limit **
   7  Prefactor     4.1105        8.4708        .35447E-06   -.57339E-03
   8  norm          4.1500        1.3924        .53360E-08   -.21409E-04
   9  Prefactor     3.0694        3.1089        .18125E-06   -.88561E-03
  10  Prefactor     3.7238        2.8529        .18161E-06    .34694E-04
  11  Prefactor     11.349        6.5690        .15242E-05    .20150E-03
  12  Prefactor     .10019E-03    3.2556       -.34457E-06** at limit **
  13  norm          .19836        .28220        .19258E-07    .16102E-03
  14  Prefactor     .10000E-03    2.7993        .22700E-06** at limit **
  15  norm          .10000E-03    .65650       -.18642E-06** at limit **
  16  Prefactor     29.563        20.112       -.11704E-06    .42205E-04
  17  norm          1.6288        5.7366       -.26530E-05   -.16898E-03
  18  Normalizat    1.3564        .16594       -.53124E-06    .17781E-03
  19  Prefactor     .83283        .13648        .12016E-06    .58191E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 2.7618
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 4.1105
  norm       = 4.14995
  Prefactor  = 3.06941
  Prefactor  = 3.7238
  Prefactor  = 11.3489
  Prefactor  = 0.000100188
  norm       = 0.198362
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 29.5633
  norm       = 1.62875
  Normalizat = 1.35642
  Prefactor  = 0.832832
 **********
 **   18 **HESSE 
 **********

 FCN=   8370.974     FROM HESSE     STATUS=OK           282 CALLS     2219 TOTAL
                     EDM=   .19E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    1.9284        .12402E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    29.690        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          .10000E-03    2.6878        .14646E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     2.7618        4.3380        .11293E-02   -1.5376    
   5  Prefactor     .10000E-03    14.625        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    15.879        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     4.1105        9.1100        .99425E-03   -1.5302    
   8  norm          4.1500        1.3921        .60224E-04   -1.5301    
   9  Prefactor     3.0694        3.3438        .84862E-03   -1.5358    
  10  Prefactor     3.7238        2.8541        .12747E-03   -1.5322    
  11  Prefactor     11.349        6.6035        .11893E-03   -1.5034    
  12  Prefactor     .10019E-03    3.3703        .53138E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          .19836        .24295        .55901E-03   -1.5619    
  14  Prefactor     .10000E-03    2.8174        .14937E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          .10000E-03    1.2258        .14108E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     29.563        20.176        .73674E-04   -1.4620    
  17  norm          1.6288        5.7988        .33144E-03   -1.5453    
  18  Normalizat    1.3564        .19354        .23970E-03   -.81897    
  19  Prefactor     .83283        .15938        .25652E-03   -.98529    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.89423e-09
Minuit parameter uncertainties:
  1  4.27064e-07
  2  2.72406e-05
  3  1.09702e-06
  4  4.33853
  5  2.34222e-05
  6  2.07893e-05
  7  9.11303
  8  1.39214
  9  3.34401
  10  2.85418
  11  6.60394
  12  0.00159015
  13  0.242949
  14  2.46832e-06
  15  8.5312e-06
  16  20.1809
  17  5.80077
  18  0.193646
  19  0.159469
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  3.724e+00  2.854e+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:  8.328e-01  1.595e-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.356e+00  1.936e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 2.46
Ra Dec: 160.150 6.285
Photon Index (Fixed Index): 2.37 +/- 0.00
Photon Flux (Fixed Index): 4.50e-08 +/- 3.45e-08
Energy Flux (Fixed Index): 1.54e-05 +/- 1.18e-05

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

Saving results to:
/scratch/kocevski/69206/likelihoodResults_562809601_563068801_4FGL_J1040.5+0617_daily_bin1248.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) = 8369.74074975
delta logL = 1.23276538456

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 8369.73309529
delta logL = 1.24041983724

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    1.6143       1.0000         .10000E-03   10000.    
     2 'Index     '    3.3383       1.0000          .0000       10.000    
     3 'Normalizat'    1.2980       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .86379       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=   8369.733     FROM MIGRAD    STATUS=CONVERGED     51 CALLS      268 TOTAL
                     EDM=   .35E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     1.6151        11.803        .83319E-02   -.55664E-03
   2  Index         3.3382        2.5359        .12965        .36547E-04
   3  Normalizat    1.2981        .51834E-01    .55166E-01   -.10041E-03
   4  Prefactor     .86379        .43522E-01    .44542E-01    .10218E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 1.61508
  Index      = 3.33823
  Normalizat = 1.2981
  Prefactor  = 0.863789
 **********
 **   18 **HESSE 
 **********

 FCN=   8369.733     FROM HESSE     STATUS=OK            33 CALLS      301 TOTAL
                     EDM=   .16E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     1.6151        2.3515        .58921E-04   -1.5454    
   2  Index         3.3382        .85881        .48614E-02   -.33880    
   3  Normalizat    1.2981        .18914        .24393E-03   -.83623    
   4  Prefactor     .86379        .16003        .25226E-03   -.97418    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.58434e-10
Minuit parameter uncertainties:
  1  2.35159
  2  0.863634
  3  0.18924
  4  0.160119
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/69206': 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) = 8369.73309469
delta logL = 1.24042043765

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  1.615e+00  2.352e+00  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  3.338e+00  8.636e-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:  8.638e-01  1.601e-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.298e+00  1.892e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 5.09
Ra Dec: 160.150 6.285
Photon Index (Free Index): 3.34 +/- 0.86
Photon Flux (Free Index): 9.27e-08 +/- 5.16e-08
Energy Flux (Free Index): 1.62e-05 +/- 8.99e-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/69206/cmap_HighResolution_562809601_563068801_4FGL_J1040.5+0617_daily_bin1248.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='8.85e-03', comment='SUCCESS', photon_flux='4.50e-08', energy_flux2='1.62e-05', photon_flux_error='3.45e-08', dlogl='1.24e+00', energy_flux='1.54e-05', photon_flux2='9.27e-08', job_status='DONE', time_completed='2021-09-02 08:52:39.539012', photon_index_error2='0.86', photon_index2='3.34', ts='2.46', fit_tolerance='1e-08', GAL='0.83', photon_index_error='0.00', photon_flux_upper_limit='1.15e-07', energy_flux_error2='8.99e-06', EG='1.36', time_epoch_completed='1630597959.54', return_code='0', job_id='69206', GAL2='0.86', EG2='1.30', return_code2='0', energy_flux_error='1.18e-05', photon_flux_error2='5.16e-08', ts2='5.09', photon_index='2.37' WHERE bin_id='1248' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:52:39 PDT 2021


------------------------------------------------------------
Sender: LSF System <scs@bullet0182>
Subject: Job 69206: <4FGL_J1040.5+0617_daily_bin1248> in cluster <slac> Done

Job <4FGL_J1040.5+0617_daily_bin1248> was submitted from host <rhel6-64d> by user <kocevski> in cluster <slac> at Thu Sep  2 08:36:36 2021
Job was executed on host(s) <bullet0182>, in queue <medium>, as user <kocevski> in cluster <slac> at Thu Sep  2 08:36:47 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:36:47 2021
Terminated at Thu Sep  2 08:52:40 2021
Results reported at Thu Sep  2 08:52:40 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin1248 160.15 6.2848 562809601 563068801 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 :                                   689.07 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             276.86 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   952 sec.
    Turnaround time :                            964 sec.

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

