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


Performing analysis on: 4FGL_J1158.5+4824_daily_bin58
RA = 179.637, Dec = 48.4161
tmin = 254361601, tmax = 254620801
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='194975', job_status='RUN', time_executed='2021-09-04 17:30:01.712033', time_epoch_executed='1630801801.71' WHERE source_name='4FGL J1158.5+4824' and cadence='daily' and bin_id='58'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/194975

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/194975/ft1_4FGL_J1158.5+4824_daily_bin58.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/194975/ft2_4FGL_J1158.5+4824_daily_bin58.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/194975/ft1_4FGL_J1158.5+4824_daily_bin58.fits outfile=/scratch/kocevski/194975/ft1_filteredMKT_4FGL_J1158.5+4824_daily_bin58.fits ra=179.637 dec=48.4161 rad=12.0 tmin=254361601.0 tmax=254620801.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.44
user 1.22
sys 0.18

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/194975/ft1_filtered_4FGL_J1158.5+4824_daily_bin58.fits" evtable="EVENTS" scfile=/scratch/kocevski/194975/ft2_4FGL_J1158.5+4824_daily_bin58.fits sctable="SC_DATA" outfile=/scratch/kocevski/194975/ltcube_254361601_254620801_4FGL_J1158.5+4824_daily_bin58.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/194975/ft2_4FGL_J1158.5+4824_daily_bin58.fits
.....................!
real 13.03
user 12.67
sys 0.31

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/194975/ft1_filtered_4FGL_J1158.5+4824_daily_bin58.fits evtable="EVENTS" scfile=/scratch/kocevski/194975/ft2_4FGL_J1158.5+4824_daily_bin58.fits sctable="SC_DATA" expcube=/scratch/kocevski/194975/ltcube_254361601_254620801_4FGL_J1158.5+4824_daily_bin58.fits outfile=/scratch/kocevski/194975/expmap_254361601_254620801_4FGL_J1158.5+4824_daily_bin58.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/194975/ltcube_254361601_254620801_4FGL_J1158.5+4824_daily_bin58.fits
.....................!
real 190.09
user 185.09
sys 4.57

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/194975/ft1_filtered_4FGL_J1158.5+4824_daily_bin58.fits scfile=/scratch/kocevski/194975/ft2_4FGL_J1158.5+4824_daily_bin58.fits outfile=/scratch/kocevski/194975/cmap_254361601_254620801_4FGL_J1158.5+4824_daily_bin58.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.61
user 0.36
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/194975/ft1_filtered_4FGL_J1158.5+4824_daily_bin58.fits scfile=/scratch/kocevski/194975/ft2_4FGL_J1158.5+4824_daily_bin58.fits outfile=/scratch/kocevski/194975/cmap_HighResolution_254361601_254620801_4FGL_J1158.5+4824_daily_bin58.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.37
sys 0.15

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    120.05       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    46.490       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10024E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    46.671       1.0000         .10000E-03   10000.    
     6 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    4.4288       1.0000         .10000E-03   10000.    
     9 'norm      '    1.5961       1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10014E-03   1.0000         .10000E-03   10000.    
    11 'norm      '    1.5052       1.0000         .10000E-03   10000.    
    12 'norm      '    16.714       1.0000         .10000E-03   10000.    
    13 'Prefactor '    .14799E-02   1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10004E-03   1.0000         .10000E-03   10000.    
    15 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
    16 'Prefactor '    9.1497       1.0000         .10000E-03   10000.    
    17 'norm      '    5.6908       1.0000         .10000E-03   10000.    
    18 'norm      '    .10027E-03   1.0000         .10000E-03   10000.    
    19 'Prefactor '    32.291       1.0000         .10000E-03   10000.    
    20 'Prefactor '    .10009E-03   1.0000         .10000E-03   10000.    
    21 'Prefactor '    .10012E-03   1.0000         .10000E-03   10000.    
    22 'norm      '    1.2716       1.0000         .10000E-03   10000.    
    23 'Prefactor '    26.454       1.0000         .10000E-03   10000.    
    24 'Normalizat'    1.3170       1.0000         .10000E-01   10.000    
    25 'Prefactor '    .63436       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=   5194.621     FROM MIGRAD    STATUS=CONVERGED    568 CALLS     2967 TOTAL
                     EDM=   .66E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .1%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     120.00        115.41       -.47865E-04    .14784E-04
   2  Prefactor     .10000E-03    70.773       -.11149E-04** at limit **
   3  Prefactor     46.365        109.43       -.17265E-03    .10162E-04
   4  Prefactor     .10000E-03    24.897       -.26815E-04** at limit **
   5  Prefactor     46.668        64.161       -.40841E-05    .77162E-06
   6  norm          .10000E-03    42.811        .34633E-04** at limit **
   7  Prefactor     .10000E-03    2.4930       -.27559E-07** at limit **
   8  Prefactor     4.4290        42.730       -.31783E-05   -.21600E-04
   9  norm          1.5962        3.5528       -.18210E-05   -.73280E-03
  10  Prefactor     .10000E-03    23.787       -.17336E-04** at limit **
  11  norm          1.5050        1.0106       -.27422E-06    .14063E-03
  12  norm          16.713        11.362       -.68904E-06   -.45484E-04
  13  Prefactor     .10001E-03    1.9316       -.74621E-06** at limit **
  14  Prefactor     .10000E-03    20.911        .27449E-04** at limit **
  15  norm          .10000E-03    2.0658        .13440E-06** at limit **
  16  Prefactor     9.1673        16.581       -.40503E-05    .12699E-03
  17  norm          5.6909        2.8727       -.87496E-06    .11533E-03
  18  norm          .10000E-03    3.2842       -.26842E-07** at limit **
  19  Prefactor     32.291        22.507       -.13484E-05    .88720E-04
  20  Prefactor     .10000E-03    4.9291       -.45965E-06** at limit **
  21  Prefactor     .10000E-03    11.186       -.15741E-05** at limit **
  22  norm          1.2715        1.2876       -.26655E-06    .52931E-04
  23  Prefactor     26.373        43.511       -.10226E-03    .15302E-04
  24  Normalizat    1.3169        .18361        .57612E-05    .13911E-03
  25  Prefactor     .63448        .21515        .95695E-05    .32331E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 119.996
  Prefactor  = 0.0001
  Prefactor  = 46.3649
  Prefactor  = 0.0001
  Prefactor  = 46.6681
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 4.429
  norm       = 1.59616
  Prefactor  = 0.0001
  norm       = 1.50501
  norm       = 16.7125
  Prefactor  = 0.000100006
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 9.1673
  norm       = 5.69086
  norm       = 0.0001
  Prefactor  = 32.2915
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 1.27149
  Prefactor  = 26.3727
  Normalizat = 1.31694
  Prefactor  = 0.634479
 **********
 **   18 **HESSE 
 **********

 FCN=   5194.621     FROM HESSE     STATUS=OK           423 CALLS     3390 TOTAL
                     EDM=   .19E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     120.00        115.42        .18364E-03   -1.3513    
   2  Prefactor     .10000E-03    70.777        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     46.365        109.57        .29403E-03   -1.4345    
   4  Prefactor     .10000E-03    24.906        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     46.668        64.160        .58692E-04   -1.4341    
   6  norm          .10000E-03    42.914        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    2.4983        .11112E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     4.4290        42.738        .19135E-03   -1.5287    
   9  norm          1.5962        3.5360        .19036E-03   -1.5455    
  10  Prefactor     .10000E-03    23.807        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  norm          1.5050        1.0038        .56226E-04   -1.5463    
  12  norm          16.713        11.359        .97967E-04   -1.4890    
  13  Prefactor     .10001E-03    9.2487        .18804E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     .10000E-03    20.925        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          .10000E-03    2.0700        .10116E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     9.1673        16.231        .13250E-03   -1.5102    
  17  norm          5.6909        2.8743        .82294E-04   -1.5231    
  18  norm          .10000E-03    3.2950        .12748E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     32.291        22.578        .70514E-04   -1.4571    
  20  Prefactor     .10000E-03    4.9979        .15625E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Prefactor     .10000E-03    11.209        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  norm          1.2715        1.2937        .80170E-04   -1.5482    
  23  Prefactor     26.373        43.532        .77887E-04   -1.4680    
  24  Normalizat    1.3169        .21339        .20723E-03   -.83062    
  25  Prefactor     .63448        .24779        .34358E-03   -1.0615    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.85004e-09
