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


Performing analysis on: 4FGL_J1040.5+0617_daily_bin1066
RA = 160.15, Dec = 6.2848
tmin = 515635201, tmax = 515894401
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='67977', job_status='RUN', time_executed='2021-09-02 08:35:31.051892', time_epoch_executed='1630596931.05' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='1066'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/67977

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/67977/ft1_4FGL_J1040.5+0617_daily_bin1066.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/67977/ft2_4FGL_J1040.5+0617_daily_bin1066.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/67977/ft1_4FGL_J1040.5+0617_daily_bin1066.fits outfile=/scratch/kocevski/67977/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin1066.fits ra=160.15 dec=6.2848 rad=12.0 tmin=515635201.0 tmax=515894401.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.54
user 3.26
sys 0.22

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/67977/ft1_filtered_4FGL_J1040.5+0617_daily_bin1066.fits" evtable="EVENTS" scfile=/scratch/kocevski/67977/ft2_4FGL_J1040.5+0617_daily_bin1066.fits sctable="SC_DATA" outfile=/scratch/kocevski/67977/ltcube_515635201_515894401_4FGL_J1040.5+0617_daily_bin1066.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/67977/ft2_4FGL_J1040.5+0617_daily_bin1066.fits
.....................!
real 17.34
user 16.93
sys 0.29

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/67977/ft1_filtered_4FGL_J1040.5+0617_daily_bin1066.fits evtable="EVENTS" scfile=/scratch/kocevski/67977/ft2_4FGL_J1040.5+0617_daily_bin1066.fits sctable="SC_DATA" expcube=/scratch/kocevski/67977/ltcube_515635201_515894401_4FGL_J1040.5+0617_daily_bin1066.fits outfile=/scratch/kocevski/67977/expmap_515635201_515894401_4FGL_J1040.5+0617_daily_bin1066.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/67977/ltcube_515635201_515894401_4FGL_J1040.5+0617_daily_bin1066.fits
.....................!
real 191.50
user 186.86
sys 3.65

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/67977/ft1_filtered_4FGL_J1040.5+0617_daily_bin1066.fits scfile=/scratch/kocevski/67977/ft2_4FGL_J1040.5+0617_daily_bin1066.fits outfile=/scratch/kocevski/67977/cmap_515635201_515894401_4FGL_J1040.5+0617_daily_bin1066.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.40
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/67977/ft1_filtered_4FGL_J1040.5+0617_daily_bin1066.fits scfile=/scratch/kocevski/67977/ft2_4FGL_J1040.5+0617_daily_bin1066.fits outfile=/scratch/kocevski/67977/cmap_HighResolution_515635201_515894401_4FGL_J1040.5+0617_daily_bin1066.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.59
user 0.43
sys 0.16

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

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 '    .10015E-03   1.0000         .10000E-03   10000.    
     3 'norm      '    9.2973       1.0000         .10000E-03   10000.    
     4 'Prefactor '    6.8003       1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10070E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10027E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    9.3366       1.0000         .10000E-03   10000.    
     8 'norm      '    1.9159       1.0000         .10000E-03   10000.    
     9 'Prefactor '    3.7862       1.0000         .10000E-03   10000.    
    10 'Prefactor '    3.1693       1.0000         .10000E-03   10000.    
    11 'Prefactor '    10.537       1.0000         .10000E-03   10000.    
    12 'Prefactor '    .16445E-02   1.0000         .10000E-03   10000.    
    13 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    7.1959       1.0000         .10000E-03   10000.    
    15 'norm      '    .80451       1.0000         .10000E-03   10000.    
    16 'Prefactor '    78.763       1.0000         .10000E-03   10000.    
    17 'norm      '    5.3812       1.0000         .10000E-03   10000.    
    18 'Normalizat'    .92085       1.0000         .10000E-01   10.000    
    19 'Prefactor '    1.2491       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=   5604.239     FROM MIGRAD    STATUS=CONVERGED    387 CALLS     1938 TOTAL
                     EDM=   .67E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .3%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    6.2997       -.52091E-07** at limit **
   2  Prefactor     .10000E-03    29.365       -.58598E-05** at limit **
   3  norm          9.3001        13.752       -.71555E-06   -.24432E-04
   4  Prefactor     6.8005        9.1269       -.22851E-07   -.77430E-04
   5  Prefactor     .10000E-03    72.684       -.30473E-05** at limit **
   6  Prefactor     .10000E-03    33.228        .77328E-05** at limit **
   7  Prefactor     9.3352        15.087       -.31959E-06   -.36649E-04
   8  norm          1.9159        1.4157        .44958E-07   -.10096E-04
   9  Prefactor     3.7867        5.7901       -.65503E-05   -.35512E-03
  10  Prefactor     3.1646        3.3485       -.92697E-07   -.20626E-04
  11  Prefactor     10.539        7.5923       -.14903E-05   -.67261E-04
  12  Prefactor     .10001E-03    8.8658       -.39352E-06** at limit **
  13  norm          .10000E-03    .24854       -.40297E-06** at limit **
  14  Prefactor     7.1908        9.4201        .40439E-05    .46729E-03
  15  norm          .80615        1.5540        .24779E-06   -.52361E-03
  16  Prefactor     78.745        35.370       -.10314E-04    .84473E-04
  17  norm          5.3823        10.008       -.99795E-06   -.76665E-04
  18  Normalizat    .92031        .21567        .43947E-05    .97952E-04
  19  Prefactor     1.2494        .17888       -.15174E-06    .33284E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 9.30009
  Prefactor  = 6.80051
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 9.33523
  norm       = 1.91588
  Prefactor  = 3.78668
  Prefactor  = 3.16459
  Prefactor  = 10.5393
  Prefactor  = 0.000100005
  norm       = 0.0001
  Prefactor  = 7.19084
  norm       = 0.80615
  Prefactor  = 78.7449
  norm       = 5.38231
  Normalizat = 0.920312
  Prefactor  = 1.24943
 **********
 **   18 **HESSE 
 **********

 FCN=   5604.239     FROM HESSE     STATUS=OK           274 CALLS     2212 TOTAL
                     EDM=   .16E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    6.3190        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    29.400        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          9.3001        13.734        .13144E-03   -1.5098    
   4  Prefactor     6.8005        9.1123        .15386E-03   -1.5186    
   5  Prefactor     .10000E-03    73.158        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    33.181        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     9.3352        15.069        .13116E-03   -1.5097    
   8  norm          1.9159        1.4057        .73614E-04   -1.5431    
   9  Prefactor     3.7867        5.8451        .20746E-03   -1.5319    
  10  Prefactor     3.1646        3.2736        .13153E-03   -1.5352    
  11  Prefactor     10.539        7.5933        .12343E-03   -1.5059    
  12  Prefactor     .10001E-03    38.054        .40021E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          .10000E-03    .49302        .68491E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     7.1908        8.8369        .14953E-03   -1.5172    
  15  norm          .80615        1.5060        .11870E-03   -1.5528    
  16  Prefactor     78.745        34.852        .45251E-04   -1.3931    
  17  norm          5.3823        9.9920        .17324E-03   -1.5244    
  18  Normalizat    .92031        .25041        .29421E-03   -.95750    
  19  Prefactor     1.2494        .21088        .22922E-03   -.84824    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.63663e-09
