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


Performing analysis on: 4FGL_J1040.5+0617_daily_bin249
RA = 160.15, Dec = 6.2848
tmin = 303868801, tmax = 304128001
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='62811', job_status='RUN', time_executed='2021-09-02 08:12:52.437429', time_epoch_executed='1630595572.44' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='249'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/62811

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/62811/ft1_4FGL_J1040.5+0617_daily_bin249.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/62811/ft2_4FGL_J1040.5+0617_daily_bin249.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/62811/ft1_4FGL_J1040.5+0617_daily_bin249.fits outfile=/scratch/kocevski/62811/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin249.fits ra=160.15 dec=6.2848 rad=12.0 tmin=303868801.0 tmax=304128001.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.46
user 3.23
sys 0.19

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/62811/ft1_filtered_4FGL_J1040.5+0617_daily_bin249.fits" evtable="EVENTS" scfile=/scratch/kocevski/62811/ft2_4FGL_J1040.5+0617_daily_bin249.fits sctable="SC_DATA" outfile=/scratch/kocevski/62811/ltcube_303868801_304128001_4FGL_J1040.5+0617_daily_bin249.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/62811/ft2_4FGL_J1040.5+0617_daily_bin249.fits
.....................!
real 13.99
user 13.59
sys 0.35

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/62811/ft1_filtered_4FGL_J1040.5+0617_daily_bin249.fits evtable="EVENTS" scfile=/scratch/kocevski/62811/ft2_4FGL_J1040.5+0617_daily_bin249.fits sctable="SC_DATA" expcube=/scratch/kocevski/62811/ltcube_303868801_304128001_4FGL_J1040.5+0617_daily_bin249.fits outfile=/scratch/kocevski/62811/expmap_303868801_304128001_4FGL_J1040.5+0617_daily_bin249.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/62811/ltcube_303868801_304128001_4FGL_J1040.5+0617_daily_bin249.fits
.....................!
real 191.20
user 186.15
sys 4.57

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/62811/ft1_filtered_4FGL_J1040.5+0617_daily_bin249.fits scfile=/scratch/kocevski/62811/ft2_4FGL_J1040.5+0617_daily_bin249.fits outfile=/scratch/kocevski/62811/cmap_303868801_304128001_4FGL_J1040.5+0617_daily_bin249.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.53
user 0.38
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/62811/ft1_filtered_4FGL_J1040.5+0617_daily_bin249.fits scfile=/scratch/kocevski/62811/ft2_4FGL_J1040.5+0617_daily_bin249.fits outfile=/scratch/kocevski/62811/cmap_HighResolution_303868801_304128001_4FGL_J1040.5+0617_daily_bin249.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.55
user 0.38
sys 0.16

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    6.0108       1.0000         .10000E-03   10000.    
     2 'Prefactor '    58.994       1.0000         .10000E-03   10000.    
     3 'norm      '    .10005E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10037E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10005E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    1.3194       1.0000         .10000E-03   10000.    
    10 'Prefactor '    6.1121       1.0000         .10000E-03   10000.    
    11 'Prefactor '    8.7776       1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10119E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    1.0462       1.0000         .10000E-03   10000.    
    14 'Prefactor '    27.323       1.0000         .10000E-03   10000.    
    15 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
    16 'Prefactor '    4.0754       1.0000         .10000E-03   10000.    
    17 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    18 'Normalizat'    1.2329       1.0000         .10000E-01   10.000    
    19 'Prefactor '    1.2186       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=   6266.523     FROM MIGRAD    STATUS=CONVERGED    380 CALLS     1858 TOTAL
                     EDM=   .12E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .8%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     6.0095        8.2214       -.73913E-06   -.28780E-04
   2  Prefactor     58.996        54.618        .13624E-05    .53441E-05
   3  norm          .10000E-03    6.0892        .72445E-05** at limit **
   4  Prefactor     .10000E-03    4.5948       -.82704E-06** at limit **
   5  Prefactor     .10000E-03    53.758       -.28901E-05** at limit **
   6  Prefactor     .10000E-03    30.953        .45906E-06** at limit **
   7  Prefactor     .10000E-03    8.4251       -.84764E-06** at limit **
   8  norm          .10000E-03    .37542       -.24192E-09** at limit **
   9  Prefactor     1.3190        1.3792        .19172E-06   -.10680E-02
  10  Prefactor     6.1113        3.7921        .80138E-07    .30271E-03
  11  Prefactor     8.7770        6.4468       -.20235E-06    .23682E-04
  12  Prefactor     .10000E-03    5.8665       -.74934E-05** at limit **
  13  norm          1.0462        .73360       -.30370E-07    .30582E-03
  14  Prefactor     27.321        14.725        .54237E-06    .19673E-03
  15  norm          .10000E-03    .32074       -.11196E-07** at limit **
  16  Prefactor     4.0645        46.058       -.21363E-04    .15901E-04
  17  norm          .10000E-03    4.8365        .18006E-05** at limit **
  18  Normalizat    1.2330        .21319        .99183E-06    .12470E-03
  19  Prefactor     1.2185        .17940        .32232E-06    .15425E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 6.00951
  Prefactor  = 58.9959
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 1.31896
  Prefactor  = 6.11132
  Prefactor  = 8.777
  Prefactor  = 0.0001
  norm       = 1.0462
  Prefactor  = 27.3207
  norm       = 0.0001
  Prefactor  = 4.06454
  norm       = 0.0001
  Normalizat = 1.23302
  Prefactor  = 1.21847
 **********
 **   18 **HESSE 
 **********

 FCN=   6266.523     FROM HESSE     STATUS=OK           264 CALLS     2122 TOTAL
                     EDM=   .31E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     6.0095        8.2216        .16377E-03   -1.5218    
   2  Prefactor     58.996        54.815        .52234E-04   -1.4170    
   3  norm          .10000E-03    6.1025        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10000E-03    4.6082        .16572E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .10000E-03    53.899        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    30.988        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    8.4439        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          .10000E-03    .37819        .47348E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     1.3190        7.0643        .19158E-02   -1.5478    
  10  Prefactor     6.1113        3.7958        .11632E-03   -1.5213    
  11  Prefactor     8.7770        6.4618        .13529E-03   -1.5115    
  12  Prefactor     .10000E-03    5.8754        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          1.0462        .73311        .23820E-03   -1.5503    
  14  Prefactor     27.321        14.795        .76641E-04   -1.4662    
  15  norm          .10000E-03    .32259        .43765E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     4.0645        46.088        .19972E-03   -1.5305    
  17  norm          .10000E-03    4.8463        .17005E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Normalizat    1.2330        .25335        .28963E-03   -.85588    
  19  Prefactor     1.2185        .21344        .24956E-03   -.85765    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.13764e-09
