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


Performing analysis on: 4FGL_J1040.5+0617_daily_bin1563
RA = 160.15, Dec = 6.2848
tmin = 644457601, tmax = 644716801
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='70524', job_status='RUN', time_executed='2021-09-02 08:44:06.136765', time_epoch_executed='1630597446.14' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='1563'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/70524

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/70524/ft1_4FGL_J1040.5+0617_daily_bin1563.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/70524/ft2_4FGL_J1040.5+0617_daily_bin1563.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/70524/ft1_4FGL_J1040.5+0617_daily_bin1563.fits outfile=/scratch/kocevski/70524/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin1563.fits ra=160.15 dec=6.2848 rad=12.0 tmin=644457601.0 tmax=644716801.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.78
user 2.57
sys 0.19

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

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

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/70524/ft1_filtered_4FGL_J1040.5+0617_daily_bin1563.fits" evtable="EVENTS" scfile=/scratch/kocevski/70524/ft2_4FGL_J1040.5+0617_daily_bin1563.fits sctable="SC_DATA" outfile=/scratch/kocevski/70524/ltcube_644457601_644716801_4FGL_J1040.5+0617_daily_bin1563.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/70524/ft2_4FGL_J1040.5+0617_daily_bin1563.fits
.....................!
real 17.15
user 16.73
sys 0.37

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/70524/ft1_filtered_4FGL_J1040.5+0617_daily_bin1563.fits evtable="EVENTS" scfile=/scratch/kocevski/70524/ft2_4FGL_J1040.5+0617_daily_bin1563.fits sctable="SC_DATA" expcube=/scratch/kocevski/70524/ltcube_644457601_644716801_4FGL_J1040.5+0617_daily_bin1563.fits outfile=/scratch/kocevski/70524/expmap_644457601_644716801_4FGL_J1040.5+0617_daily_bin1563.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/70524/ltcube_644457601_644716801_4FGL_J1040.5+0617_daily_bin1563.fits
.....................!
real 191.34
user 186.23
sys 4.74

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/70524/ft1_filtered_4FGL_J1040.5+0617_daily_bin1563.fits scfile=/scratch/kocevski/70524/ft2_4FGL_J1040.5+0617_daily_bin1563.fits outfile=/scratch/kocevski/70524/cmap_644457601_644716801_4FGL_J1040.5+0617_daily_bin1563.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.58
user 0.40
sys 0.14

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

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    10.788       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     3 'norm      '    13.073       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10059E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    114.69       1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10019E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    1.5251       1.0000         .10000E-03   10000.    
     8 'norm      '    5.4296       1.0000         .10000E-03   10000.    
     9 'Prefactor '    2.4181       1.0000         .10000E-03   10000.    
    10 'Prefactor '    2.4344       1.0000         .10000E-03   10000.    
    11 'Prefactor '    27.312       1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    1.1121       1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10031E-03   1.0000         .10000E-03   10000.    
    15 'norm      '    1.0380       1.0000         .10000E-03   10000.    
    16 'Prefactor '    22.520       1.0000         .10000E-03   10000.    
    17 'norm      '    7.2333       1.0000         .10000E-03   10000.    
    18 'Normalizat'    .42838       1.0000         .10000E-01   10.000    
    19 'Prefactor '    1.5489       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=   8636.744     FROM MIGRAD    STATUS=CONVERGED    376 CALLS     1903 TOTAL
                     EDM=   .79E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  2.3%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     10.788        12.168        .13118E-05   -.30170E-04
   2  Prefactor     .10000E-03    8.5550       -.62119E-08** at limit **
   3  norm          13.072        15.943        .21514E-05   -.43689E-04
   4  Prefactor     .10000E-03    9.4592       -.11052E-07** at limit **
   5  Prefactor     114.66        58.477       -.17111E-04   -.14139E-03
   6  Prefactor     .10000E-03    24.110        .38373E-06** at limit **
   7  Prefactor     1.5248        16.291        .58049E-05   -.67531E-03
   8  norm          5.4295        1.6256        .16086E-07   -.13846E-03
   9  Prefactor     2.4166        4.3292       -.13373E-05   -.22129E-02
  10  Prefactor     2.4344        2.3073        .51051E-08   -.10926E-03
  11  Prefactor     27.312        7.7504       -.23959E-06   -.71550E-04
  12  Prefactor     .10000E-03    2.4487        .15298E-07** at limit **
  13  norm          1.1118        .49267       -.53901E-07   -.38401E-03
  14  Prefactor     .10000E-03    5.9287       -.29463E-06** at limit **
  15  norm          1.0378        .89357       -.29775E-07   -.34810E-03
  16  Prefactor     22.518        16.394       -.13644E-05   -.39332E-04
  17  norm          7.2334        7.1586       -.26431E-06   -.23454E-04
  18  Normalizat    .42833        .19326        .77667E-05    .22699E-05
  19  Prefactor     1.5489        .16450       -.18015E-05    .89450E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 10.7879
  Prefactor  = 0.0001
  norm       = 13.0723
  Prefactor  = 0.0001
  Prefactor  = 114.664
  Prefactor  = 0.0001
  Prefactor  = 1.52476
  norm       = 5.4295
  Prefactor  = 2.41659
  Prefactor  = 2.4344
  Prefactor  = 27.3123
  Prefactor  = 0.0001
  norm       = 1.11184
  Prefactor  = 0.0001
  norm       = 1.03782
  Prefactor  = 22.5184
  norm       = 7.2334
  Normalizat = 0.428334
  Prefactor  = 1.5489
 **********
 **   18 **HESSE 
 **********

 FCN=   8636.744     FROM HESSE     STATUS=OK           276 CALLS     2179 TOTAL
                     EDM=   .13E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     10.788        12.129        .12198E-03   -1.5051    
   2  Prefactor     .10000E-03    8.5569        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          13.072        15.914        .11078E-03   -1.4985    
   4  Prefactor     .10000E-03    9.5660        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     114.66        58.545        .18784E-03   -1.3562    
   6  Prefactor     .10000E-03    24.131        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     1.5248        26.854        .17290E-02   -1.5461    
   8  norm          5.4295        1.6358        .61791E-04   -1.5242    
   9  Prefactor     2.4166        6.3440        .13161E-02   -1.5397    
  10  Prefactor     2.4344        2.2910        .13101E-03   -1.5396    
  11  Prefactor     27.312        7.7342        .76656E-04   -1.4662    
  12  Prefactor     .10000E-03    2.4647        .14196E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          1.1118        .48597        .41147E-04   -1.5497    
  14  Prefactor     .10000E-03    6.0378        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          1.0378        .86685        .77393E-04   -1.5504    
  16  Prefactor     22.518        16.389        .84406E-04   -1.4759    
  17  norm          7.2334        7.1526        .14914E-03   -1.5170    
  18  Normalizat    .42833        .20377        .40930E-03   -1.1586    
  19  Prefactor     1.5489        .17837        .21011E-03   -.76179    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.31669e-08
