/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 124 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 = 7403
number of fields = 22
No RA_SUN column yet. Adding RA_SUN/DEC_SUN columns.
Done.


Performing analysis on: 4FGL_J1158.5+4824_daily_bin12
RA = 179.637, Dec = 48.4161
tmin = 242438401, tmax = 242697601
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='194929', job_status='RUN', time_executed='2021-09-04 17:28:31.367838', time_epoch_executed='1630801711.37' WHERE source_name='4FGL J1158.5+4824' and cadence='daily' and bin_id='12'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/194929

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/194929/ft1_4FGL_J1158.5+4824_daily_bin12.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/194929/ft2_4FGL_J1158.5+4824_daily_bin12.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/194929/ft1_4FGL_J1158.5+4824_daily_bin12.fits outfile=/scratch/kocevski/194929/ft1_filteredMKT_4FGL_J1158.5+4824_daily_bin12.fits ra=179.637 dec=48.4161 rad=12.0 tmin=242438401.0 tmax=242697601.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 1.45
user 1.26
sys 0.18

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/194929/ft1_filtered_4FGL_J1158.5+4824_daily_bin12.fits" evtable="EVENTS" scfile=/scratch/kocevski/194929/ft2_4FGL_J1158.5+4824_daily_bin12.fits sctable="SC_DATA" outfile=/scratch/kocevski/194929/ltcube_242438401_242697601_4FGL_J1158.5+4824_daily_bin12.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/194929/ft2_4FGL_J1158.5+4824_daily_bin12.fits
.....................!
real 14.13
user 13.79
sys 0.29

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/194929/ft1_filtered_4FGL_J1158.5+4824_daily_bin12.fits evtable="EVENTS" scfile=/scratch/kocevski/194929/ft2_4FGL_J1158.5+4824_daily_bin12.fits sctable="SC_DATA" expcube=/scratch/kocevski/194929/ltcube_242438401_242697601_4FGL_J1158.5+4824_daily_bin12.fits outfile=/scratch/kocevski/194929/expmap_242438401_242697601_4FGL_J1158.5+4824_daily_bin12.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/194929/ltcube_242438401_242697601_4FGL_J1158.5+4824_daily_bin12.fits
.....................!
real 194.61
user 188.96
sys 5.16

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/194929/ft1_filtered_4FGL_J1158.5+4824_daily_bin12.fits scfile=/scratch/kocevski/194929/ft2_4FGL_J1158.5+4824_daily_bin12.fits outfile=/scratch/kocevski/194929/cmap_242438401_242697601_4FGL_J1158.5+4824_daily_bin12.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.39
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/194929/ft1_filtered_4FGL_J1158.5+4824_daily_bin12.fits scfile=/scratch/kocevski/194929/ft2_4FGL_J1158.5+4824_daily_bin12.fits outfile=/scratch/kocevski/194929/cmap_HighResolution_242438401_242697601_4FGL_J1158.5+4824_daily_bin12.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.56
user 0.39
sys 0.15

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

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/194929/ft1_filtered_4FGL_J1158.5+4824_daily_bin12.fits', '/scratch/kocevski/194929/ft2_4FGL_J1158.5+4824_daily_bin12.fits', expMap='/scratch/kocevski/194929/expmap_242438401_242697601_4FGL_J1158.5+4824_daily_bin12.fits', expCube='/scratch/kocevski/194929/ltcube_242438401_242697601_4FGL_J1158.5+4824_daily_bin12.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/194929/Model_4FGL_J1158.5+4824_daily_bin12.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/194929/ft1_filtered_4FGL_J1158.5+4824_daily_bin12.fits
Spacecraft file(s): /scratch/kocevski/194929/ft2_4FGL_J1158.5+4824_daily_bin12.fits
Exposure map: /scratch/kocevski/194929/expmap_242438401_242697601_4FGL_J1158.5+4824_daily_bin12.fits
Exposure cube: /scratch/kocevski/194929/ltcube_242438401_242697601_4FGL_J1158.5+4824_daily_bin12.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/194929/Model_4FGL_J1158.5+4824_daily_bin12.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) = 7857.76397558

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10035E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10027E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10011E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10019E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    99.736       1.0000         .10000E-03   10000.    
     6 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     9 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    10.826       1.0000         .10000E-03   10000.    
    11 'norm      '    1.9284       1.0000         .10000E-03   10000.    
    12 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    13 'Prefactor '    2.7543       1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    15 'norm      '    3.2739       1.0000         .10000E-03   10000.    
    16 'Prefactor '    14.660       1.0000         .10000E-03   10000.    
    17 'norm      '    2.0088       1.0000         .10000E-03   10000.    
    18 'norm      '    7.0211       1.0000         .10000E-03   10000.    
    19 'Prefactor '    .55278E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    21 'Prefactor '    .10017E-03   1.0000         .10000E-03   10000.    
    22 'norm      '    3.2038       1.0000         .10000E-03   10000.    
    23 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    24 'Normalizat'    1.0975       1.0000         .10000E-01   10.000    
    25 'Prefactor '    1.1164       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=   7857.730     FROM MIGRAD    STATUS=CONVERGED    563 CALLS     2475 TOTAL
                     EDM=   .86E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY= 14.4%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    27.114        .14820E-05** at limit **
   2  Prefactor     .10000E-03    43.994        .55133E-05** at limit **
   3  Prefactor     .10000E-03    55.954       -.57384E-05** at limit **
   4  Prefactor     .10000E-03    26.102        .25637E-06** at limit **
   5  Prefactor     99.777        68.511        .46456E-05    .12969E-04
   6  norm          .10000E-03    16.024        .19950E-05** at limit **
   7  Prefactor     .10000E-03    2.1776       -.17832E-07** at limit **
   8  Prefactor     .10000E-03    19.030       -.21026E-05** at limit **
   9  norm          .10000E-03    .44966        .10650E-06** at limit **
  10  Prefactor     10.822        46.181       -.11701E-05    .15667E-04
  11  norm          1.9284        1.1618        .15449E-07    .29566E-03
  12  norm          .10000E-03    2.6055        .67049E-07** at limit **
  13  Prefactor     2.7541        2.7720       -.11991E-07    .12954E-03
  14  Prefactor     .10000E-03    13.099       -.44479E-06** at limit **
  15  norm          3.2740        6.9108       -.60237E-05    .56213E-04
  16  Prefactor     14.659        21.811       -.49473E-06    .57981E-04
  17  norm          2.0088        1.6842        .19155E-08    .11585E-03
  18  norm          7.0198        8.8022       -.66615E-06    .85781E-03
  19  Prefactor     .10000E-03    276.40       -.16558E-03** at limit **
  20  Prefactor     .10000E-03    2.5313        .55070E-07** at limit **
  21  Prefactor     .10000E-03    16.775        .42172E-06** at limit **
  22  norm          3.2038        1.9080       -.58502E-07    .37737E-05
  23  Prefactor     .10000E-03    21.708       -.26766E-05** at limit **
  24  Normalizat    1.0975        .15577       -.75997E-06    .32007E-03
  25  Prefactor     1.1164        .18452        .18715E-05    .61534E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 99.777
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 10.8223
  norm       = 1.92843
  norm       = 0.0001
  Prefactor  = 2.75411
  Prefactor  = 0.0001
  norm       = 3.27404
  Prefactor  = 14.6592
  norm       = 2.00881
  norm       = 7.01977
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 3.20382
  Prefactor  = 0.0001
  Normalizat = 1.09752
  Prefactor  = 1.1164
 **********
 **   18 **HESSE 
 **********

 FCN=   7857.730     FROM HESSE     STATUS=OK           429 CALLS     2904 TOTAL
                     EDM=   .15E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    27.115        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    44.006        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     .10000E-03    55.996        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10000E-03    26.134        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     99.777        68.496        .20127E-03   -1.3707    
   6  norm          .10000E-03    16.025        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    2.1869        .12773E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     .10000E-03    19.076        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  norm          .10000E-03    .45038        .58027E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     10.822        46.500        .12177E-03   -1.5050    
  11  norm          1.9284        1.1564        .60956E-04   -1.5430    
  12  norm          .10000E-03    2.6103        .13974E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     2.7541        2.7492        .13043E-03   -1.5376    
  14  Prefactor     .10000E-03    13.102        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          3.2740        6.9128        .11190E-02   -1.5346    
  16  Prefactor     14.659        21.635        .10461E-03   -1.4942    
  17  norm          2.0088        1.6756        .10122E-03   -1.5424    
  18  norm          7.0198        8.8246        .15140E-03   -1.5178    
  19  Prefactor     .10000E-03    26.782        .93277E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     .10000E-03    2.5575        .13772E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Prefactor     .10000E-03    16.969        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  norm          3.2038        1.9058        .91763E-04   -1.5350    
  23  Prefactor     .10000E-03    21.714        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Normalizat    1.0975        .18182        .23482E-03   -.89831    
  25  Prefactor     1.1164        .21539        .28723E-03   -.88944    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.52322e-09
