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


Performing analysis on: 4FGL_J2158.8-3013_daily_bin675
RA = 329.714, Dec = -30.2251
tmin = 414288001, tmax = 414547201
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='61347', job_status='RUN', time_executed='2021-09-27 22:23:53.616234', time_epoch_executed='1632806633.62' WHERE source_name='4FGL J2158.8-3013' and cadence='daily' and bin_id='675'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/61347

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/61347/ft1_4FGL_J2158.8-3013_daily_bin675.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/61347/ft2_4FGL_J2158.8-3013_daily_bin675.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/61347/ft1_4FGL_J2158.8-3013_daily_bin675.fits outfile=/scratch/kocevski/61347/ft1_filteredMKT_4FGL_J2158.8-3013_daily_bin675.fits ra=329.714 dec=-30.2251 rad=12.0 tmin=414288001.0 tmax=414547201.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 5.50
user 5.23
sys 0.25

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/61347/ft2_4FGL_J2158.8-3013_daily_bin675.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/61347/ft1_filteredMKT_4FGL_J2158.8-3013_daily_bin675.fits evtable="EVENTS" outfile="/scratch/kocevski/61347/ft1_filtered_4FGL_J2158.8-3013_daily_bin675.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.16

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/61347/ft1_filtered_4FGL_J2158.8-3013_daily_bin675.fits" evtable="EVENTS" scfile=/scratch/kocevski/61347/ft2_4FGL_J2158.8-3013_daily_bin675.fits sctable="SC_DATA" outfile=/scratch/kocevski/61347/ltcube_414288001_414547201_4FGL_J2158.8-3013_daily_bin675.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/61347/ft2_4FGL_J2158.8-3013_daily_bin675.fits
.....................!
real 14.16
user 13.72
sys 0.33

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/61347/ft1_filtered_4FGL_J2158.8-3013_daily_bin675.fits evtable="EVENTS" scfile=/scratch/kocevski/61347/ft2_4FGL_J2158.8-3013_daily_bin675.fits sctable="SC_DATA" expcube=/scratch/kocevski/61347/ltcube_414288001_414547201_4FGL_J2158.8-3013_daily_bin675.fits outfile=/scratch/kocevski/61347/expmap_414288001_414547201_4FGL_J2158.8-3013_daily_bin675.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/61347/ltcube_414288001_414547201_4FGL_J2158.8-3013_daily_bin675.fits
.....................!
real 193.38
user 187.84
sys 5.00

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/61347/ft1_filtered_4FGL_J2158.8-3013_daily_bin675.fits scfile=/scratch/kocevski/61347/ft2_4FGL_J2158.8-3013_daily_bin675.fits outfile=/scratch/kocevski/61347/cmap_414288001_414547201_4FGL_J2158.8-3013_daily_bin675.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.39
sys 0.17

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/61347/ft1_filtered_4FGL_J2158.8-3013_daily_bin675.fits scfile=/scratch/kocevski/61347/ft2_4FGL_J2158.8-3013_daily_bin675.fits outfile=/scratch/kocevski/61347/cmap_HighResolution_414288001_414547201_4FGL_J2158.8-3013_daily_bin675.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.58
user 0.39
sys 0.17

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/61347/ft1_filtered_4FGL_J2158.8-3013_daily_bin675.fits evtable="EVENTS" scfile=/scratch/kocevski/61347/ft2_4FGL_J2158.8-3013_daily_bin675.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/61347/Model_4FGL_J2158.8-3013_daily_bin675.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/61347/ft1_filtered_4FGL_J2158.8-3013_daily_bin675.fits.....................!
real 59.83
user 58.47
sys 1.22

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

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 '    .10002E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    .25553       1.0000         .10000E-03   10000.    
     4 'Prefactor '    14.024       1.0000         .10000E-03   10000.    
     5 'Prefactor '    7.9301       1.0000         .10000E-03   10000.    
     6 'norm      '    .10059E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .28148E-02   1.0000         .10000E-03   10000.    
     8 'Prefactor '    109.10       1.0000         .10000E-03   10000.    
     9 'norm      '    2.7052       1.0000         .10000E-03   10000.    
    10 'norm      '    .92282       1.0000         .10000E-03   10000.    
    11 'Prefactor '    11.094       1.0000         .10000E-03   10000.    
    12 'Prefactor '    14.113       1.0000         .10000E-03   10000.    
    13 'Prefactor '    .47543       1.0000         .10000E-03   10000.    
    14 'norm      '    15.932       1.0000         .10000E-03   10000.    
    15 'Prefactor '    .10158E-03   1.0000         .10000E-03   10000.    
    16 'Prefactor '    1.9483       1.0000         .10000E-03   10000.    
    17 'norm      '    2.1643       1.0000         .10000E-03   10000.    
    18 'Prefactor '    .11470E-03   1.0000         .10000E-03   10000.    
    19 'Prefactor '    5.0355       1.0000         .10000E-03   10000.    
    20 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    21 'Normalizat'    1.1273       1.0000         .10000E-01   10.000    
    22 'Prefactor '    1.0325       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=   6962.785     FROM MIGRAD    STATUS=CONVERGED    500 CALLS     2848 TOTAL
                     EDM=   .10E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  7.7%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          .10000E-03    2.3592        .17025E-06** at limit **
   2  Prefactor     .10000E-03    4.1740        .50047E-06** at limit **
   3  Prefactor     .21487        72.156        .14747E-04   -.17946E-03
   4  Prefactor     14.006        16.150        .99898E-06    .21226E-04
   5  Prefactor     7.9349        8.6420       -.23676E-05   -.36863E-03
   6  norm          .10000E-03    5.1580        .24629E-05** at limit **
   7  Prefactor     .10001E-03    33.538        .34192E-05** at limit **
   8  Prefactor     109.19        90.424       -.27396E-05   -.55768E-04
   9  norm          2.6986        7.2752       -.65717E-06   -.55676E-04
  10  norm          .92279        .39426        .20896E-06    .65522E-03
  11  Prefactor     11.081        10.235        .18756E-06    .69085E-05
  12  Prefactor     14.111        31.616        .23231E-05    .17996E-04
  13  Prefactor     .47849        8.7761       -.10398E-05   -.68167E-03
  14  norm          15.938        25.522        .84009E-06    .12375E-04
  15  Prefactor     .10000E-03    8.3454        .10360E-06** at limit **
  16  Prefactor     1.9479        21.160       -.28506E-05   -.47846E-04
  17  norm          2.1644        2.4644        .12446E-06   -.17433E-04
  18  Prefactor     .10000E-03    51.442        .54219E-05** at limit **
  19  Prefactor     5.0349        15.250       -.28021E-05   -.91499E-04
  20  norm          .10000E-03    2.8808        .88576E-07** at limit **
  21  Normalizat    1.1278        .22552        .82396E-06   -.46428E-03
  22  Prefactor     1.0323        .13907       -.17501E-05   -.25161E-03
                               ERR DEF=  .500    