Minuit parameter uncertainties:
  1  115.636
  2  3.90614e-05
  3  110.054
  4  1.22644e-05
  5  64.255
  6  0.00015759
  7  1.55463e-05
  8  27.5418
  9  3.5365
  10  9.40754e-06
  11  1.00379
  12  11.3602
  13  0.00046425
  14  4.59785e-05
  15  8.82025e-06
  16  16.2389
  17  2.87439
  18  2.10489e-05
  19  22.5839
  20  6.6913e-05
  21  2.54762e-06
  22  1.29369
  23  43.5848
  24  0.21353
  25  0.248221
Done.

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

Extracting fit parameters...

4FGL J1158.5+4824
   Spectrum: PowerLaw
349    Prefactor:  9.167e+00  1.624e+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:  6.345e-01  2.482e-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.317e+00  2.135e-01  1.000e-02  1.000e+01 ( 1.000e+00)


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

Saving results to:
/scratch/kocevski/194975/likelihoodResults_254361601_254620801_4FGL_J1158.5+4824_daily_bin58.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) = 5194.61189558
delta logL = 0.00927843774571

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 5194.60805873
delta logL = 0.0131152878112

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    10.834       1.0000         .10000E-03   10000.    
     2 'Index     '    2.2247       1.0000          .0000       10.000    
     3 'Normalizat'    1.3212       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .63049       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=   5194.608     FROM MIGRAD    STATUS=CONVERGED    103 CALLS      293 TOTAL
                     EDM=   .78E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     10.826        20.965        .12172E-03   -.74720E-06
   2  Index         2.2238        1.3027        .14068E-01    .87847E-04
   3  Normalizat    1.3209        .20754        .20696E-03    .42791E-04
   4  Prefactor     .63082        .24759        .34450E-03   -.24024E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 10.8261
  Index      = 2.22384
  Normalizat = 1.3209
  Prefactor  = 0.630822
 **********
 **   18 **HESSE 
 **********

 FCN=   5194.608     FROM HESSE     STATUS=OK            25 CALLS      318 TOTAL
                     EDM=   .25E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     10.826        20.433        .48688E-05   -1.5050    
   2  Index         2.2238        1.2708        .28135E-02   -.58864    
   3  Normalizat    1.3209        .20751        .41393E-04   -.82945    
   4  Prefactor     .63082        .24759        .13780E-04   -1.0630    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.46643e-11
