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


Performing analysis on: 4FGL_J1158.5+4824_daily_bin1379
RA = 179.637, Dec = 48.4161
tmin = 596764801, tmax = 597024001
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='201541', job_status='RUN', time_executed='2021-09-04 17:46:52.266045', time_epoch_executed='1630802812.27' WHERE source_name='4FGL J1158.5+4824' and cadence='daily' and bin_id='1379'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/201541

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/201541/ft1_4FGL_J1158.5+4824_daily_bin1379.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/201541/ft2_4FGL_J1158.5+4824_daily_bin1379.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/201541/ft1_4FGL_J1158.5+4824_daily_bin1379.fits outfile=/scratch/kocevski/201541/ft1_filteredMKT_4FGL_J1158.5+4824_daily_bin1379.fits ra=179.637 dec=48.4161 rad=12.0 tmin=596764801.0 tmax=597024001.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.50
user 3.27
sys 0.21

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/201541/ft1_filtered_4FGL_J1158.5+4824_daily_bin1379.fits" evtable="EVENTS" scfile=/scratch/kocevski/201541/ft2_4FGL_J1158.5+4824_daily_bin1379.fits sctable="SC_DATA" outfile=/scratch/kocevski/201541/ltcube_596764801_597024001_4FGL_J1158.5+4824_daily_bin1379.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/201541/ft2_4FGL_J1158.5+4824_daily_bin1379.fits
.....................!
real 12.15
user 11.82
sys 0.30

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/201541/ft1_filtered_4FGL_J1158.5+4824_daily_bin1379.fits evtable="EVENTS" scfile=/scratch/kocevski/201541/ft2_4FGL_J1158.5+4824_daily_bin1379.fits sctable="SC_DATA" expcube=/scratch/kocevski/201541/ltcube_596764801_597024001_4FGL_J1158.5+4824_daily_bin1379.fits outfile=/scratch/kocevski/201541/expmap_596764801_597024001_4FGL_J1158.5+4824_daily_bin1379.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/201541/ltcube_596764801_597024001_4FGL_J1158.5+4824_daily_bin1379.fits
.....................!
real 190.10
user 185.20
sys 4.51

Generating the xml model:
radLim = 0.001
maxRad = 12
normsOnly = True
freeVariableSources = True
Fixing all sources to their catalog values, except variable sources
Creating file and adding sources from 4FGL
Added 213 point sources and 0 extended sources

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

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/201541/ft1_filtered_4FGL_J1158.5+4824_daily_bin1379.fits scfile=/scratch/kocevski/201541/ft2_4FGL_J1158.5+4824_daily_bin1379.fits outfile=/scratch/kocevski/201541/cmap_596764801_597024001_4FGL_J1158.5+4824_daily_bin1379.fits algorithm="CMAP" ebinalg="LOG" emin=30.0 emax=200000.0 ebinfile=NONE tbinalg="LIN" tbinfile=NONE nxpix=160 nypix=160 binsz=0.25 coordsys="CEL" xref=179.637 yref=48.4161 axisrot=0.0 rafield="RA" decfield="DEC" proj="AIT" hpx_ordering_scheme="RING" hpx_order=3 hpx_ebin=yes hpx_region="" evtable="EVENTS" sctable="SC_DATA" efield="ENERGY" tfield="TIME" chatter=2 clobber=yes debug=no gui=no mode="ql"

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

This is gtbin version HEAD
real 0.55
user 0.38
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/201541/ft1_filtered_4FGL_J1158.5+4824_daily_bin1379.fits scfile=/scratch/kocevski/201541/ft2_4FGL_J1158.5+4824_daily_bin1379.fits outfile=/scratch/kocevski/201541/cmap_HighResolution_596764801_597024001_4FGL_J1158.5+4824_daily_bin1379.fits algorithm="CMAP" ebinalg="LOG" emin=30.0 emax=200000.0 ebinfile=NONE tbinalg="LIN" tbinfile=NONE nxpix=500 nypix=500 binsz=0.1 coordsys="CEL" xref=179.637 yref=48.4161 axisrot=0.0 rafield="RA" decfield="DEC" proj="AIT" hpx_ordering_scheme="RING" hpx_order=3 hpx_ebin=yes hpx_region="" evtable="EVENTS" sctable="SC_DATA" efield="ENERGY" tfield="TIME" chatter=2 clobber=yes debug=no gui=no mode="ql"

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