Minuit parameter uncertainties:
  1  8.16482e-06
  2  1.47958e-05
  3  13.7389
  4  9.11417
  5  0.000162518
  6  2.72699e-05
  7  15.0754
  8  1.40568
  9  5.84602
  10  3.27383
  11  7.59396
  12  0.000914318
  13  2.8387e-05
  14  8.83846
  15  1.5061
  16  34.8608
  17  9.99508
  18  0.250726
  19  0.211023
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  3.165e+00  3.274e+00  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  2.368e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
218        Scale:  8.643e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
533    Prefactor:  1.249e+00  2.110e-01  0.000e+00  1.000e+01 ( 1.000e+00)
534        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
535        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

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


TS (Fixed Index): 1.75
Ra Dec: 160.150 6.285
Photon Index (Fixed Index): 2.37 +/- 0.00
Photon Flux (Fixed Index): 3.82e-08 +/- 3.95e-08
Energy Flux (Fixed Index): 1.31e-05 +/- 1.35e-05

TS (Fixed Index): 1.75
Ra Dec: 160.150 6.285
Photon Flux Upper Limit: 1.34e-07 ph cm-2 s-1
Energy Flux Upper Limit: 1.03e-02 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/67977/likelihoodResults_515635201_515894401_4FGL_J1040.5+0617_daily_bin1066.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) = 5604.10527457
delta logL = 0.133878587523

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 5604.10133102
delta logL = 0.137822136226

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    3.3958       1.0000         .10000E-03   10000.    
     2 'Index     '    1.9404       1.0000          .0000       10.000    
     3 'Normalizat'    .93967       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.2394       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=   5604.101     FROM MIGRAD    STATUS=CONVERGED     54 CALLS      236 TOTAL
                     EDM=   .37E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     3.3907        177.45        .54888E-02    .22585E-03
   2  Index         1.9392        5.2912        .26144        .15215E-04
   3  Normalizat    .93935        .19665        .65895E-01    .53865E-03
   4  Prefactor     1.2398        .11751        .52013E-01    .15002E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 3.39067
  Index      = 1.93915
  Normalizat = 0.939346
  Prefactor  = 1.23978
 **********
 **   18 **HESSE 
 **********

 FCN=   5604.101     FROM HESSE     STATUS=OK            29 CALLS      265 TOTAL
                     EDM=   .12E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     3.3907        3.6435        .14078E-03   -1.5340    
   2  Index         1.9392        .75826        .10248E-01   -.65880    
   3  Normalizat    .93935        .23427        .29147E-03   -.95091    
   4  Prefactor     1.2398        .20875        .22996E-03   -.85116    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.17327e-09
