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


Performing analysis on: 4FGL_J1158.5+4824_daily_bin1256
RA = 179.637, Dec = 48.4161
tmin = 564883201, tmax = 565142401
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='201339', job_status='RUN', time_executed='2021-09-04 17:46:41.268494', time_epoch_executed='1630802801.27' WHERE source_name='4FGL J1158.5+4824' and cadence='daily' and bin_id='1256'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/201339

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/201339/ft1_4FGL_J1158.5+4824_daily_bin1256.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/201339/ft2_4FGL_J1158.5+4824_daily_bin1256.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/201339/ft1_4FGL_J1158.5+4824_daily_bin1256.fits outfile=/scratch/kocevski/201339/ft1_filteredMKT_4FGL_J1158.5+4824_daily_bin1256.fits ra=179.637 dec=48.4161 rad=12.0 tmin=564883201.0 tmax=565142401.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.56
user 3.33
sys 0.20

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/201339/ft2_4FGL_J1158.5+4824_daily_bin1256.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/201339/ft2_4FGL_J1158.5+4824_daily_bin1256.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/201339/ft1_filteredMKT_4FGL_J1158.5+4824_daily_bin1256.fits evtable="EVENTS" outfile="/scratch/kocevski/201339/ft1_filtered_4FGL_J1158.5+4824_daily_bin1256.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.50
user 0.34
sys 0.15

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/201339/ft1_filtered_4FGL_J1158.5+4824_daily_bin1256.fits" evtable="EVENTS" scfile=/scratch/kocevski/201339/ft2_4FGL_J1158.5+4824_daily_bin1256.fits sctable="SC_DATA" outfile=/scratch/kocevski/201339/ltcube_564883201_565142401_4FGL_J1158.5+4824_daily_bin1256.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/201339/ft2_4FGL_J1158.5+4824_daily_bin1256.fits
.....................!
real 12.35
user 11.96
sys 0.32

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/201339/ft1_filtered_4FGL_J1158.5+4824_daily_bin1256.fits evtable="EVENTS" scfile=/scratch/kocevski/201339/ft2_4FGL_J1158.5+4824_daily_bin1256.fits sctable="SC_DATA" expcube=/scratch/kocevski/201339/ltcube_564883201_565142401_4FGL_J1158.5+4824_daily_bin1256.fits outfile=/scratch/kocevski/201339/expmap_564883201_565142401_4FGL_J1158.5+4824_daily_bin1256.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/201339/ltcube_564883201_565142401_4FGL_J1158.5+4824_daily_bin1256.fits
.....................!
real 193.24
user 187.38
sys 5.17

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 213 point sources and 0 extended sources

Setting source of interest to:
4FGL J1158.5+4824 @ 179.637 48.4161

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/201339/ft1_filtered_4FGL_J1158.5+4824_daily_bin1256.fits scfile=/scratch/kocevski/201339/ft2_4FGL_J1158.5+4824_daily_bin1256.fits outfile=/scratch/kocevski/201339/cmap_564883201_565142401_4FGL_J1158.5+4824_daily_bin1256.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=179.637 yref=48.4161 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.14

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/201339/ft1_filtered_4FGL_J1158.5+4824_daily_bin1256.fits scfile=/scratch/kocevski/201339/ft2_4FGL_J1158.5+4824_daily_bin1256.fits outfile=/scratch/kocevski/201339/cmap_HighResolution_564883201_565142401_4FGL_J1158.5+4824_daily_bin1256.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=179.637 yref=48.4161 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.60
user 0.38
sys 0.17

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/201339/ft1_filtered_4FGL_J1158.5+4824_daily_bin1256.fits evtable="EVENTS" scfile=/scratch/kocevski/201339/ft2_4FGL_J1158.5+4824_daily_bin1256.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/201339/Model_4FGL_J1158.5+4824_daily_bin1256.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/201339/ft1_filtered_4FGL_J1158.5+4824_daily_bin1256.fits....................!
real 65.35
user 63.85
sys 1.23

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/201339/ft1_filtered_4FGL_J1158.5+4824_daily_bin1256.fits', '/scratch/kocevski/201339/ft2_4FGL_J1158.5+4824_daily_bin1256.fits', expMap='/scratch/kocevski/201339/expmap_564883201_565142401_4FGL_J1158.5+4824_daily_bin1256.fits', expCube='/scratch/kocevski/201339/ltcube_564883201_565142401_4FGL_J1158.5+4824_daily_bin1256.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/201339/Model_4FGL_J1158.5+4824_daily_bin1256.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1158.5+4824'

