/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 179 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 = 7476
number of fields = 27
No RA_SUN column yet. Adding RA_SUN/DEC_SUN columns.
Done.


Performing analysis on: 4FGL_J1040.5+0617_daily_bin299
RA = 160.15, Dec = 6.2848
tmin = 316828801, tmax = 317088001
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='62873', job_status='RUN', time_executed='2021-09-02 08:16:16.896510', time_epoch_executed='1630595776.9' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='299'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/62873

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/62873/ft1_4FGL_J1040.5+0617_daily_bin299.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/62873/ft2_4FGL_J1040.5+0617_daily_bin299.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/62873/ft1_4FGL_J1040.5+0617_daily_bin299.fits outfile=/scratch/kocevski/62873/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin299.fits ra=160.15 dec=6.2848 rad=12.0 tmin=316828801.0 tmax=317088001.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.47
user 3.22
sys 0.22

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/62873/ft1_filtered_4FGL_J1040.5+0617_daily_bin299.fits" evtable="EVENTS" scfile=/scratch/kocevski/62873/ft2_4FGL_J1040.5+0617_daily_bin299.fits sctable="SC_DATA" outfile=/scratch/kocevski/62873/ltcube_316828801_317088001_4FGL_J1040.5+0617_daily_bin299.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/62873/ft2_4FGL_J1040.5+0617_daily_bin299.fits
.....................!
real 12.70
user 12.33
sys 0.32

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/62873/ft1_filtered_4FGL_J1040.5+0617_daily_bin299.fits evtable="EVENTS" scfile=/scratch/kocevski/62873/ft2_4FGL_J1040.5+0617_daily_bin299.fits sctable="SC_DATA" expcube=/scratch/kocevski/62873/ltcube_316828801_317088001_4FGL_J1040.5+0617_daily_bin299.fits outfile=/scratch/kocevski/62873/expmap_316828801_317088001_4FGL_J1040.5+0617_daily_bin299.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/62873/ltcube_316828801_317088001_4FGL_J1040.5+0617_daily_bin299.fits
.....................!
real 192.75
user 186.48
sys 5.66

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/62873/ft1_filtered_4FGL_J1040.5+0617_daily_bin299.fits scfile=/scratch/kocevski/62873/ft2_4FGL_J1040.5+0617_daily_bin299.fits outfile=/scratch/kocevski/62873/cmap_316828801_317088001_4FGL_J1040.5+0617_daily_bin299.fits algorithm="CMAP" ebinalg="LOG" emin=30.0 emax=200000.0 ebinfile=NONE tbinalg="LIN" tbinfile=NONE nxpix=160 nypix=160 binsz=0.25 coordsys="CEL" xref=160.15 yref=6.2848 axisrot=0.0 rafield="RA" decfield="DEC" proj="AIT" hpx_ordering_scheme="RING" hpx_order=3 hpx_ebin=yes hpx_region="" evtable="EVENTS" sctable="SC_DATA" efield="ENERGY" tfield="TIME" chatter=2 clobber=yes debug=no gui=no mode="ql"

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