Final values: 
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.214869
  Prefactor  = 14.0064
  Prefactor  = 7.93492
  norm       = 0.0001
  Prefactor  = 0.000100007
  Prefactor  = 109.185
  norm       = 2.69857
  norm       = 0.922794
  Prefactor  = 11.0811
  Prefactor  = 14.1112
  Prefactor  = 0.478491
  norm       = 15.9381
  Prefactor  = 0.0001
  Prefactor  = 1.94789
  norm       = 2.16437
  Prefactor  = 0.000100001
  Prefactor  = 5.03495
  norm       = 0.0001
  Normalizat = 1.12775
  Prefactor  = 1.03231
 **********
 **   18 **HESSE 
 **********

 FCN=   6962.785     FROM HESSE     STATUS=OK           352 CALLS     3200 TOTAL
                     EDM=   .45E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          .10000E-03    2.3627        .12517E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    4.2200        .16649E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     .21487        81.777        .40027E-02   -1.5615    
   4  Prefactor     14.006        16.147        .10695E-03   -1.4959    
   5  Prefactor     7.9349        8.7035        .14239E-03   -1.5145    
   6  norm          .10000E-03    5.2065        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10001E-03    249.97        .78059E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     109.19        93.398        .19253E-03   -1.3614    
   9  norm          2.6986        7.2310        .24766E-03   -1.5379    
  10  norm          .92279        .39315        .31520E-04   -1.5516    
  11  Prefactor     11.081        10.238        .12028E-03   -1.5042    
  12  Prefactor     14.111        31.707        .10662E-03   -1.4956    
  13  Prefactor     .47849        28.365        .40295E-02   -1.5570    
  14  norm          15.938        25.525        .10034E-03   -1.4909    
  15  Prefactor     .10000E-03    8.3484        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     1.9479        21.195        .29734E-03   -1.5429    
  17  norm          2.1644        2.4617        .13594E-03   -1.5414    
  18  Prefactor     .10000E-03    51.596        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     5.0349        15.244        .17919E-03   -1.5259    
  20  norm          .10000E-03    2.8884        .13831E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Normalizat    1.1278        .25836        .30496E-03   -.88866    
  22  Prefactor     1.0323        .15899        .21347E-03   -.91660    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 4.53806e-09
Minuit parameter uncertainties:
  1  2.4281e-06
  2  7.15971e-06
  3  8.39326
  4  16.1516
  5  8.70487
  6  2.28676e-05
  7  0.00271158
  8  93.5247
  9  7.23331
  10  0.393152
  11  10.2393
  12  31.7445
  13  7.37106
  14  25.5425
  15  1.2401e-06
  16  12.8563
  17  2.46186
  18  0.000398793
  19  15.2557
  20  1.9516e-06
  21  0.258655
  22  0.159063
