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


Performing analysis on: 4FGL_J2158.8-3013_daily_bin1347
RA = 329.714, Dec = -30.2251
tmin = 588470401, tmax = 588729601
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='64232', job_status='RUN', time_executed='2021-09-27 22:32:53.162259', time_epoch_executed='1632807173.16' WHERE source_name='4FGL J2158.8-3013' and cadence='daily' and bin_id='1347'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/64232

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/64232/ft1_4FGL_J2158.8-3013_daily_bin1347.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/64232/ft2_4FGL_J2158.8-3013_daily_bin1347.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/64232/ft1_4FGL_J2158.8-3013_daily_bin1347.fits outfile=/scratch/kocevski/64232/ft1_filteredMKT_4FGL_J2158.8-3013_daily_bin1347.fits ra=329.714 dec=-30.2251 rad=12.0 tmin=588470401.0 tmax=588729601.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 4.87
user 4.58
sys 0.23

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/64232/ft2_4FGL_J2158.8-3013_daily_bin1347.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/64232/ft1_filteredMKT_4FGL_J2158.8-3013_daily_bin1347.fits evtable="EVENTS" outfile="/scratch/kocevski/64232/ft1_filtered_4FGL_J2158.8-3013_daily_bin1347.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.56
user 0.34
sys 0.14

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/64232/ft1_filtered_4FGL_J2158.8-3013_daily_bin1347.fits" evtable="EVENTS" scfile=/scratch/kocevski/64232/ft2_4FGL_J2158.8-3013_daily_bin1347.fits sctable="SC_DATA" outfile=/scratch/kocevski/64232/ltcube_588470401_588729601_4FGL_J2158.8-3013_daily_bin1347.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/64232/ft2_4FGL_J2158.8-3013_daily_bin1347.fits
.....................!
real 13.50
user 13.13
sys 0.33

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/64232/ft1_filtered_4FGL_J2158.8-3013_daily_bin1347.fits evtable="EVENTS" scfile=/scratch/kocevski/64232/ft2_4FGL_J2158.8-3013_daily_bin1347.fits sctable="SC_DATA" expcube=/scratch/kocevski/64232/ltcube_588470401_588729601_4FGL_J2158.8-3013_daily_bin1347.fits outfile=/scratch/kocevski/64232/expmap_588470401_588729601_4FGL_J2158.8-3013_daily_bin1347.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/64232/ltcube_588470401_588729601_4FGL_J2158.8-3013_daily_bin1347.fits
.....................!
real 192.99
user 187.73
sys 4.78

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/64232/ft1_filtered_4FGL_J2158.8-3013_daily_bin1347.fits scfile=/scratch/kocevski/64232/ft2_4FGL_J2158.8-3013_daily_bin1347.fits outfile=/scratch/kocevski/64232/cmap_588470401_588729601_4FGL_J2158.8-3013_daily_bin1347.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.54
user 0.36
sys 0.17

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/64232/ft1_filtered_4FGL_J2158.8-3013_daily_bin1347.fits scfile=/scratch/kocevski/64232/ft2_4FGL_J2158.8-3013_daily_bin1347.fits outfile=/scratch/kocevski/64232/cmap_HighResolution_588470401_588729601_4FGL_J2158.8-3013_daily_bin1347.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.15

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/64232/ft1_filtered_4FGL_J2158.8-3013_daily_bin1347.fits evtable="EVENTS" scfile=/scratch/kocevski/64232/ft2_4FGL_J2158.8-3013_daily_bin1347.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/64232/Model_4FGL_J2158.8-3013_daily_bin1347.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/64232/ft1_filtered_4FGL_J2158.8-3013_daily_bin1347.fits.....................!
real 53.43
user 52.05
sys 1.20

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    2.7870       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    9.8215       1.0000         .10000E-03   10000.    
     5 'Prefactor '    4.5907       1.0000         .10000E-03   10000.    
     6 'norm      '    5.9739       1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10405E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    11.981       1.0000         .10000E-03   10000.    
     9 'norm      '    .16949E-03   1.0000         .10000E-03   10000.    
    10 'norm      '    .62859       1.0000         .10000E-03   10000.    
    11 'Prefactor '    2.9487       1.0000         .10000E-03   10000.    
    12 'Prefactor '    17.663       1.0000         .10000E-03   10000.    
    13 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    14 'norm      '    .10046E-03   1.0000         .10000E-03   10000.    
    15 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    16 'Prefactor '    9.1832       1.0000         .10000E-03   10000.    
    17 'norm      '    .10002E-03   1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10068E-03   1.0000         .10000E-03   10000.    
    19 'Prefactor '    6.1591       1.0000         .10000E-03   10000.    
    20 'norm      '    3.9605       1.0000         .10000E-03   10000.    
    21 'Normalizat'    1.2692       1.0000         .10000E-01   10.000    
    22 'Prefactor '    .82710       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=   6372.857     FROM MIGRAD    STATUS=CONVERGED    490 CALLS     2067 TOTAL
                     EDM=   .23E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.6%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          2.7867        5.2301       -.28022E-07   -.42503E-04
   2  Prefactor     .10000E-03    5.1971        .96340E-08** at limit **
   3  Prefactor     .10000E-03    6.7043        .81007E-08** at limit **
   4  Prefactor     9.8249        11.836       -.42321E-06    .31101E-05
   5  Prefactor     4.5907        5.3619       -.34476E-07   -.14569E-04
   6  norm          5.9752        6.4438        .29917E-06    .11416E-04
   7  Prefactor     .10000E-03    20.341       -.10960E-05** at limit **
   8  Prefactor     11.987        35.965        .11208E-04    .60968E-06
   9  norm          .10000E-03    2.7796       -.41103E-06** at limit **
  10  norm          .62879        .30486       -.34422E-07    .66549E-03
  11  Prefactor     2.9476        3.0339        .24610E-06   -.73635E-03
  12  Prefactor     17.666        16.908        .25786E-07    .10067E-05
  13  Prefactor     .10000E-03    3.2618        .11882E-09** at limit **
  14  norm          .10000E-03    29.970       -.98528E-08** at limit **
  15  Prefactor     .10000E-03    11.185        .37819E-07** at limit **
  16  Prefactor     9.1835        12.117        .60215E-07   -.72845E-05
  17  norm          .10000E-03    1.6890       -.29240E-07** at limit **
  18  Prefactor     .10000E-03    50.190        .69504E-06** at limit **
  19  Prefactor     6.1591        9.4722        .96344E-07   -.11370E-04
  20  norm          3.9604        4.1986        .53742E-07   -.35186E-04
  21  Normalizat    1.2692        .17972       -.54325E-06    .94175E-04
  22  Prefactor     .82721        .13028       -.11775E-06    .39566E-04
                               ERR DEF=  .500    