This is gtbin version HEAD
real 0.55
user 0.38
sys 0.16

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

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/201541/ft1_filtered_4FGL_J1158.5+4824_daily_bin1379.fits', '/scratch/kocevski/201541/ft2_4FGL_J1158.5+4824_daily_bin1379.fits', expMap='/scratch/kocevski/201541/expmap_596764801_597024001_4FGL_J1158.5+4824_daily_bin1379.fits', expCube='/scratch/kocevski/201541/ltcube_596764801_597024001_4FGL_J1158.5+4824_daily_bin1379.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/201541/Model_4FGL_J1158.5+4824_daily_bin1379.xml', optimizer='MINUIT')

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

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


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/201541/ft1_filtered_4FGL_J1158.5+4824_daily_bin1379.fits
Spacecraft file(s): /scratch/kocevski/201541/ft2_4FGL_J1158.5+4824_daily_bin1379.fits
Exposure map: /scratch/kocevski/201541/expmap_596764801_597024001_4FGL_J1158.5+4824_daily_bin1379.fits
Exposure cube: /scratch/kocevski/201541/ltcube_596764801_597024001_4FGL_J1158.5+4824_daily_bin1379.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/201541/Model_4FGL_J1158.5+4824_daily_bin1379.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) = 6715.92320728

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10218E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10011E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     6 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    7.1196       1.0000         .10000E-03   10000.    
     8 'Prefactor '    .10025E-03   1.0000         .10000E-03   10000.    
     9 'norm      '    23.271       1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10008E-03   1.0000         .10000E-03   10000.    
    11 'norm      '    1.8135       1.0000         .10000E-03   10000.    
    12 'norm      '    8.0099       1.0000         .10000E-03   10000.    
    13 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    15 'norm      '    7.4699       1.0000         .10000E-03   10000.    
    16 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
    18 'norm      '    .41981E-03   1.0000         .10000E-03   10000.    
    19 'Prefactor '    6.6262       1.0000         .10000E-03   10000.    
    20 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    21 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    22 'norm      '    2.8532       1.0000         .10000E-03   10000.    
    23 'Prefactor '    .10011E-03   1.0000         .10000E-03   10000.    
    24 'Normalizat'    .81143       1.0000         .10000E-01   10.000    
    25 'Prefactor '    1.0502       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6830E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   6715.798     FROM MIGRAD    STATUS=CONVERGED    582 CALLS     2453 TOTAL
                     EDM=   .14E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .8%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    25.720        .62497E-05** at limit **
   2  Prefactor     .10000E-03    39.236       -.18213E-04** at limit **
   3  Prefactor     .10000E-03    64.968        .15095E-04** at limit **
   4  Prefactor     .10000E-03    22.486       -.47528E-05** at limit **
   5  Prefactor     .10000E-03    23.811       -.76401E-06** at limit **
   6  norm          .10000E-03    12.344       -.21723E-06** at limit **
   7  Prefactor     7.1205        6.8296       -.14264E-06   -.32586E-03
   8  Prefactor     .10000E-03    29.960        .10472E-04** at limit **
   9  norm          23.271        4.3534        .18233E-07    .34079E-04
  10  Prefactor     .10000E-03    20.708       -.26442E-05** at limit **
  11  norm          1.8136        .94954       -.22860E-07   -.31934E-03
  12  norm          8.0099        6.2184        .88088E-06    .62905E-04
  13  Prefactor     .10000E-03    .97579       -.25420E-07** at limit **
  14  Prefactor     .10000E-03    20.344       -.26250E-06** at limit **
  15  norm          7.4704        5.7218        .12229E-06   -.17750E-03
  16  Prefactor     .10000E-03    5.1430       -.40127E-07** at limit **
  17  norm          .10000E-03    .56409        .37417E-08** at limit **
  18  norm          .10032E-03    5.0450        .31368E-05** at limit **
  19  Prefactor     6.6205        18.680       -.28332E-05   -.72434E-03
  20  Prefactor     .10000E-03    2.4847       -.31450E-07** at limit **
  21  Prefactor     .10000E-03    9.8131        .71472E-07** at limit **
  22  norm          2.8532        1.8491       -.20790E-07   -.38143E-03
  23  Prefactor     .10000E-03    141.77       -.12345E-04** at limit **
  24  Normalizat    .81135        .14161       -.18262E-06   -.69635E-03
  25  Prefactor     1.0503        .17380       -.20569E-06   -.53257E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 7.1205
  Prefactor  = 0.0001
  norm       = 23.271
  Prefactor  = 0.0001
  norm       = 1.81359
  norm       = 8.0099
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 7.47042
  Prefactor  = 0.0001
  norm       = 0.0001
  norm       = 0.000100321
  Prefactor  = 6.62052
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 2.8532
  Prefactor  = 0.0001
  Normalizat = 0.811349
  Prefactor  = 1.05027
 **********
 **   18 **HESSE 
 **********

 FCN=   6715.798     FROM HESSE     STATUS=OK           417 CALLS     2870 TOTAL
                     EDM=   .15E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    25.695        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    38.874        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     .10000E-03    64.791        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10000E-03    22.480        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .10000E-03    23.816        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  norm          .10000E-03    12.344        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     7.1205        6.8356        .15034E-03   -1.5174    
   8  Prefactor     .10000E-03    30.019        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  norm          23.271        4.3521        .71284E-04   -1.4743    
  10  Prefactor     .10000E-03    20.728        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  norm          1.8136        .94232        .55206E-04   -1.5439    
  12  norm          8.0099        6.2255        .14167E-03   -1.5142    
  13  Prefactor     .10000E-03    .98485        .79012E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     .10000E-03    20.357        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          7.4704        5.7191        .14674E-03   -1.5161    
  16  Prefactor     .10000E-03    5.1471        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          .10000E-03    .57109        .60062E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  norm          .10032E-03    22.938        .29824E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     6.6205        16.853        .15589E-03   -1.5193    
  20  Prefactor     .10000E-03    2.5020        .12614E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Prefactor     .10000E-03    9.8497        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  norm          2.8532        1.8464        .87008E-04   -1.5370    
  23  Prefactor     .10000E-03    142.56        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Normalizat    .81135        .16688        .23187E-03   -.99649    
  25  Prefactor     1.0503        .20487        .25977E-03   -.91072    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.52792e-08