This is gtbin version HEAD
real 0.54
user 0.37
sys 0.15

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

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    7.5323       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10072E-03   1.0000         .10000E-03   10000.    
     3 'norm      '    10.627       1.0000         .10000E-03   10000.    
     4 'Prefactor '    3.2023       1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10714E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10024E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10018E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    8.2616       1.0000         .10000E-03   10000.    
    10 'Prefactor '    5.4451       1.0000         .10000E-03   10000.    
    11 'Prefactor '    11.161       1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10043E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    .87843       1.0000         .10000E-03   10000.    
    14 'Prefactor '    5.0394       1.0000         .10000E-03   10000.    
    15 'norm      '    1.5765       1.0000         .10000E-03   10000.    
    16 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    3.4611       1.0000         .10000E-03   10000.    
    18 'Normalizat'    .78894       1.0000         .10000E-01   10.000    
    19 'Prefactor '    1.1540       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=   6394.778     FROM MIGRAD    STATUS=CONVERGED    396 CALLS     1653 TOTAL
                     EDM=   .34E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     7.5297        11.540         .0000        .41960E-03
   2  Prefactor     .10000E-03    33.447         .0000    ** at limit **
   3  norm          10.626        10.245         .0000        .54406E-03
   4  Prefactor     3.2024        4.9052         .0000        .21750E-03
   5  Prefactor     .10000E-03    80.245         .0000    ** at limit **
   6  Prefactor     .10000E-03    13.124         .0000    ** at limit **
   7  Prefactor     .10000E-03    5.4694         .0000    ** at limit **
   8  norm          .10000E-03    .39017         .0000    ** at limit **
   9  Prefactor     8.2616        5.5527         .0000        .34594E-03
  10  Prefactor     5.4447        3.6372         .0000        .31797E-03
  11  Prefactor     11.160        7.4707         .0000        .57102E-04
  12  Prefactor     .10000E-03    9.4317         .0000    ** at limit **
  13  norm          .87844        .49456         .0000        .10848E-03
  14  Prefactor     5.0395        6.4824         .0000        .56249E-02
  15  norm          1.5762        1.2811         .0000        .40815E-03
  16  Prefactor     .10000E-03    8.3692         .0000    ** at limit **
  17  norm          3.4602        13.363         .0000        .27408E-02
  18  Normalizat    .78908        .18813         .0000        .25547E-04
  19  Prefactor     1.1539        .15619         .0000        .72156E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 7.52971
  Prefactor  = 0.0001
  norm       = 10.6258
  Prefactor  = 3.20242
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 8.26164
  Prefactor  = 5.44472
  Prefactor  = 11.1604
  Prefactor  = 0.0001
  norm       = 0.878439
  Prefactor  = 5.03947
  norm       = 1.57623
  Prefactor  = 0.0001
  norm       = 3.4602
  Normalizat = 0.789076
  Prefactor  = 1.15393
 **********
 **   18 **HESSE 
 **********

 FCN=   6394.778     FROM HESSE     STATUS=OK           270 CALLS     1923 TOTAL
                     EDM=   .40E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     7.5297        11.537        .14613E-03   -1.5159    
   2  Prefactor     .10000E-03    33.771        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          10.626        10.244        .12291E-03   -1.5056    
   4  Prefactor     3.2024        4.8894        .21244E-03   -1.5350    
   5  Prefactor     .10000E-03    81.295        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    13.128        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    5.4790        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          .10000E-03    .40106        .97462E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     8.2616        5.5509        .13948E-03   -1.5133    
  10  Prefactor     5.4447        3.6386        .11706E-03   -1.5241    
  11  Prefactor     11.160        7.4891        .11992E-03   -1.5040    
  12  Prefactor     .10000E-03    9.7479        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          .87844        .49779        .37980E-04   -1.5521    
  14  Prefactor     5.0395        6.5023        .89562E-03   -1.5259    
  15  norm          1.5762        1.2679        .77313E-04   -1.5457    
  16  Prefactor     .10000E-03    8.3948        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          3.4602        13.382        .10869E-02   -1.5336    
  18  Normalizat    .78908        .21820        .28893E-03   -1.0048    
  19  Prefactor     1.1539        .18143        .21245E-03   -.87761    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 4.03946e-10
Minuit parameter uncertainties:
  1  11.5407
  2  1.56943e-05
  3  10.246
  4  4.89001
  5  9.29589e-05
  6  8.06057e-06
  7  4.50936e-07
  8  1.61684e-07
  9  5.55123
  10  3.6387
  11  7.48971
  12  3.3729e-06
  13  0.497797
  14  6.50316
  15  1.26795
  16  7.80193e-07
  17  13.3938
  18  0.218437
  19  0.181528
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  5.445e+00  3.639e+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.154e+00  1.815e-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:  7.891e-01  2.184e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 3.42
Ra Dec: 160.150 6.285
Photon Index (Fixed Index): 2.37 +/- 0.00
Photon Flux (Fixed Index): 6.58e-08 +/- 4.39e-08
Energy Flux (Fixed Index): 2.25e-05 +/- 1.50e-05

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