4FGL J1158.5+4824
   Spectrum: PowerLaw
349    Prefactor:  5.005e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-13)
350        Index:  2.443e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
351        Scale:  9.466e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/201339/ft1_filtered_4FGL_J1158.5+4824_daily_bin1256.fits
Spacecraft file(s): /scratch/kocevski/201339/ft2_4FGL_J1158.5+4824_daily_bin1256.fits
Exposure map: /scratch/kocevski/201339/expmap_564883201_565142401_4FGL_J1158.5+4824_daily_bin1256.fits
Exposure cube: /scratch/kocevski/201339/ltcube_564883201_565142401_4FGL_J1158.5+4824_daily_bin1256.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/201339/Model_4FGL_J1158.5+4824_daily_bin1256.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) = 8277.03871728

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    136.16       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10264E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    .58539E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    66.801       1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
     6 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .16613       1.0000         .10000E-03   10000.    
     8 'Prefactor '    11.348       1.0000         .10000E-03   10000.    
     9 'norm      '    .84442       1.0000         .10000E-03   10000.    
    10 'Prefactor '    25.528       1.0000         .10000E-03   10000.    
    11 'norm      '    2.5459       1.0000         .10000E-03   10000.    
    12 'norm      '    12.656       1.0000         .10000E-03   10000.    
    13 'Prefactor '    1.0806       1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    15 'norm      '    4.6119       1.0000         .10000E-03   10000.    
    16 'Prefactor '    32.344       1.0000         .10000E-03   10000.    
    17 'norm      '    3.3900       1.0000         .10000E-03   10000.    
    18 'norm      '    2.3526       1.0000         .10000E-03   10000.    
    19 'Prefactor '    24.849       1.0000         .10000E-03   10000.    
    20 'Prefactor '    6.0768       1.0000         .10000E-03   10000.    
    21 'Prefactor '    31.537       1.0000         .10000E-03   10000.    
    22 'norm      '    1.1367       1.0000         .10000E-03   10000.    
    23 'Prefactor '    .10760E-03   1.0000         .10000E-03   10000.    
    24 'Normalizat'    .81010       1.0000         .10000E-01   10.000    
    25 'Prefactor '    1.0657       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6830E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   8277.037     FROM MIGRAD    STATUS=CONVERGED    582 CALLS     3012 TOTAL
                     EDM=   .17E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  4.6%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     136.19        89.957       -.17200E-05    .13727E-06
   2  Prefactor     .10000E-03    90.368        .15795E-05** at limit **
   3  Prefactor     .10001E-03    743.63        .21852E-04** at limit **
   4  Prefactor     66.815        57.413       -.77852E-06   -.31015E-05
   5  Prefactor     .10000E-03    38.856        .29036E-06** at limit **
   6  norm          .10000E-03    15.653        .26369E-07** at limit **
   7  Prefactor     .16587        3.0851        .19846E-06   -.13468E-03
   8  Prefactor     11.351        23.038       -.90431E-07   -.11593E-04
   9  norm          .84782        2.0873       -.35455E-06   -.27141E-03
  10  Prefactor     25.474        39.990        .40896E-05    .15493E-04
  11  norm          2.5464        1.1831       -.13702E-06    .13963E-03
  12  norm          12.656        7.9856       -.13869E-06    .56749E-05
  13  Prefactor     1.0798        1.9477       -.20054E-06   -.72889E-03
  14  Prefactor     .10000E-03    12.935       -.45528E-07** at limit **
  15  norm          4.6127        4.6042        .10632E-05   -.54617E-04
  16  Prefactor     32.351        18.331        .54574E-07    .68036E-04
  17  norm          3.3907        1.6943        .16060E-07    .24590E-04
  18  norm          2.3528        3.6984        .16231E-05   -.30243E-04
  19  Prefactor     24.856        17.726       -.66585E-06    .12343E-04
  20  Prefactor     6.0779        4.8871        .30998E-07    .16105E-06
  21  Prefactor     31.543        18.041       -.83182E-07    .12820E-04
  22  norm          1.1368        1.1343        .86597E-08    .22881E-05
  23  Prefactor     .10000E-03    134.41       -.32108E-05** at limit **
  24  Normalizat    .80964        .14281       -.25058E-06   -.24994E-04
  25  Prefactor     1.0661        .16660        .37835E-07   -.28282E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 136.187
  Prefactor  = 0.0001
  Prefactor  = 0.000100011
  Prefactor  = 66.8145
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.165867
  Prefactor  = 11.3506
  norm       = 0.847819
  Prefactor  = 25.4737
  norm       = 2.54644
  norm       = 12.6562
  Prefactor  = 1.07978
  Prefactor  = 0.0001
  norm       = 4.61266
  Prefactor  = 32.3515
  norm       = 3.39072
  norm       = 2.35279
  Prefactor  = 24.8562
  Prefactor  = 6.07794
  Prefactor  = 31.5435
  norm       = 1.13677
  Prefactor  = 0.0001
  Normalizat = 0.80964
  Prefactor  = 1.06614
 **********
 **   18 **HESSE 
 **********

 FCN=   8277.037     FROM HESSE     STATUS=OK           441 CALLS     3453 TOTAL
                     EDM=   .73E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     136.19        90.003        .17258E-03   -1.3369    
   2  Prefactor     .10000E-03    90.426        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     .10001E-03    741.78        .42154E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     66.815        57.550        .49106E-04   -1.4071    
   5  Prefactor     .10000E-03    38.904        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  norm          .10000E-03    15.665        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .16587        14.647        .29977E-02   -1.5627    
   8  Prefactor     11.351        22.918        .11893E-03   -1.5034    
   9  norm          .84782        2.0608        .19344E-03   -1.5524    
  10  Prefactor     25.474        39.930        .79284E-04   -1.4698    
  11  norm          2.5464        1.1801        .12796E-03   -1.5389    
  12  norm          12.656        7.9868        .11260E-03   -1.4996    
  13  Prefactor     1.0798        1.4889        .15725E-02   -1.5500    
  14  Prefactor     .10000E-03    12.939        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          4.6127        4.5905        .93712E-03   -1.5278    
  16  Prefactor     32.351        17.725        .70456E-04   -1.4570    
  17  norm          3.3907        1.6947        .79844E-04   -1.5340    
  18  norm          2.3528        3.6970        .10373E-02   -1.5401    
  19  Prefactor     24.856        17.732        .80360E-04   -1.4710    
  20  Prefactor     6.0779        4.8864        .16287E-03   -1.5215    
  21  Prefactor     31.543        18.061        .71350E-04   -1.4584    
  22  norm          1.1368        1.1252        .94065E-04   -1.5495    
  23  Prefactor     .10000E-03    136.11        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Normalizat    .80964        .16691        .24371E-03   -.99712    
  25  Prefactor     1.0661        .19525        .26960E-03   -.90556    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 7.31537e-08
