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


Performing analysis on: 4FGL_J2158.8-3013_daily_bin1320
RA = 329.714, Dec = -30.2251
tmin = 581472001, tmax = 581731201
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='64191', job_status='RUN', time_executed='2021-09-27 22:33:02.018815', time_epoch_executed='1632807182.02' WHERE source_name='4FGL J2158.8-3013' and cadence='daily' and bin_id='1320'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/64191

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/64191/ft1_4FGL_J2158.8-3013_daily_bin1320.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/64191/ft2_4FGL_J2158.8-3013_daily_bin1320.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/64191/ft1_4FGL_J2158.8-3013_daily_bin1320.fits outfile=/scratch/kocevski/64191/ft1_filteredMKT_4FGL_J2158.8-3013_daily_bin1320.fits ra=329.714 dec=-30.2251 rad=12.0 tmin=581472001.0 tmax=581731201.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 2.79
user 2.56
sys 0.20

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/64191/ft2_4FGL_J2158.8-3013_daily_bin1320.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/64191/ft1_filteredMKT_4FGL_J2158.8-3013_daily_bin1320.fits evtable="EVENTS" outfile="/scratch/kocevski/64191/ft1_filtered_4FGL_J2158.8-3013_daily_bin1320.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.52
user 0.33
sys 0.17

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/64191/ft1_filtered_4FGL_J2158.8-3013_daily_bin1320.fits" evtable="EVENTS" scfile=/scratch/kocevski/64191/ft2_4FGL_J2158.8-3013_daily_bin1320.fits sctable="SC_DATA" outfile=/scratch/kocevski/64191/ltcube_581472001_581731201_4FGL_J2158.8-3013_daily_bin1320.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/64191/ft2_4FGL_J2158.8-3013_daily_bin1320.fits
.....................!
real 14.11
user 13.55
sys 0.35

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/64191/ft1_filtered_4FGL_J2158.8-3013_daily_bin1320.fits evtable="EVENTS" scfile=/scratch/kocevski/64191/ft2_4FGL_J2158.8-3013_daily_bin1320.fits sctable="SC_DATA" expcube=/scratch/kocevski/64191/ltcube_581472001_581731201_4FGL_J2158.8-3013_daily_bin1320.fits outfile=/scratch/kocevski/64191/expmap_581472001_581731201_4FGL_J2158.8-3013_daily_bin1320.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/64191/ltcube_581472001_581731201_4FGL_J2158.8-3013_daily_bin1320.fits
.....................!
real 191.79
user 185.77
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 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/64191/ft1_filtered_4FGL_J2158.8-3013_daily_bin1320.fits scfile=/scratch/kocevski/64191/ft2_4FGL_J2158.8-3013_daily_bin1320.fits outfile=/scratch/kocevski/64191/cmap_581472001_581731201_4FGL_J2158.8-3013_daily_bin1320.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.55
user 0.37
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/64191/ft1_filtered_4FGL_J2158.8-3013_daily_bin1320.fits scfile=/scratch/kocevski/64191/ft2_4FGL_J2158.8-3013_daily_bin1320.fits outfile=/scratch/kocevski/64191/cmap_HighResolution_581472001_581731201_4FGL_J2158.8-3013_daily_bin1320.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.55
user 0.38
sys 0.16

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/64191/ft1_filtered_4FGL_J2158.8-3013_daily_bin1320.fits evtable="EVENTS" scfile=/scratch/kocevski/64191/ft2_4FGL_J2158.8-3013_daily_bin1320.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/64191/Model_4FGL_J2158.8-3013_daily_bin1320.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/64191/ft1_filtered_4FGL_J2158.8-3013_daily_bin1320.fits.....................!
real 53.45
user 51.79
sys 1.53

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/64191/ft1_filtered_4FGL_J2158.8-3013_daily_bin1320.fits', '/scratch/kocevski/64191/ft2_4FGL_J2158.8-3013_daily_bin1320.fits', expMap='/scratch/kocevski/64191/expmap_581472001_581731201_4FGL_J2158.8-3013_daily_bin1320.fits', expCube='/scratch/kocevski/64191/ltcube_581472001_581731201_4FGL_J2158.8-3013_daily_bin1320.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/64191/Model_4FGL_J2158.8-3013_daily_bin1320.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/64191/ft1_filtered_4FGL_J2158.8-3013_daily_bin1320.fits
Spacecraft file(s): /scratch/kocevski/64191/ft2_4FGL_J2158.8-3013_daily_bin1320.fits
Exposure map: /scratch/kocevski/64191/expmap_581472001_581731201_4FGL_J2158.8-3013_daily_bin1320.fits
Exposure cube: /scratch/kocevski/64191/ltcube_581472001_581731201_4FGL_J2158.8-3013_daily_bin1320.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/64191/Model_4FGL_J2158.8-3013_daily_bin1320.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) = 6140.66617049

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

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 '    .13447E-02   1.0000         .10000E-03   10000.    
     3 'Prefactor '    14.985       1.0000         .10000E-03   10000.    
     4 'Prefactor '    36.214       1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10023E-03   1.0000         .10000E-03   10000.    
     6 'norm      '    9.5783       1.0000         .10000E-03   10000.    
     7 'Prefactor '    14.051       1.0000         .10000E-03   10000.    
     8 'Prefactor '    .11128E-03   1.0000         .10000E-03   10000.    
     9 'norm      '    1.4548       1.0000         .10000E-03   10000.    
    10 'norm      '    .67605       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10004E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    .12640E-03   1.0000         .10000E-03   10000.    
    13 'Prefactor '    8.4789       1.0000         .10000E-03   10000.    
    14 'norm      '    64.822       1.0000         .10000E-03   10000.    
    15 'Prefactor '    15.289       1.0000         .10000E-03   10000.    
    16 'Prefactor '    .10021E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    .10004E-03   1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10018E-03   1.0000         .10000E-03   10000.    
    19 'Prefactor '    .10011E-03   1.0000         .10000E-03   10000.    
    20 'norm      '    5.8466       1.0000         .10000E-03   10000.    
    21 'Normalizat'    1.7311       1.0000         .10000E-01   10.000    
    22 'Prefactor '    .67954       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=   6140.638     FROM MIGRAD    STATUS=CONVERGED    469 CALLS     2006 TOTAL
                     EDM=   .41E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .3%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          .10000E-03    3.4729       -.44806E-07** at limit **
   2  Prefactor     .10001E-03    5.2797       -.63679E-06** at limit **
   3  Prefactor     14.979        11.946       -.26675E-06   -.28365E-04
   4  Prefactor     36.216        18.111        .73358E-06    .27179E-04
   5  Prefactor     .10000E-03    3.3765       -.43380E-07** at limit **
   6  norm          9.5756        8.8760       -.82604E-07   -.33527E-05
   7  Prefactor     14.028        19.345       -.85768E-05   -.12119E-04
   8  Prefactor     .10000E-03    18.099        .39867E-06** at limit **
   9  norm          1.4568        3.8998       -.46039E-06   -.80488E-03
  10  norm          .67607        .35236        .45158E-07    .33625E-03
  11  Prefactor     .10000E-03    2.9759       -.30506E-07** at limit **
  12  Prefactor     .10000E-03    43.970        .14684E-05** at limit **
  13  Prefactor     8.4717        9.8834       -.52223E-06   -.85584E-04
  14  norm          64.811        32.527       -.76805E-05   -.62504E-05
  15  Prefactor     15.286        14.526       -.12391E-06    .12895E-04
  16  Prefactor     .10000E-03    10.057        .17906E-06** at limit **
  17  norm          .10000E-03    .68239       -.19363E-07** at limit **
  18  Prefactor     .10000E-03    23.474       -.13272E-05** at limit **
  19  Prefactor     .10000E-03    6.8885       -.20472E-07** at limit **
  20  norm          5.8450        5.0425        .17788E-05   -.10776E-03
  21  Normalizat    1.7316        .21816        .10210E-05   -.98201E-07
  22  Prefactor     .67926        .15208        .32494E-06    .60748E-04
                               ERR DEF=  .500    
