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


Performing analysis on: 4FGL_J1158.5+4824_daily_bin298
RA = 179.637, Dec = 48.4161
tmin = 316569601, tmax = 316828801
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='195970', job_status='RUN', time_executed='2021-09-04 17:31:19.205068', time_epoch_executed='1630801879.21' WHERE source_name='4FGL J1158.5+4824' and cadence='daily' and bin_id='298'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/195970

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/195970/ft1_4FGL_J1158.5+4824_daily_bin298.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/195970/ft2_4FGL_J1158.5+4824_daily_bin298.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/195970/ft1_4FGL_J1158.5+4824_daily_bin298.fits outfile=/scratch/kocevski/195970/ft1_filteredMKT_4FGL_J1158.5+4824_daily_bin298.fits ra=179.637 dec=48.4161 rad=12.0 tmin=316569601.0 tmax=316828801.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.55
user 3.27
sys 0.19

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/195970/ft2_4FGL_J1158.5+4824_daily_bin298.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/195970/ft1_filteredMKT_4FGL_J1158.5+4824_daily_bin298.fits evtable="EVENTS" outfile="/scratch/kocevski/195970/ft1_filtered_4FGL_J1158.5+4824_daily_bin298.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/195970/ft1_filtered_4FGL_J1158.5+4824_daily_bin298.fits" evtable="EVENTS" scfile=/scratch/kocevski/195970/ft2_4FGL_J1158.5+4824_daily_bin298.fits sctable="SC_DATA" outfile=/scratch/kocevski/195970/ltcube_316569601_316828801_4FGL_J1158.5+4824_daily_bin298.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/195970/ft2_4FGL_J1158.5+4824_daily_bin298.fits
.....................!
real 12.24
user 11.72
sys 0.35

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/195970/ft1_filtered_4FGL_J1158.5+4824_daily_bin298.fits evtable="EVENTS" scfile=/scratch/kocevski/195970/ft2_4FGL_J1158.5+4824_daily_bin298.fits sctable="SC_DATA" expcube=/scratch/kocevski/195970/ltcube_316569601_316828801_4FGL_J1158.5+4824_daily_bin298.fits outfile=/scratch/kocevski/195970/expmap_316569601_316828801_4FGL_J1158.5+4824_daily_bin298.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/195970/ltcube_316569601_316828801_4FGL_J1158.5+4824_daily_bin298.fits
.....................!
real 189.40
user 184.64
sys 4.26

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/195970/ft1_filtered_4FGL_J1158.5+4824_daily_bin298.fits scfile=/scratch/kocevski/195970/ft2_4FGL_J1158.5+4824_daily_bin298.fits outfile=/scratch/kocevski/195970/cmap_316569601_316828801_4FGL_J1158.5+4824_daily_bin298.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.58
user 0.37
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/195970/ft1_filtered_4FGL_J1158.5+4824_daily_bin298.fits scfile=/scratch/kocevski/195970/ft2_4FGL_J1158.5+4824_daily_bin298.fits outfile=/scratch/kocevski/195970/cmap_HighResolution_316569601_316828801_4FGL_J1158.5+4824_daily_bin298.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/195970/ft1_filtered_4FGL_J1158.5+4824_daily_bin298.fits evtable="EVENTS" scfile=/scratch/kocevski/195970/ft2_4FGL_J1158.5+4824_daily_bin298.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/195970/Model_4FGL_J1158.5+4824_daily_bin298.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/195970/ft1_filtered_4FGL_J1158.5+4824_daily_bin298.fits.....................!
real 51.69
user 50.40
sys 1.13

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    32.736       1.0000         .10000E-03   10000.    
     5 'Prefactor '    10.664       1.0000         .10000E-03   10000.    
     6 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10005E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    4.9411       1.0000         .10000E-03   10000.    
     9 'norm      '    .10032E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    55.185       1.0000         .10000E-03   10000.    
    11 'norm      '    2.0265       1.0000         .10000E-03   10000.    
    12 'norm      '    .10021E-03   1.0000         .10000E-03   10000.    
    13 'Prefactor '    .13831       1.0000         .10000E-03   10000.    
    14 'Prefactor '    21.599       1.0000         .10000E-03   10000.    
    15 'norm      '    .48192E-03   1.0000         .10000E-03   10000.    
    16 'Prefactor '    12.544       1.0000         .10000E-03   10000.    
    17 'norm      '    .10025E-03   1.0000         .10000E-03   10000.    
    18 'norm      '    2.2497       1.0000         .10000E-03   10000.    
    19 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
    21 'Prefactor '    .10018E-03   1.0000         .10000E-03   10000.    
    22 'norm      '    2.6043       1.0000         .10000E-03   10000.    
    23 'Prefactor '    .10015E-03   1.0000         .10000E-03   10000.    
    24 'Normalizat'    .86584       1.0000         .10000E-01   10.000    
    25 'Prefactor '    1.3240       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=   6274.781     FROM MIGRAD    STATUS=CONVERGED    598 CALLS     2927 TOTAL
                     EDM=   .25E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .1%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    30.341        .48020E-05** at limit **
   2  Prefactor     .10000E-03    48.494        .41772E-05** at limit **
   3  Prefactor     .10000E-03    78.254        .34827E-05** at limit **
   4  Prefactor     32.732        45.590       -.54714E-05    .90712E-05
   5  Prefactor     10.652        52.960       -.23683E-04    .10075E-05
   6  norm          .10000E-03    40.267       -.16701E-04** at limit **
   7  Prefactor     .10000E-03    3.7269       -.11377E-06** at limit **
   8  Prefactor     4.9532        22.377       -.66704E-06   -.23869E-04
   9  norm          .10000E-03    1.4881        .19779E-06** at limit **
  10  Prefactor     55.156        53.453       -.27171E-04    .46445E-05
  11  norm          2.0267        1.4136        .31368E-05   -.18655E-03
  12  norm          .10000E-03    3.1099        .18335E-06** at limit **
  13  Prefactor     .12291        1.3531       -.40535E-06    .13386E-03
  14  Prefactor     21.557        51.045       -.59256E-04    .27988E-04
  15  norm          .10001E-03    3.1550       -.13281E-06** at limit **
  16  Prefactor     12.565        17.155       -.15896E-05    .69806E-04
  17  norm          .10000E-03    .98477       -.36140E-06** at limit **
  18  norm          2.2492        3.0197       -.18798E-06   -.43139E-04
  19  Prefactor     .10000E-03    6.2314       -.54530E-07** at limit **
  20  Prefactor     .10000E-03    2.3838       -.39452E-07** at limit **
  21  Prefactor     .10000E-03    11.967       -.46276E-06** at limit **
  22  norm          2.6038        2.1292       -.28981E-06   -.16954E-03
  23  Prefactor     .10000E-03    50.021        .83951E-05** at limit **
  24  Normalizat    .86589        .16263        .29064E-05    .14272E-03
  25  Prefactor     1.3241        .20267        .21717E-05    .14164E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 32.7316
  Prefactor  = 10.6519
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 4.95323
  norm       = 0.0001
  Prefactor  = 55.1561
  norm       = 2.02673
  norm       = 0.0001
  Prefactor  = 0.122906
  Prefactor  = 21.5572
  norm       = 0.000100009
  Prefactor  = 12.5654
  norm       = 0.0001
  norm       = 2.24916
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 2.60382
  Prefactor  = 0.0001
  Normalizat = 0.865894
  Prefactor  = 1.32415
 **********
 **   18 **HESSE 
 **********

 FCN=   6274.781     FROM HESSE     STATUS=OK           429 CALLS     3356 TOTAL
                     EDM=   .13E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    30.349        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    48.501        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     .10000E-03    78.296        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     32.732        45.605        .70034E-04   -1.4563    
   5  Prefactor     10.652        53.050        .12269E-03   -1.5055    
   6  norm          .10000E-03    40.398        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    3.7795        .14923E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     4.9532        22.241        .18093E-03   -1.5263    
   9  norm          .10000E-03    1.5190        .94308E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     55.156        53.365        .53997E-04   -1.4221    
  11  norm          2.0267        1.4045        .64690E-04   -1.5423    
  12  norm          .10000E-03    3.1113        .13643E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     .12291        10.546        .16985E-02   -1.5638    
  14  Prefactor     21.557        51.019        .86185E-04   -1.4779    
  15  norm          .10001E-03    12.956        .27153E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     12.565        17.522        .11310E-03   -1.4999    
  17  norm          .10000E-03    1.6075        .15120E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  norm          2.2492        3.0082        .15533E-03   -1.5408    
  19  Prefactor     .10000E-03    6.2399        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     .10000E-03    2.3971        .11943E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Prefactor     .10000E-03    12.010        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  norm          2.6038        2.1263        .10089E-03   -1.5385    
  23  Prefactor     .10000E-03    50.118        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Normalizat    .86589        .18948        .24851E-03   -.97669    
  25  Prefactor     1.3241        .24015        .26109E-03   -.82592    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.26419e-09