Done.

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

Extracting fit parameters...

4FGL J2158.8-3013
   Spectrum: LogParabola
261         norm:  9.228e-01  3.932e-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:  1.032e+00  1.591e-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.128e+00  2.587e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 20.52
Ra Dec: 329.714 -30.225
Photon Index (Fixed Index): 1.77 +/- 0.00
Photon Flux (Fixed Index): 7.65e-08 +/- 3.26e-08
Energy Flux (Fixed Index): 8.67e-05 +/- 3.69e-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) = 6962.13905558
delta logL = 0.646074934989

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 6962.13530202
delta logL = 0.649828486697

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    .91466       1.0000         .10000E-03   10000.    
     2 'alpha     '    2.1665       1.0000          .0000       5.0000    
     3 'Normalizat'    1.0726       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.0502       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=   6962.135     FROM MIGRAD    STATUS=CONVERGED     51 CALLS      211 TOTAL
                     EDM=   .40E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          .91441        4.7518        .63276E-02    .14523E-03
   2  alpha         2.1666        3.5827        .22790        .50114E-04
   3  Normalizat    1.0729        .15541        .70332E-01    .20373E-04
   4  Prefactor     1.0501        .64602E-01    .39896E-01    .16251E-04
                               ERR DEF=  .500    
Final values: 
  norm       = 0.914405
  alpha      = 2.16658
  Normalizat = 1.07294
  Prefactor  = 1.05006
 **********
 **   18 **HESSE 
 **********

 FCN=   6962.135     FROM HESSE     STATUS=OK            33 CALLS      244 TOTAL
                     EDM=   .81E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          .91441        .36389        .27994E-04   -1.5517    
   2  alpha         2.1666        .35016        .89136E-02   -.13377    
   3  Normalizat    1.0729        .23956        .31120E-03   -.90625    
   4  Prefactor     1.0501        .15814        .21163E-03   -.91079    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 8.14224e-10
Minuit parameter uncertainties:
  1  0.36389
  2  0.351332
  3  0.239801
  4  0.158215
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/61347': 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) = 6962.13530049
delta logL = 0.649830021528

Extracting fit parameters...

4FGL J2158.8-3013
   Spectrum: LogParabola
261         norm:  9.144e-01  3.639e-01  1.000e-04  1.000e+04 ( 1.000e-11)
262        alpha:  2.167e+00  3.513e-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:  1.050e+00  1.582e-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.073e+00  2.398e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 21.88
Ra Dec: 329.714 -30.225
Photon Index (Free Index): 2.17 +/- 0.35
Photon Flux (Free Index): 1.29e-07 +/- 6.80e-08
Energy Flux (Free Index): 6.08e-05 +/- 2.61e-05

Creating a high resolution counts map...
INFO: Auto-setting vmin to -2.500e-04 [aplpy.core]
INFO: Auto-setting vmax to  2.775e-03 [aplpy.core]
Saving /scratch/kocevski/61347/cmap_HighResolution_414288001_414547201_4FGL_J2158.8-3013_daily_bin675.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='7.65e-08', energy_flux2='6.08e-05', photon_flux_error='3.26e-08', dlogl='6.50e-01', energy_flux='8.67e-05', photon_flux2='1.29e-07', job_status='DONE', time_completed='2021-09-27 22:34:32.812980', photon_index_error2='0.35', photon_index2='2.17', ts='20.52', fit_tolerance='1e-08', GAL='1.03', photon_index_error='0.00', energy_flux_error2='2.61e-05', EG='1.13', time_epoch_completed='1632807272.81', return_code='0', job_id='61347', GAL2='1.05', EG2='1.07', return_code2='0', energy_flux_error='3.69e-05', photon_flux_error2='6.80e-08', ts2='21.88', photon_index='1.77' WHERE bin_id='675' AND source_name='4FGL J2158.8-3013' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Sep 27 22:34:32 PDT 2021


------------------------------------------------------------
Sender: LSF System <scs@bullet0016>
Subject: Job 61347: <4FGL_J2158.8-3013_daily_bin675> in cluster <slac> Done

Job <4FGL_J2158.8-3013_daily_bin675> was submitted from host <rhel6-64j> by user <kocevski> in cluster <slac> at Mon Sep 27 22:20:30 2021
Job was executed on host(s) <bullet0016>, in queue <medium>, as user <kocevski> in cluster <slac> at Mon Sep 27 22:21:23 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:21:23 2021
Terminated at Mon Sep 27 22:34:33 2021
Results reported at Mon Sep 27 22:34:33 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J2158.8-3013_daily_bin675 329.714 -30.2251 414288001 414547201 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 :                                   631.00 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             294.89 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   791 sec.
    Turnaround time :                            843 sec.

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

