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


Performing analysis on: 4FGL_J1040.5+0617_daily_bin105
RA = 160.15, Dec = 6.2848
tmin = 266544001, tmax = 266803201
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='58420', job_status='RUN', time_executed='2021-09-02 08:06:15.595220', time_epoch_executed='1630595175.6' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='105'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/58420

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/58420/ft1_4FGL_J1040.5+0617_daily_bin105.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/58420/ft2_4FGL_J1040.5+0617_daily_bin105.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/58420/ft1_4FGL_J1040.5+0617_daily_bin105.fits outfile=/scratch/kocevski/58420/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin105.fits ra=160.15 dec=6.2848 rad=12.0 tmin=266544001.0 tmax=266803201.0 emin=100.0 emax=100000.0 zmin=0.0 zmax=90.0 evclass=128 evtype="INDEF" convtype=-1 phasemin=0.0 phasemax=1.0 evtable="EVENTS" chatter=2 clobber=yes debug=no gui=no mode="ql"

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

Done.
real 1.42
user 1.24
sys 0.17

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/58420/ft1_filtered_4FGL_J1040.5+0617_daily_bin105.fits" evtable="EVENTS" scfile=/scratch/kocevski/58420/ft2_4FGL_J1040.5+0617_daily_bin105.fits sctable="SC_DATA" outfile=/scratch/kocevski/58420/ltcube_266544001_266803201_4FGL_J1040.5+0617_daily_bin105.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/58420/ft2_4FGL_J1040.5+0617_daily_bin105.fits
.....................!
real 17.82
user 17.46
sys 0.28

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/58420/ft1_filtered_4FGL_J1040.5+0617_daily_bin105.fits evtable="EVENTS" scfile=/scratch/kocevski/58420/ft2_4FGL_J1040.5+0617_daily_bin105.fits sctable="SC_DATA" expcube=/scratch/kocevski/58420/ltcube_266544001_266803201_4FGL_J1040.5+0617_daily_bin105.fits outfile=/scratch/kocevski/58420/expmap_266544001_266803201_4FGL_J1040.5+0617_daily_bin105.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/58420/ltcube_266544001_266803201_4FGL_J1040.5+0617_daily_bin105.fits
.....................!
real 191.15
user 186.52
sys 4.07

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/58420/ft1_filtered_4FGL_J1040.5+0617_daily_bin105.fits scfile=/scratch/kocevski/58420/ft2_4FGL_J1040.5+0617_daily_bin105.fits outfile=/scratch/kocevski/58420/cmap_266544001_266803201_4FGL_J1040.5+0617_daily_bin105.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/58420/ft1_filtered_4FGL_J1040.5+0617_daily_bin105.fits scfile=/scratch/kocevski/58420/ft2_4FGL_J1040.5+0617_daily_bin105.fits outfile=/scratch/kocevski/58420/cmap_HighResolution_266544001_266803201_4FGL_J1040.5+0617_daily_bin105.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/58420/ft1_filtered_4FGL_J1040.5+0617_daily_bin105.fits evtable="EVENTS" scfile=/scratch/kocevski/58420/ft2_4FGL_J1040.5+0617_daily_bin105.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/58420/Model_4FGL_J1040.5+0617_daily_bin105.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/58420/ft1_filtered_4FGL_J1040.5+0617_daily_bin105.fits.....................!
real 80.90
user 79.46
sys 1.16

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    10.447       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .51850       1.0000         .10000E-03   10000.    
     3 'norm      '    .10293E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    20.280       1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10091E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10658E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10062E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    .10040E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    3.5620       1.0000         .10000E-03   10000.    
    10 'Prefactor '    2.1220       1.0000         .10000E-03   10000.    
    11 'Prefactor '    1.3507       1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10111E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    1.5693       1.0000         .10000E-03   10000.    
    14 'Prefactor '    3.7501       1.0000         .10000E-03   10000.    
    15 'norm      '    .35883       1.0000         .10000E-03   10000.    
    16 'Prefactor '    .10149E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    1.7239       1.0000         .10000E-03   10000.    
    18 'Normalizat'    .83493       1.0000         .10000E-01   10.000    
    19 'Prefactor '    1.3065       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.
 MACHINE ACCURACY LIMITS FURTHER IMPROVEMENT.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   9156.430     FROM MIGRAD    STATUS=CONVERGED    419 CALLS     1679 TOTAL
                     EDM=   .90E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     10.453        7.9554         .0000        .36953E-03
   2  Prefactor     .32561        20.925         .0000        .55217E-04
   3  norm          .10000E-03    3.7847         .0000    ** at limit **
   4  Prefactor     20.284        8.3334         .0000        .18430E-03
   5  Prefactor     .10000E-03    12.081         .0000    ** at limit **
   6  Prefactor     .10000E-03    18.719         .0000    ** at limit **
   7  Prefactor     .10000E-03    4.8410         .0000    ** at limit **
   8  norm          .10000E-03    .26927         .0000    ** at limit **
   9  Prefactor     3.5631        6.1197         .0000        .12345E-01
  10  Prefactor     2.1208        2.1802         .0000        .57869E-03
  11  Prefactor     1.3507        4.2905         .0000        .15281E-02
  12  Prefactor     .10000E-03    2.5028         .0000    ** at limit **
  13  norm          1.5692        .54662         .0000        .12348E-02
  14  Prefactor     3.7486        6.4492         .0000        .12856E-02
  15  norm          .35794        1.1449         .0000        .29309E-02
  16  Prefactor     .10000E-03    17.152         .0000    ** at limit **
  17  norm          1.7216        8.3679         .0000        .79214E-03
  18  Normalizat    .83500        .16126         .0000       -.12024E-03
  19  Prefactor     1.3066        .13717         .0000       -.17216E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 10.4526
  Prefactor  = 0.32561
  norm       = 0.0001
  Prefactor  = 20.2843
  Prefactor  = 0.0001
  Prefactor  = 0.000100002
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 3.56313
  Prefactor  = 2.12081
  Prefactor  = 1.35073
  Prefactor  = 0.0001
  norm       = 1.56916
  Prefactor  = 3.74857
  norm       = 0.357944
  Prefactor  = 0.000100003
  norm       = 1.72161
  Normalizat = 0.835
  Prefactor  = 1.30658
 **********
 **   18 **HESSE 
 **********

 FCN=   9156.430     FROM HESSE     STATUS=OK           282 CALLS     1961 TOTAL
                     EDM=   .20E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     10.453        7.9515        .12396E-03   -1.5061    
   2  Prefactor     .32561        24.333        .13093       -1.5594    
   3  norm          .10000E-03    3.7885        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     20.284        8.3290        .88941E-04   -1.4807    
   5  Prefactor     .10000E-03    12.090        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    18.736        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    4.8465        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          .10000E-03    .42123        .96326E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     3.5631        6.0889        .10707E-02   -1.5330    
  10  Prefactor     2.1208        2.1655        .13714E-03   -1.5417    
  11  Prefactor     1.3507        4.2624        .33390E-03   -1.5476    
  12  Prefactor     .10000E-03    2.5186        .14776E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          1.5692        .55156        .36447E-04   -1.5457    
  14  Prefactor     3.7486        6.5210        .20849E-03   -1.5321    
  15  norm          .35794        1.1472        .16594E-02   -1.5588    
  16  Prefactor     .10000E-03    17.299        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          1.7216        8.2992        .31988E-03   -1.5446    
  18  Normalizat    .83500        .18857        .29423E-03   -.98783    
  19  Prefactor     1.3066        .16291        .21745E-03   -.83112    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.99648e-09
