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


Performing analysis on: 4FGL_J2158.8-3013_daily_bin1362
RA = 329.714, Dec = -30.2251
tmin = 592358401, tmax = 592617601
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='64254', job_status='RUN', time_executed='2021-09-27 22:35:57.393775', time_epoch_executed='1632807357.39' WHERE source_name='4FGL J2158.8-3013' and cadence='daily' and bin_id='1362'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/64254

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/64254/ft1_4FGL_J2158.8-3013_daily_bin1362.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/64254/ft2_4FGL_J2158.8-3013_daily_bin1362.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/64254/ft1_4FGL_J2158.8-3013_daily_bin1362.fits outfile=/scratch/kocevski/64254/ft1_filteredMKT_4FGL_J2158.8-3013_daily_bin1362.fits ra=329.714 dec=-30.2251 rad=12.0 tmin=592358401.0 tmax=592617601.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.51
user 3.28
sys 0.20

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/64254/ft2_4FGL_J2158.8-3013_daily_bin1362.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/64254/ft2_4FGL_J2158.8-3013_daily_bin1362.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/64254/ft1_filteredMKT_4FGL_J2158.8-3013_daily_bin1362.fits evtable="EVENTS" outfile="/scratch/kocevski/64254/ft1_filtered_4FGL_J2158.8-3013_daily_bin1362.fits" apply_filter=yes overwrite=yes header_obstimes=yes tstart=0.0 tstop=0.0 gtifile="default" chatter=3 clobber=yes debug=no gui=no mode="ql"

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

This is gtmktime version HEAD
Applying GTI filter:
IN_SAA!=T && LIVETIME>0 && gtifilter('/nfs/farm/g/glast/g/LCRepository/Likelihood/GTIs/nogrb.gti',(START+STOP)/2) && (angsep(RA_SUN,DEC_SUN,RA_ZENITH,DEC_ZENITH)>115 || gtifilter('/nfs/farm/g/glast/g/LCRepository/Likelihood/GTIs/nosolarflares.gti',(START+STOP)/2))
real 0.51
user 0.35
sys 0.16

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/64254/ft1_filtered_4FGL_J2158.8-3013_daily_bin1362.fits" evtable="EVENTS" scfile=/scratch/kocevski/64254/ft2_4FGL_J2158.8-3013_daily_bin1362.fits sctable="SC_DATA" outfile=/scratch/kocevski/64254/ltcube_592358401_592617601_4FGL_J2158.8-3013_daily_bin1362.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/64254/ft2_4FGL_J2158.8-3013_daily_bin1362.fits
.....................!
real 15.21
user 14.86
sys 0.32

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/64254/ft1_filtered_4FGL_J2158.8-3013_daily_bin1362.fits evtable="EVENTS" scfile=/scratch/kocevski/64254/ft2_4FGL_J2158.8-3013_daily_bin1362.fits sctable="SC_DATA" expcube=/scratch/kocevski/64254/ltcube_592358401_592617601_4FGL_J2158.8-3013_daily_bin1362.fits outfile=/scratch/kocevski/64254/expmap_592358401_592617601_4FGL_J2158.8-3013_daily_bin1362.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/64254/ltcube_592358401_592617601_4FGL_J2158.8-3013_daily_bin1362.fits
.....................!
real 192.52
user 187.07
sys 5.03

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