Minuit parameter uncertainties:
  1  3.64369
  2  0.762983
  3  0.234522
  4  0.208893
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/67977': 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) = 5604.10132746
delta logL = 0.137825696243

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  3.391e+00  3.644e+00  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  1.939e+00  7.630e-01  0.000e+00  1.000e+01 (-1.000e+00)
218        Scale:  8.643e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
533    Prefactor:  1.240e+00  2.089e-01  0.000e+00  1.000e+01 ( 1.000e+00)
534        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
535        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
532   Normalization:  9.393e-01  2.345e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 2.02
Ra Dec: 160.150 6.285
Photon Index (Free Index): 1.94 +/- 0.76
Photon Flux (Free Index): 2.36e-08 +/- 3.51e-08
Energy Flux (Free Index): 1.91e-05 +/- 2.73e-05

Creating a high resolution counts map...
INFO: Auto-setting vmin to  0.000e+00 [aplpy.core]
INFO: Auto-setting vmax to  0.000e+00 [aplpy.core]
Saving /scratch/kocevski/67977/cmap_HighResolution_515635201_515894401_4FGL_J1040.5+0617_daily_bin1066.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.03e-02', comment='SUCCESS', photon_flux='3.82e-08', energy_flux2='1.91e-05', photon_flux_error='3.95e-08', dlogl='1.38e-01', energy_flux='1.31e-05', photon_flux2='2.36e-08', job_status='DONE', time_completed='2021-09-02 08:45:03.618597', photon_index_error2='0.76', photon_index2='1.94', ts='1.75', fit_tolerance='1e-08', GAL='1.25', photon_index_error='0.00', photon_flux_upper_limit='1.34e-07', energy_flux_error2='2.73e-05', EG='0.92', time_epoch_completed='1630597503.62', return_code='0', job_id='67977', GAL2='1.24', EG2='0.94', return_code2='0', energy_flux_error='1.35e-05', photon_flux_error2='3.51e-08', ts2='2.02', photon_index='2.37' WHERE bin_id='1066' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:45:03 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0278>
Subject: Job 67977: <4FGL_J1040.5+0617_daily_bin1066> in cluster <slac> Done

Job <4FGL_J1040.5+0617_daily_bin1066> was submitted from host <rhel6-64j> by user <kocevski> in cluster <slac> at Thu Sep  2 08:31:27 2021
Job was executed on host(s) <bullet0278>, in queue <medium>, as user <kocevski> in cluster <slac> at Thu Sep  2 08:32:35 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:32:35 2021
Terminated at Thu Sep  2 08:45:04 2021
Results reported at Thu Sep  2 08:45:04 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin1066 160.15 6.2848 515635201 515894401 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 :                                   564.01 sec.
    Max Memory :                                 1255 MB
    Average Memory :                             291.80 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   748 sec.
    Turnaround time :                            817 sec.

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