Final values: 
  norm       = 2.78666
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 9.82487
  Prefactor  = 4.59068
  norm       = 5.97516
  Prefactor  = 0.000100005
  Prefactor  = 11.9873
  norm       = 0.000100001
  norm       = 0.628792
  Prefactor  = 2.94756
  Prefactor  = 17.6662
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 9.18348
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 6.15914
  norm       = 3.96044
  Normalizat = 1.26915
  Prefactor  = 0.827207
 **********
 **   18 **HESSE 
 **********

 FCN=   6372.857     FROM HESSE     STATUS=OK           346 CALLS     2413 TOTAL
                     EDM=   .17E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          2.7867        5.2207        .24372E-03   -1.5374    
   2  Prefactor     .10000E-03    5.2745        .17770E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     .10000E-03    6.9435        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     9.8249        11.831        .12787E-03   -1.5081    
   5  Prefactor     4.5907        5.3563        .18786E-03   -1.5279    
   6  norm          5.9752        6.4359        .16429E-03   -1.5219    
   7  Prefactor     .10000E-03    21.284        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     11.987        36.153        .11573E-03   -1.5015    
   9  norm          .10000E-03    5.8053        .25045E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  norm          .62879        .30090        .29015E-04   -1.5549    
  11  Prefactor     2.9476        8.6729        .11825E-02   -1.5365    
  12  Prefactor     17.666        16.984        .95299E-04   -1.4867    
  13  Prefactor     .10000E-03    3.2915        .14076E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  norm          .10000E-03    30.296        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     .10000E-03    11.210        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     9.1835        12.130        .13225E-03   -1.5102    
  17  norm          .10000E-03    1.7570        .20243E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     .10000E-03    50.401        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     6.1591        9.4887        .16176E-03   -1.5212    
  20  norm          3.9604        4.1948        .16318E-03   -1.5310    
  21  Normalizat    1.2692        .20684        .24564E-03   -.84492    
  22  Prefactor     .82721        .15047        .22240E-03   -.98733    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.71487e-09