Minuit parameter uncertainties:
  1  6.93189e-05
  2  9.76028e-05
  3  7.94231e-05
  4  0.000172241
  5  68.5503
  6  4.03726e-05
  7  4.2786e-06
  8  6.89815e-05
  9  4.93633e-06
  10  44.9252
  11  1.15638
  12  7.7549e-06
  13  2.74933
  14  8.73003e-06
  15  6.91447
  16  21.6462
  17  1.6756
  18  8.82624
  19  8.11564e-06
  20  7.93861e-06
  21  1.6231e-05
  22  1.90587
  23  1.30819e-05
  24  0.181926
  25  0.215556
Done.

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

Extracting fit parameters...

4FGL J1158.5+4824
   Spectrum: PowerLaw
349    Prefactor:  1.466e+01  2.165e+01  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.116e+00  2.156e-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:  1.098e+00  1.819e-01  1.000e-02  1.000e+01 ( 1.000e+00)


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

Saving results to:
/scratch/kocevski/194929/likelihoodResults_242438401_242697601_4FGL_J1158.5+4824_daily_bin12.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): 0
logL (Free Index) = 7857.41402465
delta logL = 0.316423163588

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 7857.36345967
delta logL = 0.366988143061

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    2.7397       1.0000         .10000E-03   10000.    
     2 'Index     '    3.8024       1.0000          .0000       10.000    
     3 'Normalizat'    1.0598       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.1510       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.

 FCN=   7857.363     FROM MIGRAD    STATUS=CONVERGED     59 CALLS      265 TOTAL
                     EDM=   .22E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     2.7229        55.962        .61495E-02    .72281E-03
   2  Index         3.8071        3.4865        .11902        .19390E-03
   3  Normalizat    1.0602        .45307E-01    .39942E-01    .46578E-04
   4  Prefactor     1.1505        .54754E-01    .64086E-01    .72246E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 2.72289
  Index      = 3.80705
  Normalizat = 1.06019
  Prefactor  = 1.1505
 **********
 **   18 **HESSE 
 **********

 FCN=   7857.363     FROM HESSE     STATUS=NOT POSDEF    33 CALLS      298 TOTAL
                     EDM=   .12E-05    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     2.7229        111.54        .12842E-03   -1.5378    
   2  Index         3.8071        6.8943        .68608E-02   -.24091    
   3  Normalizat    1.0602        .15451        .23828E-03   -.91040    
   4  Prefactor     1.1505        .19168        .28347E-03   -.87868    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 1.23119e-06