Minuit parameter uncertainties:
  1  6.58203e-06
  2  1.36545e-07
  3  3.05994e-05
  4  45.6539
  5  47.6102
  6  1.61721e-05
  7  2.13659e-05
  8  21.0049
  9  2.6059e-05
  10  53.4116
  11  1.40449
  12  3.20107e-05
  13  2.27653
  14  51.1227
  15  0.000701268
  16  17.5287
  17  4.57157e-05
  18  3.00843
  19  1.23133e-05
  20  9.18901e-06
  21  4.41159e-05
  22  2.12639
  23  0.000112525
  24  0.18963
  25  0.240352
Done.

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

Extracting fit parameters...

4FGL J1158.5+4824
   Spectrum: PowerLaw
349    Prefactor:  1.257e+01  1.753e+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.324e+00  2.404e-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.659e-01  1.896e-01  1.000e-02  1.000e+01 ( 1.000e+00)


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

Saving results to:
/scratch/kocevski/195970/likelihoodResults_316569601_316828801_4FGL_J1158.5+4824_daily_bin298.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) = 6274.15185273
delta logL = 0.628794980801

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 6273.95962633
delta logL = 0.821021384652

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    28.683       1.0000         .10000E-03   10000.    
     2 'Index     '    1.6663       1.0000          .0000       10.000    
     3 'Normalizat'    .87454       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.3105       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=   6273.960     FROM MIGRAD    STATUS=CONVERGED     83 CALLS      261 TOTAL
                     EDM=   .17E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     28.678        26.910        .74807E-04    .18693E-04
   2  Index         1.6664        .49370        .81301E-02    .15719E-04
   3  Normalizat    .87451        .18667        .24722E-03    .40619E-03
   4  Prefactor     1.3105        .23866        .26204E-03    .31826E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 28.678
  Index      = 1.66645
  Normalizat = 0.874512
  Prefactor  = 1.3105
 **********
 **   18 **HESSE 
 **********

 FCN=   6273.960     FROM HESSE     STATUS=OK            25 CALLS      286 TOTAL
                     EDM=   .17E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     28.678        27.310        .29923E-05   -1.4636    
   2  Index         1.6664        .50108        .32520E-03   -.72979    
   3  Normalizat    .87451        .18683        .49444E-04   -.97362    
   4  Prefactor     1.3105        .23892        .52407E-04   -.82995    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.73537e-10