Final values: 
  norm       = 0.0001
  Prefactor  = 0.000100007
  Prefactor  = 14.9789
  Prefactor  = 36.216
  Prefactor  = 0.0001
  norm       = 9.57558
  Prefactor  = 14.028
  Prefactor  = 0.0001
  norm       = 1.45683
  norm       = 0.676074
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 8.47167
  norm       = 64.8114
  Prefactor  = 15.2864
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 5.84504
  Normalizat = 1.73165
  Prefactor  = 0.679262
 **********
 **   18 **HESSE 
 **********

 FCN=   6140.638     FROM HESSE     STATUS=OK           346 CALLS     2352 TOTAL
                     EDM=   .10E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          .10000E-03    3.4761        .14262E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10001E-03    25.022        .34839E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     14.979        11.990        .10347E-03   -1.4934    
   4  Prefactor     36.216        18.116        .66596E-04   -1.4504    
   5  Prefactor     .10000E-03    3.3818        .14058E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  norm          9.5756        8.8654        .12949E-03   -1.5089    
   7  Prefactor     14.028        19.202        .10685E-03   -1.4959    
   8  Prefactor     .10000E-03    18.113        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  norm          1.4568        3.8895        .23356E-03   -1.5467    
  10  norm          .67607        .35246        .31257E-04   -1.5544    
  11  Prefactor     .10000E-03    2.9800        .13202E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .10000E-03    44.831        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     8.4717        9.9742        .13767E-03   -1.5126    
  14  norm          64.811        32.516        .24923E-03   -1.4096    
  15  Prefactor     15.286        14.533        .10243E-03   -1.4926    
  16  Prefactor     .10000E-03    10.116        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          .10000E-03    .68378        .63205E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     .10000E-03    23.485        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     .10000E-03    6.9074        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  norm          5.8450        5.0234        .15771E-03   -1.5224    
  21  Normalizat    1.7316        .25534        .25290E-03   -.71461    
  22  Prefactor     .67926        .17579        .27493E-03   -1.0435    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.01191e-09