Minuit parameter uncertainties:
  1  34.9237
  2  6.87364
  3  0.154573
  4  0.191797
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/194929': 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) = 7857.3634495
delta logL = 0.366998318542

Extracting fit parameters...

4FGL J1158.5+4824
   Spectrum: PowerLaw
349    Prefactor:  2.723e+00  3.492e+01  1.000e-04  1.000e+04 ( 1.000e-13)
350        Index:  3.807e+00  6.874e+00  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.151e+00  1.918e-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:  1.060e+00  1.546e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 1.42
Ra Dec: 179.637 48.416
Photon Index (Free Index): 3.81 +/- 6.87
Photon Flux (Free Index): 5.06e-08 +/- 4.68e-08
Energy Flux (Free Index): 7.85e-06 +/- 1.15e-05

Creating a high resolution counts map...
INFO: Auto-setting vmin to -1.000e-01 [aplpy.core]
INFO: Auto-setting vmax to  1.110e+00 [aplpy.core]
Saving /scratch/kocevski/194929/cmap_HighResolution_242438401_242697601_4FGL_J1158.5+4824_daily_bin12.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='7.36e-03', comment='SUCCESS', energy_flux2='7.85e-06', dlogl='3.67e-01', photon_flux2='5.06e-08', job_status='DONE', time_completed='2021-09-04 17:42:45.655856', photon_index_error2='6.87', photon_index2='3.81', ts='0.64', fit_tolerance='1e-08', GAL='1.12', photon_index_error='0.00', photon_flux_upper_limit='9.50e-08', energy_flux_error2='1.15e-05', EG='1.10', time_epoch_completed='1630802565.66', return_code='0', job_id='194929', GAL2='1.15', EG2='1.06', return_code2='102', photon_flux_error2='4.68e-08', ts2='1.42', photon_index='2.44' WHERE bin_id='12' AND source_name='4FGL J1158.5+4824' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sat Sep  4 17:42:45 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0036>
Subject: Job 194929: <4FGL_J1158.5+4824_daily_bin12> in cluster <slac> Done

Job <4FGL_J1158.5+4824_daily_bin12> was submitted from host <rhel6-64p> by user <kocevski> in cluster <slac> at Sat Sep  4 17:26:14 2021
Job was executed on host(s) <bullet0036>, in queue <medium>, as user <kocevski> in cluster <slac> at Sat Sep  4 17:26:17 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:26:17 2021
Terminated at Sat Sep  4 17:42:46 2021
Results reported at Sat Sep  4 17:42:46 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1158.5+4824_daily_bin12 179.637 48.4161 242438401 242697601 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 :                                   852.00 sec.
    Max Memory :                                 1024 MB
    Average Memory :                             301.97 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   988 sec.
    Turnaround time :                            992 sec.

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