Minuit parameter uncertainties:
  1  20.4459
  2  1.2915
  3  0.207637
  4  0.248016
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/194975': 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) = 5194.60805712
delta logL = 0.0131168932821

Extracting fit parameters...

4FGL J1158.5+4824
   Spectrum: PowerLaw
349    Prefactor:  1.083e+01  2.045e+01  1.000e-04  1.000e+04 ( 1.000e-13)
350        Index:  2.224e+00  1.291e+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:  6.308e-01  2.480e-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.321e+00  2.076e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 0.46
Ra Dec: 179.637 48.416

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/194975/cmap_HighResolution_254361601_254620801_4FGL_J1158.5+4824_daily_bin58.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='7.13e-03', job_status='DONE', photon_flux_upper_limit='9.20e-08', time_completed='2021-09-04 17:41:50.338686', job_id='194975', GAL2='0.63', fit_tolerance='1e-08', EG2='1.32', EG='1.32', time_epoch_completed='1630802510.34', return_code2='0', ts='0.46', comment='SUCCESS', return_code='0', GAL='0.63', dlogl='1.31e-02', ts2='0.49', photon_index_error='0.00', photon_index='2.44' WHERE bin_id='58' AND source_name='4FGL J1158.5+4824' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sat Sep  4 17:41:50 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0254>
Subject: Job 194975: <4FGL_J1158.5+4824_daily_bin58> in cluster <slac> Done

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

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1158.5+4824_daily_bin58 179.637 48.4161 254361601 254620801 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 :                                   707.00 sec.
    Max Memory :                                 1258 MB
    Average Memory :                             277.55 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   928 sec.
    Turnaround time :                            930 sec.

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