Minuit parameter uncertainties:
  1  5.22159
  2  2.49016e-06
  3  6.96313e-06
  4  11.8334
  5  5.35682
  6  6.4366
  7  0.000624971
  8  36.2192
  9  0.000111674
  10  0.300902
  11  8.67663
  12  16.989
  13  2.47305e-06
  14  1.84402e-05
  15  4.7687e-06
  16  12.1332
  17  1.94822e-06
  18  1.17418e-07
  19  9.49099
  20  4.19513
  21  0.206973
  22  0.150548
Done.

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

Extracting fit parameters...

4FGL J2158.8-3013
   Spectrum: LogParabola
261         norm:  6.288e-01  3.009e-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:  8.272e-01  1.505e-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.269e+00  2.070e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 20.81
Ra Dec: 329.714 -30.225
Photon Index (Fixed Index): 1.77 +/- 0.00
Photon Flux (Fixed Index): 5.21e-08 +/- 2.49e-08
Energy Flux (Fixed Index): 5.91e-05 +/- 2.83e-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) = 6372.60140718
delta logL = 0.255130111207

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 6372.58652069
delta logL = 0.270016602884

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    .63110       1.0000         .10000E-03   10000.    
     2 'alpha     '    2.0722       1.0000          .0000       5.0000    
     3 'Normalizat'    1.2423       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .83531       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=   6372.587     FROM MIGRAD    STATUS=CONVERGED     51 CALLS      234 TOTAL
                     EDM=   .43E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          .63105        4.1494        .58796E-02    .91715E-04
   2  alpha         2.0721        3.5256        .26239        .45632E-04
   3  Normalizat    1.2423        .10757        .56000E-01    .63943E-05
   4  Prefactor     .83532        .58050E-01    .44175E-01    .12804E-04
                               ERR DEF=  .500    
Final values: 
  norm       = 0.631046
  alpha      = 2.07214
  Normalizat = 1.24231
  Prefactor  = 0.835318
 **********
 **   18 **HESSE 
 **********

 FCN=   6372.587     FROM HESSE     STATUS=OK            33 CALLS      267 TOTAL
                     EDM=   .91E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          .63105        .28513        .25957E-04   -1.5549    
   2  alpha         2.0721        .40387        .96657E-02   -.17199    
   3  Normalizat    1.2423        .20221        .24763E-03   -.85305    
   4  Prefactor     .83532        .14932        .22126E-03   -.98439    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 9.13414e-10
Minuit parameter uncertainties:
  1  0.285133
  2  0.405699
  3  0.202337
  4  0.149397
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/64232': 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) = 6372.58652065
delta logL = 0.270016641091

Extracting fit parameters...

4FGL J2158.8-3013
   Spectrum: LogParabola
261         norm:  6.310e-01  2.851e-01  1.000e-04  1.000e+04 ( 1.000e-11)
262        alpha:  2.072e+00  4.057e-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:  8.353e-01  1.494e-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.023e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 21.34
Ra Dec: 329.714 -30.225
Photon Index (Free Index): 2.07 +/- 0.41
Photon Flux (Free Index): 7.76e-08 +/- 4.70e-08
Energy Flux (Free Index): 4.34e-05 +/- 2.40e-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/64232/cmap_HighResolution_588470401_588729601_4FGL_J2158.8-3013_daily_bin1347.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='5.21e-08', energy_flux2='4.34e-05', photon_flux_error='2.49e-08', dlogl='2.70e-01', energy_flux='5.91e-05', photon_flux2='7.76e-08', job_status='DONE', time_completed='2021-09-27 22:42:17.794902', photon_index_error2='0.41', photon_index2='2.07', ts='20.81', fit_tolerance='1e-08', GAL='0.83', photon_index_error='0.00', energy_flux_error2='2.40e-05', EG='1.27', time_epoch_completed='1632807737.79', return_code='0', job_id='64232', GAL2='0.84', EG2='1.24', return_code2='0', energy_flux_error='2.83e-05', photon_flux_error2='4.70e-08', ts2='21.34', photon_index='1.77' WHERE bin_id='1347' AND source_name='4FGL J2158.8-3013' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Sep 27 22:42:17 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0102>
Subject: Job 64232: <4FGL_J2158.8-3013_daily_bin1347> in cluster <slac> Done

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

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J2158.8-3013_daily_bin1347 329.714 -30.2251 588470401 588729601 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 :                                   555.00 sec.
    Max Memory :                                 1093 MB
    Average Memory :                             314.09 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   602 sec.
    Turnaround time :                            716 sec.

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