Minuit parameter uncertainties:
  1  90.0938
  2  7.73826e-06
  3  0.00573256
  4  57.5984
  5  1.59927e-06
  6  1.03885e-06
  7  3.11721
  8  22.936
  9  2.06095
  10  39.9717
  11  1.18011
  12  7.98749
  13  1.48894
  14  6.05146e-07
  15  4.59083
  16  17.728
  17  1.69475
  18  3.69737
  19  17.7361
  20  4.8867
  21  18.0646
  22  1.12523
  23  0.000125802
  24  0.167017
  25  0.195379
Done.

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

Extracting fit parameters...

4FGL J1158.5+4824
   Spectrum: PowerLaw
349    Prefactor:  3.235e+01  1.773e+01  1.000e-04  1.000e+04 ( 1.000e-13)
350        Index:  2.443e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
351        Scale:  9.466e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
680    Prefactor:  1.066e+00  1.954e-01  0.000e+00  1.000e+01 ( 1.000e+00)
681        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
682        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
679   Normalization:  8.096e-01  1.670e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 6.36
Ra Dec: 179.637 48.416
Photon Index (Fixed Index): 2.44 +/- 0.00
Photon Flux (Fixed Index): 5.44e-08 +/- 2.98e-08
Energy Flux (Fixed Index): 1.69e-05 +/- 9.25e-06

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) = 8276.86636081
delta logL = 0.170660579592

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 8276.8654462
delta logL = 0.171575192855

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    40.836       1.0000         .10000E-03   10000.    
     2 'Index     '    2.1532       1.0000          .0000       10.000    
     3 'Normalizat'    .82658       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.0503       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6830E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   8276.865     FROM MIGRAD    STATUS=CONVERGED     60 CALLS      268 TOTAL
                     EDM=   .64E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     40.857        516.93        .15682E-02    .36103E-05
   2  Index         2.1537        6.0402        .15080        .72096E-04
   3  Normalizat    .82659        .11209        .43956E-01    .20036E-04
   4  Prefactor     1.0502        .98429E-01    .61348E-01    .90510E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 40.8574
  Index      = 2.1537
  Normalizat = 0.82659
  Prefactor  = 1.05019
 **********
 **   18 **HESSE 
 **********

 FCN=   8276.865     FROM HESSE     STATUS=OK            33 CALLS      301 TOTAL
                     EDM=   .11E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     40.857        24.935        .62728E-04   -1.4429    
   2  Index         2.1537        .46755        .74812E-02   -.60561    
   3  Normalizat    .82659        .15611        .24144E-03   -.99090    
   4  Prefactor     1.0502        .19467        .27131E-03   -.91075    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.11292e-09