Setting source of interest to:
4FGL J2158.8-3013 @ 329.714 -30.2251

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/64254/ft1_filtered_4FGL_J2158.8-3013_daily_bin1362.fits scfile=/scratch/kocevski/64254/ft2_4FGL_J2158.8-3013_daily_bin1362.fits outfile=/scratch/kocevski/64254/cmap_592358401_592617601_4FGL_J2158.8-3013_daily_bin1362.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=329.714 yref=-30.2251 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/64254/ft1_filtered_4FGL_J2158.8-3013_daily_bin1362.fits scfile=/scratch/kocevski/64254/ft2_4FGL_J2158.8-3013_daily_bin1362.fits outfile=/scratch/kocevski/64254/cmap_HighResolution_592358401_592617601_4FGL_J2158.8-3013_daily_bin1362.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=329.714 yref=-30.2251 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/64254/ft1_filtered_4FGL_J2158.8-3013_daily_bin1362.fits evtable="EVENTS" scfile=/scratch/kocevski/64254/ft2_4FGL_J2158.8-3013_daily_bin1362.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/64254/Model_4FGL_J2158.8-3013_daily_bin1362.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/64254/ft1_filtered_4FGL_J2158.8-3013_daily_bin1362.fits.....................!
real 47.28
user 46.02
sys 1.14

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/64254/ft1_filtered_4FGL_J2158.8-3013_daily_bin1362.fits', '/scratch/kocevski/64254/ft2_4FGL_J2158.8-3013_daily_bin1362.fits', expMap='/scratch/kocevski/64254/expmap_592358401_592617601_4FGL_J2158.8-3013_daily_bin1362.fits', expCube='/scratch/kocevski/64254/ltcube_592358401_592617601_4FGL_J2158.8-3013_daily_bin1362.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/64254/Model_4FGL_J2158.8-3013_daily_bin1362.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J2158.8-3013'

4FGL J2158.8-3013
   Spectrum: LogParabola
261         norm:  1.436e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-11)
262        alpha:  1.767e+00  0.000e+00  0.000e+00  5.000e+00 ( 1.000e+00) fixed
263         beta:  4.097e-02  0.000e+00  0.000e+00  1.000e+01 ( 1.000e+00) fixed
264           Eb:  1.119e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/64254/ft1_filtered_4FGL_J2158.8-3013_daily_bin1362.fits
Spacecraft file(s): /scratch/kocevski/64254/ft2_4FGL_J2158.8-3013_daily_bin1362.fits
Exposure map: /scratch/kocevski/64254/expmap_592358401_592617601_4FGL_J2158.8-3013_daily_bin1362.fits
Exposure cube: /scratch/kocevski/64254/ltcube_592358401_592617601_4FGL_J2158.8-3013_daily_bin1362.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/64254/Model_4FGL_J2158.8-3013_daily_bin1362.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) = 5350.07629119

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10019E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10006E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    5.7755       1.0000         .10000E-03   10000.    
     6 'norm      '    1.8608       1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10012E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    .10012E-03   1.0000         .10000E-03   10000.    
     9 'norm      '    6.3636       1.0000         .10000E-03   10000.    
    10 'norm      '    .98262       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    13 'Prefactor '    6.1735       1.0000         .10000E-03   10000.    
    14 'norm      '    .10252E-03   1.0000         .10000E-03   10000.    
    15 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    16 'Prefactor '    12.824       1.0000         .10000E-03   10000.    
    17 'norm      '    3.3359       1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10046E-03   1.0000         .10000E-03   10000.    
    19 'Prefactor '    28.575       1.0000         .10000E-03   10000.    
    20 'norm      '    .10012E-03   1.0000         .10000E-03   10000.    
    21 'Normalizat'    1.2419       1.0000         .10000E-01   10.000    
    22 'Prefactor '    .94264       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5230E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   5350.043     FROM MIGRAD    STATUS=CONVERGED    466 CALLS     2005 TOTAL
                     EDM=   .91E-11  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  5.7%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          .10000E-03    2.4023       -.30360E-08** at limit **
   2  Prefactor     .10000E-03    3.9409       -.28279E-07** at limit **
   3  Prefactor     .10000E-03    8.3814        .18429E-07** at limit **
   4  Prefactor     .10000E-03    7.8262        .58833E-06** at limit **
   5  Prefactor     5.7708        9.5554        .14816E-06   -.15081E-05
   6  norm          1.8588        9.9460        .20444E-06    .15012E-05
   7  Prefactor     .10000E-03    25.762       -.21900E-05** at limit **
   8  Prefactor     .10000E-03    39.983        .28041E-05** at limit **
   9  norm          6.3655        6.7522        .15574E-05    .64316E-04
  10  norm          .98262        .47110       -.72796E-07    .11472E-03
  11  Prefactor     .10000E-03    5.1143        .65067E-07** at limit **
  12  Prefactor     .10000E-03    6.1612       -.27477E-06** at limit **
  13  Prefactor     6.1760        10.200        .16975E-05    .29924E-04
  14  norm          .10000E-03    34.397       -.11131E-05** at limit **
  15  Prefactor     .10000E-03    9.7675       -.73673E-06** at limit **
  16  Prefactor     12.826        17.121        .15840E-06   -.93308E-05
  17  norm          3.3362        2.2496        .12029E-07    .39410E-05
  18  Prefactor     .10000E-03    18.544        .16731E-05** at limit **
  19  Prefactor     28.580        18.516       -.24072E-07    .58217E-05
  20  norm          .10000E-03    3.2867        .21988E-08** at limit **
  21  Normalizat    1.2416        .23918       -.19329E-05    .50865E-04
  22  Prefactor     .94286        .15936        .80352E-06   -.43540E-05
                               ERR DEF=  .500    