Minuit parameter uncertainties:
  1  12.132
  2  6.73924e-07
  3  15.9189
  4  0.000118658
  5  58.5744
  6  0.000144533
  7  12.8041
  8  1.63584
  9  6.34581
  10  2.29105
  11  7.73448
  12  4.61605e-06
  13  0.485968
  14  1.85085e-05
  15  0.866857
  16  16.3918
  17  7.15346
  18  0.204124
  19  0.17844
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  2.434e+00  2.291e+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.549e+00  1.784e-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:  4.283e-01  2.041e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 1.66
Ra Dec: 160.150 6.285
Photon Index (Fixed Index): 2.37 +/- 0.00
Photon Flux (Fixed Index): 2.94e-08 +/- 2.77e-08
Energy Flux (Fixed Index): 1.01e-05 +/- 9.47e-06

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

Saving results to:
/scratch/kocevski/70524/likelihoodResults_644457601_644716801_4FGL_J1040.5+0617_daily_bin1563.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) = 8636.73747266
delta logL = 0.00675431747004

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 8636.73542304
delta logL = 0.00880393501393

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    2.5827       1.0000         .10000E-03   10000.    
     2 'Index     '    2.2640       1.0000          .0000       10.000    
     3 'Normalizat'    .43252       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.5462       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=   8636.735     FROM MIGRAD    STATUS=CONVERGED     82 CALLS      233 TOTAL
                     EDM=   .82E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     2.5828        2.6572        .13561E-03   -.23239E-03
   2  Index         2.2639        .77854        .10442E-01    .13752E-03
   3  Normalizat    .43232        .19083        .40745E-03    .73829E-04
   4  Prefactor     1.5464        .17579        .21024E-03    .24935E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 2.58278
  Index      = 2.26391
  Normalizat = 0.432315
  Prefactor  = 1.54645
 **********
 **   18 **HESSE 
 **********

 FCN=   8636.735     FROM HESSE     STATUS=OK            25 CALLS      258 TOTAL
                     EDM=   .64E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     2.5828        2.6051        .54243E-05   -1.5387    
   2  Index         2.2639        .76282        .20884E-02   -.57904    
   3  Normalizat    .43232        .19071        .16298E-04   -1.1566    
   4  Prefactor     1.5464        .17573        .42047E-04   -.76247    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 6.40879e-11