Minuit parameter uncertainties:
  1  24.9409
  2  0.468568
  3  0.156197
  4  0.194799
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/201339': 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) = 8276.8654443
delta logL = 0.171577093317

Extracting fit parameters...

4FGL J1158.5+4824
   Spectrum: PowerLaw
349    Prefactor:  4.086e+01  2.494e+01  1.000e-04  1.000e+04 ( 1.000e-13)
350        Index:  2.154e+00  4.686e-01  0.000e+00  1.000e+01 (-1.000e+00)
351        Scale:  9.466e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
680    Prefactor:  1.050e+00  1.948e-01  0.000e+00  1.000e+01 ( 1.000e+00)
681        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
682        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
679   Normalization:  8.266e-01  1.562e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 6.70
Ra Dec: 179.637 48.416
Photon Index (Free Index): 2.15 +/- 0.47
Photon Flux (Free Index): 4.48e-08 +/- 2.98e-08
Energy Flux (Free Index): 2.20e-05 +/- 1.71e-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/201339/cmap_HighResolution_564883201_565142401_4FGL_J1158.5+4824_daily_bin1256.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='5.44e-08', energy_flux2='2.20e-05', photon_flux_error='2.98e-08', dlogl='1.72e-01', energy_flux='1.69e-05', photon_flux2='4.48e-08', job_status='DONE', time_completed='2021-09-04 18:00:49.409122', photon_index_error2='0.47', photon_index2='2.15', ts='6.36', fit_tolerance='1e-08', GAL='1.07', photon_index_error='0.00', energy_flux_error2='1.71e-05', EG='0.81', time_epoch_completed='1630803649.41', return_code='0', job_id='201339', GAL2='1.05', EG2='0.83', return_code2='0', energy_flux_error='9.25e-06', photon_flux_error2='2.98e-08', ts2='6.70', photon_index='2.44' WHERE bin_id='1256' AND source_name='4FGL J1158.5+4824' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sat Sep  4 18:00:49 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0047>
Subject: Job 201339: <4FGL_J1158.5+4824_daily_bin1256> in cluster <slac> Done

Job <4FGL_J1158.5+4824_daily_bin1256> was submitted from host <rhel6-64d> by user <kocevski> in cluster <slac> at Sat Sep  4 17:46:22 2021
Job was executed on host(s) <bullet0047>, in queue <medium>, as user <kocevski> in cluster <slac> at Sat Sep  4 17:46:23 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Sat Sep  4 17:46:23 2021
Terminated at Sat Sep  4 18:00:50 2021
Results reported at Sat Sep  4 18:00:50 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1158.5+4824_daily_bin1256 179.637 48.4161 564883201 565142401 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J1158.5+4824 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   842.06 sec.
    Max Memory :                                 1258 MB
    Average Memory :                             352.00 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   866 sec.
    Turnaround time :                            868 sec.

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