Minuit parameter uncertainties:
  1  7.95226
  2  5.63112
  3  1.40599e-05
  4  8.32947
  5  8.95152e-05
  6  0.000381118
  7  1.40402e-05
  8  1.04099e-05
  9  6.08997
  10  2.16561
  11  4.26331
  12  2.27535e-06
  13  0.551559
  14  6.52222
  15  1.14725
  16  0.000467656
  17  7.5614
  18  0.188719
  19  0.16297
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  2.121e+00  2.166e+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.307e+00  1.630e-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:  8.350e-01  1.887e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 1.31
Ra Dec: 160.150 6.285
Photon Index (Fixed Index): 2.37 +/- 0.00
Photon Flux (Fixed Index): 2.56e-08 +/- 2.61e-08
Energy Flux (Fixed Index): 8.77e-06 +/- 8.96e-06

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

Saving results to:
/scratch/kocevski/58420/likelihoodResults_266544001_266803201_4FGL_J1040.5+0617_daily_bin105.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) = 9156.38793083
delta logL = 0.0423078555941

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 9156.38508491
delta logL = 0.0451537719346

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    2.5320       1.0000         .10000E-03   10000.    
     2 'Index     '    2.1765       1.0000          .0000       10.000    
     3 'Normalizat'    .83890       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.3036       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=   9156.385     FROM MIGRAD    STATUS=CONVERGED     56 CALLS      244 TOTAL
                     EDM=   .41E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     2.5318        71.023        .64172E-02    .68571E-03
   2  Index         2.1765        6.0716        .24863        .47798E-04
   3  Normalizat    .83889        .52081E-01    .66364E-01    .31570E-04
   4  Prefactor     1.3037        .45553E-01    .49232E-01   -.12537E-07
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 2.53178
  Index      = 2.17655
  Normalizat = 0.838886
  Prefactor  = 1.30366
 **********
 **   18 **HESSE 
 **********

 FCN=   9156.385     FROM HESSE     STATUS=OK            31 CALLS      275 TOTAL
                     EDM=   .83E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     2.5318        2.7599        .14615E-03   -1.5390    
   2  Index         2.1765        .61463        .93996E-02   -.60006    
   3  Normalizat    .83889        .17917        .29359E-03   -.98642    
   4  Prefactor     1.3037        .16214        .21764E-03   -.83198    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 8.26141e-10