Final values: 
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 5.77078
  norm       = 1.85878
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 6.36555
  norm       = 0.982619
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 6.176
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 12.8265
  norm       = 3.33619
  Prefactor  = 0.0001
  Prefactor  = 28.5797
  norm       = 0.0001
  Normalizat = 1.24156
  Prefactor  = 0.942858
 **********
 **   18 **HESSE 
 **********

 FCN=   5350.043     FROM HESSE     STATUS=OK           340 CALLS     2345 TOTAL
                     EDM=   .21E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          .10000E-03    2.4026        .11072E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    3.9619        .14180E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     .10000E-03    8.4544        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10000E-03    7.8453        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     5.7708        9.5426        .16712E-03   -1.5227    
   6  norm          1.8588        9.8949        .30548E-03   -1.5435    
   7  Prefactor     .10000E-03    25.958        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     .10000E-03    40.064        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  norm          6.3655        6.7509        .79556E-03   -1.5203    
  10  norm          .98262        .46885        .32083E-04   -1.5510    
  11  Prefactor     .10000E-03    5.1470        .16153E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .10000E-03    6.1644        .17732E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     6.1760        10.210        .80787E-03   -1.5211    
  14  norm          .10000E-03    34.870        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     .10000E-03    9.7773        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     12.826        17.236        .11186E-03   -1.4992    
  17  norm          3.3362        2.2504        .87625E-04   -1.5343    
  18  Prefactor     .10000E-03    18.575        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     28.580        18.641        .74948E-04   -1.4638    
  20  norm          .10000E-03    3.3446        .12948E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Normalizat    1.2416        .27725        .27734E-03   -.85328    
  22  Prefactor     .94286        .18675        .22706E-03   -.94659    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.14263e-11
Minuit parameter uncertainties:
  1  1.57925e-07
  2  1.23769e-06
  3  2.71616e-06
  4  4.81645e-06
  5  9.54509
  6  8.57927
  7  4.49313e-05
  8  2.14755e-05
  9  6.75171
  10  0.468856
  11  8.79343e-07
  12  1.48394e-06
  13  10.2124
  14  5.29117e-05
  15  5.89005e-06
  16  17.2425
  17  2.25049
  18  5.34546e-06
  19  18.6446
  20  1.48869e-06
  21  0.277582
  22  0.18688
Done.

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

Extracting fit parameters...

4FGL J2158.8-3013
   Spectrum: LogParabola
261         norm:  9.826e-01  4.689e-01  1.000e-04  1.000e+04 ( 1.000e-11)
262        alpha:  1.767e+00  0.000e+00  0.000e+00  5.000e+00 ( 1.000e+00) fixed
263         beta:  4.097e-02  0.000e+00  0.000e+00  1.000e+01 ( 1.000e+00) fixed
264           Eb:  1.119e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
520    Prefactor:  9.429e-01  1.869e-01  0.000e+00  1.000e+01 ( 1.000e+00)
521        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
522        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
519   Normalization:  1.242e+00  2.776e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 13.86
Ra Dec: 329.714 -30.225
Photon Index (Fixed Index): 1.77 +/- 0.00
Photon Flux (Fixed Index): 8.14e-08 +/- 3.88e-08
Energy Flux (Fixed Index): 9.23e-05 +/- 4.41e-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) = 5349.92681227
delta logL = 0.116341133429

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 5349.91905782
delta logL = 0.124095584059

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    .97716       1.0000         .10000E-03   10000.    
     2 'alpha     '    1.9459       1.0000          .0000       5.0000    
     3 'Normalizat'    1.2237       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .94838       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5230E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   5349.919     FROM MIGRAD    STATUS=CONVERGED     48 CALLS      229 TOTAL
                     EDM=   .49E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          .97714        8.4515        .68689E-02   -.29878E-03
   2  alpha         1.9459        3.3745        .22925        .30204E-04
   3  Normalizat    1.2237        .17549        .63054E-01    .95073E-05
   4  Prefactor     .94838        .92613E-01    .45619E-01    .61271E-05
                               ERR DEF=  .500    