Minuit parameter uncertainties:
  1  4.5621e-07
  2  2.92259e-06
  3  5.93438e-06
  4  7.34307e-06
  5  1.65249e-06
  6  3.43313e-07
  7  6.83639
  8  2.69724e-05
  9  4.35216
  10  4.61173e-06
  11  0.942325
  12  6.22596
  13  7.86321e-07
  14  3.50686e-07
  15  5.71953
  16  2.08351e-06
  17  3.59363e-07
  18  0.00542652
  19  16.8649
  20  4.12624e-07
  21  2.61481e-06
  22  1.84643
  23  0.000172233
  24  0.166988
  25  0.205023
Done.

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

Extracting fit parameters...

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

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

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


TS (Fixed Index): -0.00
Ra Dec: 179.637 48.416
Photon Flux Upper Limit: 4.38e-08 ph cm-2 s-1
Energy Flux Upper Limit: 3.39e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/201541/likelihoodResults_596764801_597024001_4FGL_J1158.5+4824_daily_bin1379.txt

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): 102
logL (Free Index) = 6715.79862501
delta logL = -0.000923529842112

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 6715.79770136
delta logL = 1.23252902995e-07

Fit tolerance = 1e-08

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

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

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   6715.798     FROM MIGRAD    STATUS=CONVERGED    105 CALLS      257 TOTAL
                     EDM=   .62E-09    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    23.735        .18142E-01** at limit **
   2  Index         1.8421        5.3069        .50000        .50413E-06
   3  Normalizat    .81135        .66430E-02    .23187E-03    .76684E-04
   4  Prefactor     1.0503        .84067E-02    .25977E-03    .10236E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Index      = 1.84207
  Normalizat = 0.81135
  Prefactor  = 1.05027
 **********
 **   18 **HESSE 
 **********

 FCN=   6715.798     FROM HESSE     STATUS=NOT POSDEF    29 CALLS      286 TOTAL
                     EDM=   .67E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    255.70        .20685E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         1.8421        7.3245        .50000       -.68360    
   3  Normalizat    .81135        .22749E-01    .92747E-05   -.99649    
   4  Prefactor     1.0503        .28789E-01    .10391E-04   -.91072    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 6.69358e-09
Minuit parameter uncertainties:
  1  0.000577738
  2  960.623
  3  0.0227493
  4  0.0287891
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/201541': 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): 102
logL (Free Index) = 6715.79769924
delta logL = 2.23654024012e-06

Extracting fit parameters...

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

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

EG_v02
   Spectrum: FileFunction
679   Normalization:  8.114e-01  2.275e-02  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): -0.00
Ra Dec: 179.637 48.416

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/201541/cmap_HighResolution_596764801_597024001_4FGL_J1158.5+4824_daily_bin1379.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='3.39e-03', job_status='DONE', photon_flux_upper_limit='4.38e-08', time_completed='2021-09-04 17:59:51.064927', job_id='201541', GAL2='1.05', fit_tolerance='1e-08', EG2='0.81', EG='0.81', time_epoch_completed='1630803591.06', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='1.05', dlogl='2.24e-06', ts2='-0.00', photon_index_error='0.00', photon_index='2.44' WHERE bin_id='1379' AND source_name='4FGL J1158.5+4824' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sat Sep  4 17:59:51 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0239>
Subject: Job 201541: <4FGL_J1158.5+4824_daily_bin1379> in cluster <slac> Done

Job <4FGL_J1158.5+4824_daily_bin1379> was submitted from host <rhel6-64d> by user <kocevski> in cluster <slac> at Sat Sep  4 17:46:39 2021
Job was executed on host(s) <bullet0239>, in queue <medium>, as user <kocevski> in cluster <slac> at Sat Sep  4 17:46:41 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Sat Sep  4 17:46:41 2021
Terminated at Sat Sep  4 17:59:51 2021
Results reported at Sat Sep  4 17:59:51 2021

Your job looked like:

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

Successfully completed.

Resource usage summary:

    CPU time :                                   774.33 sec.
    Max Memory :                                 1257 MB
    Average Memory :                             303.16 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   790 sec.
    Turnaround time :                            792 sec.

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