Minuit parameter uncertainties:
  1  27.3218
  2  0.502604
  3  0.186971
  4  0.239117
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/195970': 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) = 6273.95962626
delta logL = 0.821021453778

Extracting fit parameters...

4FGL J1158.5+4824
   Spectrum: PowerLaw
349    Prefactor:  2.868e+01  2.732e+01  1.000e-04  1.000e+04 ( 1.000e-13)
350        Index:  1.666e+00  5.026e-01  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.311e+00  2.391e-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.745e-01  1.870e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 2.42
Ra Dec: 179.637 48.416
Photon Index (Free Index): 1.67 +/- 0.50
Photon Flux (Free Index): 1.80e-08 +/- 2.10e-08
Energy Flux (Free Index): 3.28e-05 +/- 4.10e-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/195970/cmap_HighResolution_316569601_316828801_4FGL_J1158.5+4824_daily_bin298.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='6.68e-03', comment='SUCCESS', energy_flux2='3.28e-05', dlogl='8.21e-01', photon_flux2='1.80e-08', job_status='DONE', time_completed='2021-09-04 17:44:17.346901', photon_index_error2='0.50', photon_index2='1.67', ts='0.77', fit_tolerance='1e-08', GAL='1.32', photon_index_error='0.00', photon_flux_upper_limit='8.62e-08', energy_flux_error2='4.10e-05', EG='0.87', time_epoch_completed='1630802657.35', return_code='0', job_id='195970', GAL2='1.31', EG2='0.87', return_code2='0', photon_flux_error2='2.10e-08', ts2='2.42', photon_index='2.44' WHERE bin_id='298' AND source_name='4FGL J1158.5+4824' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sat Sep  4 17:44:17 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0259>
Subject: Job 195970: <4FGL_J1158.5+4824_daily_bin298> in cluster <slac> Done

Job <4FGL_J1158.5+4824_daily_bin298> was submitted from host <rhel6-64p> by user <kocevski> in cluster <slac> at Sat Sep  4 17:31:05 2021
Job was executed on host(s) <bullet0259>, in queue <medium>, as user <kocevski> in cluster <slac> at Sat Sep  4 17:31:07 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:31:07 2021
Terminated at Sat Sep  4 17:44:18 2021
Results reported at Sat Sep  4 17:44:18 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1158.5+4824_daily_bin298 179.637 48.4161 316569601 316828801 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 :                                   776.00 sec.
    Max Memory :                                 1258 MB
    Average Memory :                             372.68 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   790 sec.
    Turnaround time :                            793 sec.

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