Minuit parameter uncertainties:
  1  8.22313
  2  54.8623
  3  2.48709e-06
  4  3.48525e-06
  5  3.81359e-05
  6  1.16475e-05
  7  4.43544e-06
  8  8.50613e-07
  9  6.1058
  10  3.79593
  11  6.4623
  12  3.01181e-05
  13  0.733119
  14  14.7969
  15  1.27403e-06
  16  27.3997
  17  2.39853e-06
  18  0.253606
  19  0.213594
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  6.111e+00  3.796e+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.218e+00  2.136e-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.233e+00  2.536e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 6.05
Ra Dec: 160.150 6.285
Photon Index (Fixed Index): 2.37 +/- 0.00
Photon Flux (Fixed Index): 7.38e-08 +/- 4.58e-08
Energy Flux (Fixed Index): 2.53e-05 +/- 1.57e-05

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) = 6266.28608356
delta logL = 0.236574743319

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 6266.26143537
delta logL = 0.261222932277

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    7.0018       1.0000         .10000E-03   10000.    
     2 'Index     '    2.0043       1.0000          .0000       10.000    
     3 'Normalizat'    1.2584       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.2051       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=   6266.261     FROM MIGRAD    STATUS=CONVERGED     55 CALLS      243 TOTAL
                     EDM=   .20E-09    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     7.0001        141.01        .37902E-02    .67089E-04
   2  Index         2.0041        5.7512        .20855        .84514E-06
   3  Normalizat    1.2581        .21429        .64919E-01   -.32745E-04
   4  Prefactor     1.2053        .14371        .56694E-01   -.38001E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 7.00007
  Index      = 2.00408
  Normalizat = 1.25814
  Prefactor  = 1.20526
 **********
 **   18 **HESSE 
 **********

 FCN=   6266.261     FROM HESSE     STATUS=OK            33 CALLS      276 TOTAL
                     EDM=   .24E-11    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     7.0001        4.4813        .12946E-03   -1.5179    
   2  Index         2.0041        .48396        .74415E-02   -.64248    
   3  Normalizat    1.2581        .24911        .28718E-03   -.84825    
   4  Prefactor     1.2053        .21270        .25069E-03   -.86170    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.40923e-12
Minuit parameter uncertainties:
  1  4.48148
  2  0.485145
  3  0.249345
  4  0.212849
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/62811': 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) = 6266.26143463
delta logL = 0.261223666313

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  7.000e+00  4.481e+00  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  2.004e+00  4.851e-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.205e+00  2.128e-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.258e+00  2.493e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 6.56
Ra Dec: 160.150 6.285
Photon Index (Free Index): 2.00 +/- 0.49
Photon Flux (Free Index): 5.25e-08 +/- 4.49e-08
Energy Flux (Free Index): 3.59e-05 +/- 3.20e-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/62811/cmap_HighResolution_303868801_304128001_4FGL_J1040.5+0617_daily_bin249.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='7.38e-08', energy_flux2='3.59e-05', photon_flux_error='4.58e-08', dlogl='2.61e-01', energy_flux='2.53e-05', photon_flux2='5.25e-08', job_status='DONE', time_completed='2021-09-02 08:21:53.640964', photon_index_error2='0.49', photon_index2='2.00', ts='6.05', fit_tolerance='1e-08', GAL='1.22', photon_index_error='0.00', energy_flux_error2='3.20e-05', EG='1.23', time_epoch_completed='1630596113.64', return_code='0', job_id='62811', GAL2='1.21', EG2='1.26', return_code2='0', energy_flux_error='1.57e-05', photon_flux_error2='4.49e-08', ts2='6.56', photon_index='2.37' WHERE bin_id='249' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:21:53 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0106>
Subject: Job 62811: <4FGL_J1040.5+0617_daily_bin249> in cluster <slac> Done

Job <4FGL_J1040.5+0617_daily_bin249> was submitted from host <rhel6-64k> by user <kocevski> in cluster <slac> at Thu Sep  2 08:11:15 2021
Job was executed on host(s) <bullet0106>, in queue <medium>, as user <kocevski> in cluster <slac> at Thu Sep  2 08:12:15 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:12:15 2021
Terminated at Thu Sep  2 08:21:54 2021
Results reported at Thu Sep  2 08:21:54 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin249 160.15 6.2848 303868801 304128001 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 :                                   538.11 sec.
    Max Memory :                                 1255 MB
    Average Memory :                             321.75 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   578 sec.
    Turnaround time :                            639 sec.

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