Final values: 
  norm       = 0.977143
  alpha      = 1.94588
  Normalizat = 1.22374
  Prefactor  = 0.948377
 **********
 **   18 **HESSE 
 **********

 FCN=   5349.919     FROM HESSE     STATUS=OK            33 CALLS      262 TOTAL
                     EDM=   .11E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          .97714        .43695        .30513E-04   -1.5510    
   2  alpha         1.9459        .36302        .90906E-02   -.22351    
   3  Normalizat    1.2237        .25126        .27890E-03   -.85872    
   4  Prefactor     .94838        .18110        .22637E-03   -.94471    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.09035e-11
Minuit parameter uncertainties:
  1  0.436952
  2  0.364372
  3  0.251511
  4  0.181215
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/64254': 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) = 5349.9190578
delta logL = 0.124095600394

Extracting fit parameters...

4FGL J2158.8-3013
   Spectrum: LogParabola
261         norm:  9.771e-01  4.370e-01  1.000e-04  1.000e+04 ( 1.000e-11)
262        alpha:  1.946e+00  3.644e-01  0.000e+00  5.000e+00 ( 1.000e+00)
263         beta:  4.097e-02  0.000e+00  0.000e+00  1.000e+01 ( 1.000e+00) fixed
264           Eb:  1.119e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
520    Prefactor:  9.484e-01  1.812e-01  0.000e+00  1.000e+01 ( 1.000e+00)
521        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
522        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
519   Normalization:  1.224e+00  2.515e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 14.14
Ra Dec: 329.714 -30.225
Photon Index (Free Index): 1.95 +/- 0.36
Photon Flux (Free Index): 1.01e-07 +/- 5.86e-08
Energy Flux (Free Index): 7.35e-05 +/- 4.54e-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/64254/cmap_HighResolution_592358401_592617601_4FGL_J2158.8-3013_daily_bin1362.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='8.14e-08', energy_flux2='7.35e-05', photon_flux_error='3.88e-08', dlogl='1.24e-01', energy_flux='9.23e-05', photon_flux2='1.01e-07', job_status='DONE', time_completed='2021-09-27 22:45:23.735087', photon_index_error2='0.36', photon_index2='1.95', ts='13.86', fit_tolerance='1e-08', GAL='0.94', photon_index_error='0.00', energy_flux_error2='4.54e-05', EG='1.24', time_epoch_completed='1632807923.74', return_code='0', job_id='64254', GAL2='0.95', EG2='1.22', return_code2='0', energy_flux_error='4.41e-05', photon_flux_error2='5.86e-08', ts2='14.14', photon_index='1.77' WHERE bin_id='1362' AND source_name='4FGL J2158.8-3013' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Sep 27 22:45:23 PDT 2021


------------------------------------------------------------
Sender: LSF System <scs@bullet0129>
Subject: Job 64254: <4FGL_J2158.8-3013_daily_bin1362> in cluster <slac> Done

Job <4FGL_J2158.8-3013_daily_bin1362> was submitted from host <rhel6-64f> by user <kocevski> in cluster <slac> at Mon Sep 27 22:30:23 2021
Job was executed on host(s) <bullet0129>, in queue <medium>, as user <kocevski> in cluster <slac> at Mon Sep 27 22:32:21 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Mon Sep 27 22:32:21 2021
Terminated at Mon Sep 27 22:45:24 2021
Results reported at Mon Sep 27 22:45:24 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J2158.8-3013_daily_bin1362 329.714 -30.2251 592358401 592617601 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J2158.8-3013 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   507.12 sec.
    Max Memory :                                 1255 MB
    Average Memory :                             280.96 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   783 sec.
    Turnaround time :                            901 sec.

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

