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


Performing analysis on: 4FGL_J1040.5+0617_daily_bin106
RA = 160.15, Dec = 6.2848
tmin = 266803201, tmax = 267062401
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='58425', job_status='RUN', time_executed='2021-09-02 08:06:24.718579', time_epoch_executed='1630595184.72' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='106'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/58425

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/58425/ft1_4FGL_J1040.5+0617_daily_bin106.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/58425/ft2_4FGL_J1040.5+0617_daily_bin106.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/58425/ft1_4FGL_J1040.5+0617_daily_bin106.fits outfile=/scratch/kocevski/58425/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin106.fits ra=160.15 dec=6.2848 rad=12.0 tmin=266803201.0 tmax=267062401.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.03
user 1.81
sys 0.19

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/58425/ft1_filtered_4FGL_J1040.5+0617_daily_bin106.fits" evtable="EVENTS" scfile=/scratch/kocevski/58425/ft2_4FGL_J1040.5+0617_daily_bin106.fits sctable="SC_DATA" outfile=/scratch/kocevski/58425/ltcube_266803201_267062401_4FGL_J1040.5+0617_daily_bin106.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/58425/ft2_4FGL_J1040.5+0617_daily_bin106.fits
.....................!
real 18.94
user 18.54
sys 0.30

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/58425/ft1_filtered_4FGL_J1040.5+0617_daily_bin106.fits evtable="EVENTS" scfile=/scratch/kocevski/58425/ft2_4FGL_J1040.5+0617_daily_bin106.fits sctable="SC_DATA" expcube=/scratch/kocevski/58425/ltcube_266803201_267062401_4FGL_J1040.5+0617_daily_bin106.fits outfile=/scratch/kocevski/58425/expmap_266803201_267062401_4FGL_J1040.5+0617_daily_bin106.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/58425/ltcube_266803201_267062401_4FGL_J1040.5+0617_daily_bin106.fits
.....................!
real 193.66
user 189.01
sys 4.11

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/58425/ft1_filtered_4FGL_J1040.5+0617_daily_bin106.fits scfile=/scratch/kocevski/58425/ft2_4FGL_J1040.5+0617_daily_bin106.fits outfile=/scratch/kocevski/58425/cmap_266803201_267062401_4FGL_J1040.5+0617_daily_bin106.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.14

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/58425/ft1_filtered_4FGL_J1040.5+0617_daily_bin106.fits scfile=/scratch/kocevski/58425/ft2_4FGL_J1040.5+0617_daily_bin106.fits outfile=/scratch/kocevski/58425/cmap_HighResolution_266803201_267062401_4FGL_J1040.5+0617_daily_bin106.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.40
sys 0.15

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .17814E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    .97064E-03   1.0000         .10000E-03   10000.    
     3 'norm      '    .21149E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    10.324       1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10019E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .31106E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10112E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    .10024E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    4.1769       1.0000         .10000E-03   10000.    
    10 'Prefactor '    .92021       1.0000         .10000E-03   10000.    
    11 'Prefactor '    6.5846       1.0000         .10000E-03   10000.    
    12 'Prefactor '    .15315E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    2.5501       1.0000         .10000E-03   10000.    
    14 'Prefactor '    2.4845       1.0000         .10000E-03   10000.    
    15 'norm      '    .47567       1.0000         .10000E-03   10000.    
    16 'Prefactor '    .10042E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    .10115E-03   1.0000         .10000E-03   10000.    
    18 'Normalizat'    1.3045       1.0000         .10000E-01   10.000    
    19 'Prefactor '    .97339       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=   8554.279     FROM MIGRAD    STATUS=CONVERGED    376 CALLS     1603 TOTAL
                     EDM=   .98E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.4%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    5.4862       -.16807E-05** at limit **
   2  Prefactor     .10000E-03    30.139        .22568E-04** at limit **
   3  norm          .10000E-03    3.4138        .15542E-08** at limit **
   4  Prefactor     10.371        6.1193        .13380E-05    .14605E-03
   5  Prefactor     .10000E-03    29.489       -.64883E-05** at limit **
   6  Prefactor     .10000E-03    12.928       -.39043E-05** at limit **
   7  Prefactor     .10000E-03    5.9234        .31305E-05** at limit **
   8  norm          .10000E-03    .41599       -.92006E-07** at limit **
   9  Prefactor     4.1799        5.6031        .31457E-06   -.15991E-02
  10  Prefactor     .91998        1.9134        .15300E-06   -.23114E-03
  11  Prefactor     6.5796        5.4195        .21291E-06   -.11279E-04
  12  Prefactor     .10000E-03    3.7401        .12984E-07** at limit **
  13  norm          2.5499        .64725       -.34905E-07   -.17949E-04
  14  Prefactor     2.4906        3.9283        .75766E-06   -.22223E-02
  15  norm          .47665        1.2183       -.63934E-07   -.43898E-03
  16  Prefactor     .10000E-03    6.5777       -.25875E-06** at limit **
  17  norm          .10000E-03    5.5530       -.92039E-06** at limit **
  18  Normalizat    1.3043        .16806       -.14944E-06    .50666E-04
  19  Prefactor     .97339        .13931        .28201E-06   -.61117E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 0.000100001
  norm       = 0.0001
  Prefactor  = 10.3705
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 4.17995
  Prefactor  = 0.919985
  Prefactor  = 6.57957
  Prefactor  = 0.0001
  norm       = 2.54993
  Prefactor  = 2.49064
  norm       = 0.476654
  Prefactor  = 0.0001
  norm       = 0.0001
  Normalizat = 1.30432
  Prefactor  = 0.973391
 **********
 **   18 **HESSE 
 **********

 FCN=   8554.279     FROM HESSE     STATUS=OK           268 CALLS     1871 TOTAL
                     EDM=   .12E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    5.5327        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    30.212        .20782E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          .10000E-03    3.4160        .16689E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     10.371        6.1259        .12470E-03   -1.5064    
   5  Prefactor     .10000E-03    29.603        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    12.968        .21374E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    5.9369        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          .10000E-03    .69418        .11480E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     4.1799        6.1211        .98600E-03   -1.5299    
  10  Prefactor     .91998        1.8606        .17708E-03   -1.5516    
  11  Prefactor     6.5796        5.4191        .15639E-03   -1.5195    
  12  Prefactor     .10000E-03    3.7823        .17457E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          2.5499        .69069        .34588E-04   -1.5389    
  14  Prefactor     2.4906        6.9172        .12967E-02   -1.5392    
  15  norm          .47665        1.2330        .15181E-03   -1.5570    
  16  Prefactor     .10000E-03    6.5913        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          .10000E-03    5.5730        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Normalizat    1.3043        .19631        .25454E-03   -.83437    
  19  Prefactor     .97339        .16316        .24874E-03   -.93622    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.19452e-08