Saving results to:
/scratch/kocevski/62873/likelihoodResults_316828801_317088001_4FGL_J1040.5+0617_daily_bin299.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) = 6394.64342268
delta logL = 0.134481932783

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 6394.63314379
delta logL = 0.144760823273

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    4.1077       1.0000         .10000E-03   10000.    
     2 'Index     '    2.7320       1.0000          .0000       10.000    
     3 'Normalizat'    .76053       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.1708       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=   6394.633     FROM MIGRAD    STATUS=CONVERGED     58 CALLS      246 TOTAL
                     EDM=   .51E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     4.1107        47.093        .49726E-02    .37844E-03
   2  Index         2.7326        3.5138        .12400        .13626E-03
   3  Normalizat    .75996        .75237E-01    .66422E-01    .26284E-04
   4  Prefactor     1.1713        .58256E-01    .35360E-01    .31214E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 4.11068
  Index      = 2.73262
  Normalizat = 0.759963
  Prefactor  = 1.17131
 **********
 **   18 **HESSE 
 **********

 FCN=   6394.633     FROM HESSE     STATUS=OK            33 CALLS      279 TOTAL
                     EDM=   .11E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     4.1107        4.9106        .92446E-04   -1.5302    
   2  Index         2.7326        .85928        .60909E-02   -.47066    
   3  Normalizat    .75996        .21632        .29388E-03   -1.0157    
   4  Prefactor     1.1713        .18470        .21110E-03   -.87219    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.13646e-08
Minuit parameter uncertainties:
  1  4.91108
  2  0.864701
  3  0.216561
  4  0.184806
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/62873': 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) = 6394.63313778
delta logL = 0.144766834824

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  4.111e+00  4.911e+00  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  2.733e+00  8.647e-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.171e+00  1.848e-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:  7.600e-01  2.166e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 3.76
Ra Dec: 160.150 6.285
Photon Index (Free Index): 2.73 +/- 0.86
Photon Flux (Free Index): 8.61e-08 +/- 6.01e-08
Energy Flux (Free Index): 2.02e-05 +/- 1.38e-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/62873/cmap_HighResolution_316828801_317088001_4FGL_J1040.5+0617_daily_bin299.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.18e-02', comment='SUCCESS', photon_flux='6.58e-08', energy_flux2='2.02e-05', photon_flux_error='4.39e-08', dlogl='1.45e-01', energy_flux='2.25e-05', photon_flux2='8.61e-08', job_status='DONE', time_completed='2021-09-02 08:25:44.369092', photon_index_error2='0.86', photon_index2='2.73', ts='3.42', fit_tolerance='1e-08', GAL='1.15', photon_index_error='0.00', photon_flux_upper_limit='1.53e-07', energy_flux_error2='1.38e-05', EG='0.79', time_epoch_completed='1630596344.37', return_code='0', job_id='62873', GAL2='1.17', EG2='0.76', return_code2='0', energy_flux_error='1.50e-05', photon_flux_error2='6.01e-08', ts2='3.76', photon_index='2.37' WHERE bin_id='299' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:25:44 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0244>
Subject: Job 62873: <4FGL_J1040.5+0617_daily_bin299> in cluster <slac> Done

Job <4FGL_J1040.5+0617_daily_bin299> was submitted from host <rhel6-64k> by user <kocevski> in cluster <slac> at Thu Sep  2 08:11:20 2021
Job was executed on host(s) <bullet0244>, in queue <medium>, as user <kocevski> in cluster <slac> at Thu Sep  2 08:13:09 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:13:09 2021
Terminated at Thu Sep  2 08:25:45 2021
Results reported at Thu Sep  2 08:25:45 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin299 160.15 6.2848 316828801 317088001 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 :                                   565.35 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             291.23 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   755 sec.
    Turnaround time :                            865 sec.

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