Minuit parameter uncertainties:
  1  2.76008
  2  0.61693
  3  0.179292
  4  0.162198
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/58420': 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) = 9156.3850849
delta logL = 0.045153779467

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  2.532e+00  2.760e+00  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  2.177e+00  6.169e-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.304e+00  1.622e-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:  8.389e-01  1.793e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 1.40
Ra Dec: 160.150 6.285
Photon Index (Free Index): 2.18 +/- 0.62
Photon Flux (Free Index): 2.35e-08 +/- 2.48e-08
Energy Flux (Free Index): 1.10e-05 +/- 1.43e-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/58420/cmap_HighResolution_266544001_266803201_4FGL_J1040.5+0617_daily_bin105.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='6.50e-03', comment='SUCCESS', photon_flux='2.56e-08', energy_flux2='1.10e-05', photon_flux_error='2.61e-08', dlogl='4.52e-02', energy_flux='8.77e-06', photon_flux2='2.35e-08', job_status='DONE', time_completed='2021-09-02 08:17:37.416746', photon_index_error2='0.62', photon_index2='2.18', ts='1.31', fit_tolerance='1e-08', GAL='1.31', photon_index_error='0.00', photon_flux_upper_limit='8.43e-08', energy_flux_error2='1.43e-05', EG='0.83', time_epoch_completed='1630595857.42', return_code='0', job_id='58420', GAL2='1.30', EG2='0.84', return_code2='0', energy_flux_error='8.96e-06', photon_flux_error2='2.48e-08', ts2='1.40', photon_index='2.37' WHERE bin_id='105' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:17:37 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0302>
Subject: Job 58420: <4FGL_J1040.5+0617_daily_bin105> in cluster <slac> Done

Job <4FGL_J1040.5+0617_daily_bin105> 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) <bullet0302>, 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:38 2021
Results reported at Thu Sep  2 08:17:38 2021

Your job looked like:

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

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