Minuit parameter uncertainties:
  1  2.60519
  2  0.767106
  3  0.190998
  4  0.175798
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/70524': 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) = 8636.73542225
delta logL = 0.00880472620156

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  2.583e+00  2.605e+00  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  2.264e+00  7.671e-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.546e+00  1.758e-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:  4.323e-01  1.910e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 1.67
Ra Dec: 160.150 6.285
Photon Index (Free Index): 2.26 +/- 0.77
Photon Flux (Free Index): 2.70e-08 +/- 3.14e-08
Energy Flux (Free Index): 1.08e-05 +/- 1.21e-05

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/70524/cmap_HighResolution_644457601_644716801_4FGL_J1040.5+0617_daily_bin1563.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='7.08e-03', comment='SUCCESS', photon_flux='2.94e-08', energy_flux2='1.08e-05', photon_flux_error='2.77e-08', dlogl='8.80e-03', energy_flux='1.01e-05', photon_flux2='2.70e-08', job_status='DONE', time_completed='2021-09-02 08:56:02.843099', photon_index_error2='0.77', photon_index2='2.26', ts='1.66', fit_tolerance='1e-08', GAL='1.55', photon_index_error='0.00', photon_flux_upper_limit='9.18e-08', energy_flux_error2='1.21e-05', EG='0.43', time_epoch_completed='1630598162.84', return_code='0', job_id='70524', GAL2='1.55', EG2='0.43', return_code2='0', energy_flux_error='9.47e-06', photon_flux_error2='3.14e-08', ts2='1.67', photon_index='2.37' WHERE bin_id='1563' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:56:02 PDT 2021


------------------------------------------------------------
Sender: LSF System <scs@bullet0136>
Subject: Job 70524: <4FGL_J1040.5+0617_daily_bin1563> in cluster <slac> Done

Job <4FGL_J1040.5+0617_daily_bin1563> was submitted from host <rhel6-64k> by user <kocevski> in cluster <slac> at Thu Sep  2 08:41:10 2021
Job was executed on host(s) <bullet0136>, in queue <medium>, as user <kocevski> in cluster <slac> at Thu Sep  2 08:41: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:41:35 2021
Terminated at Thu Sep  2 08:56:03 2021
Results reported at Thu Sep  2 08:56:03 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin1563 160.15 6.2848 644457601 644716801 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 :                                   686.00 sec.
    Max Memory :                                 1222 MB
    Average Memory :                             269.41 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   869 sec.
    Turnaround time :                            893 sec.

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