Minuit parameter uncertainties:
  1  4.43338e-07
  2  0.000845781
  3  11.992
  4  18.119
  5  5.81753e-07
  6  8.86658
  7  19.2104
  8  0.000114637
  9  3.89017
  10  0.352461
  11  9.2809e-07
  12  5.86479e-05
  13  9.9762
  14  32.5253
  15  14.5365
  16  1.96894e-05
  17  2.61948e-06
  18  3.52406e-05
  19  6.89196e-06
  20  5.02376
  21  0.255539
  22  0.175937
Done.

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

Extracting fit parameters...

4FGL J2158.8-3013
   Spectrum: LogParabola
261         norm:  6.761e-01  3.525e-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:  6.793e-01  1.759e-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.732e+00  2.555e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 23.43
Ra Dec: 329.714 -30.225
Photon Index (Fixed Index): 1.77 +/- 0.00
Photon Flux (Fixed Index): 5.60e-08 +/- 2.92e-08
Energy Flux (Fixed Index): 6.35e-05 +/- 3.31e-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) = 6140.53187039
delta logL = 0.106558051963

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 6140.52627145
delta logL = 0.11215699036

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    .64724       1.0000         .10000E-03   10000.    
     2 'alpha     '    1.5981       1.0000          .0000       5.0000    
     3 'Normalizat'    1.7392       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .67835       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=   6140.526     FROM MIGRAD    STATUS=CONVERGED     50 CALLS      206 TOTAL
                     EDM=   .42E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          .64725        .40416        .73105E-02   -.10632E-02
   2  alpha         1.5981        .37326        .25240        .10468E-04
   3  Normalizat    1.7392        .20777        .57119E-01    .27830E-04
   4  Prefactor     .67837        .15041        .62217E-01    .91536E-05
                               ERR DEF=  .500    
Final values: 
  norm       = 0.647253
  alpha      = 1.5981
  Normalizat = 1.73924
  Prefactor  = 0.678365
 **********
 **   18 **HESSE 
 **********

 FCN=   6140.526     FROM HESSE     STATUS=OK            29 CALLS      235 TOTAL
                     EDM=   .30E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          .64725        .35935        .32124E-04   -1.5547    
   2  alpha         1.5981        .35850        .10270E-01   -.36908    
   3  Normalizat    1.7392        .23907        .25255E-03   -.71260    
   4  Prefactor     .67837        .17283        .27523E-03   -1.0438    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.02885e-11
Minuit parameter uncertainties:
  1  0.359348
  2  0.359928
  3  0.239233
  4  0.172971
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/64191': 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) = 6140.52627143
delta logL = 0.112157009406

Extracting fit parameters...

4FGL J2158.8-3013
   Spectrum: LogParabola
261         norm:  6.473e-01  3.593e-01  1.000e-04  1.000e+04 ( 1.000e-11)
262        alpha:  1.598e+00  3.599e-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:  6.784e-01  1.730e-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.739e+00  2.392e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 23.66
Ra Dec: 329.714 -30.225
Photon Index (Free Index): 1.60 +/- 0.36
Photon Flux (Free Index): 4.54e-08 +/- 3.24e-08
Energy Flux (Free Index): 8.27e-05 +/- 6.45e-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/64191/cmap_HighResolution_581472001_581731201_4FGL_J2158.8-3013_daily_bin1320.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='5.60e-08', energy_flux2='8.27e-05', photon_flux_error='2.92e-08', dlogl='1.12e-01', energy_flux='6.35e-05', photon_flux2='4.54e-08', job_status='DONE', time_completed='2021-09-27 22:42:04.612268', photon_index_error2='0.36', photon_index2='1.60', ts='23.43', fit_tolerance='1e-08', GAL='0.68', photon_index_error='0.00', energy_flux_error2='6.45e-05', EG='1.73', time_epoch_completed='1632807724.61', return_code='0', job_id='64191', GAL2='0.68', EG2='1.74', return_code2='0', energy_flux_error='3.31e-05', photon_flux_error2='3.24e-08', ts2='23.66', photon_index='1.77' WHERE bin_id='1320' AND source_name='4FGL J2158.8-3013' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Sep 27 22:42:04 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0221>
Subject: Job 64191: <4FGL_J2158.8-3013_daily_bin1320> in cluster <slac> Done

Job <4FGL_J2158.8-3013_daily_bin1320> was submitted from host <rhel6-64f> by user <kocevski> in cluster <slac> at Mon Sep 27 22:30:19 2021
Job was executed on host(s) <bullet0221>, in queue <medium>, as user <kocevski> in cluster <slac> at Mon Sep 27 22:32:00 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:00 2021
Terminated at Mon Sep 27 22:42:05 2021
Results reported at Mon Sep 27 22:42:05 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J2158.8-3013_daily_bin1320 329.714 -30.2251 581472001 581731201 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 :                                   530.33 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             336.57 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   604 sec.
    Turnaround time :                            706 sec.

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