Minuit parameter uncertainties:
  1  1.81728e-05
  2  0.000271888
  3  3.05398e-06
  4  6.12623
  5  0.000137793
  6  6.93149e-05
  7  4.79802e-06
  8  3.1059e-06
  9  6.12204
  10  1.86072
  11  5.41953
  12  3.09095e-06
  13  0.69069
  14  6.91946
  15  1.23305
  16  2.78532e-06
  17  5.56748e-06
  18  0.196426
  19  0.163245
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  9.200e-01  1.861e+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:  9.734e-01  1.632e-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.304e+00  1.964e-01  1.000e-02  1.000e+01 ( 1.000e+00)


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

Saving results to:
/scratch/kocevski/58425/likelihoodResults_266803201_267062401_4FGL_J1040.5+0617_daily_bin106.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) = 8554.24948645
delta logL = 0.0291109746177

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 8554.24617981
delta logL = 0.0324176153226

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .78222       1.0000         .10000E-03   10000.    
     2 'Index     '    2.6985       1.0000          .0000       10.000    
     3 'Normalizat'    1.2992       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .97565       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=   8554.246     FROM MIGRAD    STATUS=CONVERGED     60 CALLS      219 TOTAL
                     EDM=   .15E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .78217        21.541        .12373E-01    .15551E-02
   2  Index         2.6993        2.6161        .33870        .34144E-04
   3  Normalizat    1.2990        .25199E-01    .57660E-01    .71836E-05
   4  Prefactor     .97599        .21618E-01    .45962E-01    .14207E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.782171
  Index      = 2.69934
  Normalizat = 1.299
  Prefactor  = 0.975989
 **********
 **   18 **HESSE 
 **********

 FCN=   8554.246     FROM HESSE     STATUS=OK            33 CALLS      252 TOTAL
                     EDM=   .32E-11    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .78217        1.8742        .14673E-03   -1.5531    
   2  Index         2.6993        1.4361        .99561E-02   -.47814    
   3  Normalizat    1.2990        .19013        .25499E-03   -.83596    
   4  Prefactor     .97599        .16263        .24845E-03   -.93534    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.21387e-12
Minuit parameter uncertainties:
  1  1.87436
  2  1.46239
  3  0.190231
  4  0.162712
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/58425': 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) = 8554.24617658
delta logL = 0.0324208501152

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  7.822e-01  1.874e+00  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  2.699e+00  1.462e+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.760e-01  1.627e-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.299e+00  1.902e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 0.31
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/58425/cmap_HighResolution_266803201_267062401_4FGL_J1040.5+0617_daily_bin106.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='5.43e-03', job_status='DONE', photon_flux_upper_limit='7.04e-08', time_completed='2021-09-02 08:17:21.691138', job_id='58425', GAL2='0.98', fit_tolerance='1e-08', EG2='1.30', EG='1.30', time_epoch_completed='1630595841.69', return_code2='0', ts='0.31', comment='SUCCESS', return_code='0', GAL='0.97', dlogl='3.24e-02', ts2='0.37', photon_index_error='0.00', photon_index='2.37' WHERE bin_id='106' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:17:21 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0163>
Subject: Job 58425: <4FGL_J1040.5+0617_daily_bin106> in cluster <slac> Done

Job <4FGL_J1040.5+0617_daily_bin106> was submitted from host <rhel6-64h> by user <kocevski> in cluster <slac> at Thu Sep  2 08:02:41 2021
Job was executed on host(s) <bullet0163>, in queue <medium>, as user <kocevski> in cluster <slac> at Thu Sep  2 08:02:52 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:02:52 2021
Terminated at Thu Sep  2 08:17:22 2021
Results reported at Thu Sep  2 08:17:22 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin106 160.15 6.2848 266803201 267062401 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 :                                   656.00 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             264.38 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   872 sec.
    Turnaround time :                            881 sec.

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

