/nfs/farm/g/glast/g/LCRepository/bin/miniconda2/envs/fermitools_v1.0.5/lib/python2.7/site-packages/matplotlib/font_manager.py:281: UserWarning: Matplotlib is building the font cache using fc-list. This may take a moment.
  'Matplotlib is building the font cache using fc-list. '
/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 26 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 = 6797
number of fields = 31
RA_SUN column already exists. File will not be modified.
Done.


Performing analysis on: 4FGL_J1158.5+4824_daily_bin1662
RA = 179.637, Dec = 48.4161
tmin = 670118401, tmax = 670377601
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='115203', job_status='RUN', time_executed='2022-03-31 00:13:29.659746', time_epoch_executed='1648710809.66' WHERE source_name='4FGL J1158.5+4824' and cadence='daily' and bin_id='1662'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/115203

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/115203/ft1_4FGL_J1158.5+4824_daily_bin1662.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/115203/ft2_4FGL_J1158.5+4824_daily_bin1662.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/115203/ft1_4FGL_J1158.5+4824_daily_bin1662.fits outfile=/scratch/kocevski/115203/ft1_filteredMKT_4FGL_J1158.5+4824_daily_bin1662.fits ra=179.637 dec=48.4161 rad=12.0 tmin=670118401.0 tmax=670377601.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 2.62
user 2.42
sys 0.19

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/115203/ft2_4FGL_J1158.5+4824_daily_bin1662.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/115203/ft1_filteredMKT_4FGL_J1158.5+4824_daily_bin1662.fits evtable="EVENTS" outfile="/scratch/kocevski/115203/ft1_filtered_4FGL_J1158.5+4824_daily_bin1662.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.42
user 0.27
sys 0.14

Number of photons that the gtmktime cut: 523

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/115203/ft1_filtered_4FGL_J1158.5+4824_daily_bin1662.fits" evtable="EVENTS" scfile=/scratch/kocevski/115203/ft2_4FGL_J1158.5+4824_daily_bin1662.fits sctable="SC_DATA" outfile=/scratch/kocevski/115203/ltcube_670118401_670377601_4FGL_J1158.5+4824_daily_bin1662.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/115203/ft2_4FGL_J1158.5+4824_daily_bin1662.fits
.....................!
real 17.77
user 17.42
sys 0.28

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/115203/ft1_filtered_4FGL_J1158.5+4824_daily_bin1662.fits evtable="EVENTS" scfile=/scratch/kocevski/115203/ft2_4FGL_J1158.5+4824_daily_bin1662.fits sctable="SC_DATA" expcube=/scratch/kocevski/115203/ltcube_670118401_670377601_4FGL_J1158.5+4824_daily_bin1662.fits outfile=/scratch/kocevski/115203/expmap_670118401_670377601_4FGL_J1158.5+4824_daily_bin1662.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/115203/ltcube_670118401_670377601_4FGL_J1158.5+4824_daily_bin1662.fits
.....................!
real 150.44
user 146.16
sys 4.05

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/115203/ft1_filtered_4FGL_J1158.5+4824_daily_bin1662.fits scfile=/scratch/kocevski/115203/ft2_4FGL_J1158.5+4824_daily_bin1662.fits outfile=/scratch/kocevski/115203/cmap_670118401_670377601_4FGL_J1158.5+4824_daily_bin1662.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.45
user 0.30
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/115203/ft1_filtered_4FGL_J1158.5+4824_daily_bin1662.fits scfile=/scratch/kocevski/115203/ft2_4FGL_J1158.5+4824_daily_bin1662.fits outfile=/scratch/kocevski/115203/cmap_HighResolution_670118401_670377601_4FGL_J1158.5+4824_daily_bin1662.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.47
user 0.31
sys 0.14

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    38.226       1.0000         .10000E-03   10000.    
     2 'Prefactor '    171.01       1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10075E-03   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 '    .10005E-03   1.0000         .10000E-03   10000.    
     9 'norm      '    5.8494       1.0000         .10000E-03   10000.    
    10 'Prefactor '    22.835       1.0000         .10000E-03   10000.    
    11 'norm      '    2.2533       1.0000         .10000E-03   10000.    
    12 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
    13 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10063E-03   1.0000         .10000E-03   10000.    
    15 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    16 'Prefactor '    9.5345       1.0000         .10000E-03   10000.    
    17 'norm      '    .13527E-03   1.0000         .10000E-03   10000.    
    18 'norm      '    9.0766       1.0000         .10000E-03   10000.    
    19 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    5.7819       1.0000         .10000E-03   10000.    
    21 'Prefactor '    .10004E-03   1.0000         .10000E-03   10000.    
    22 'norm      '    .73403       1.0000         .10000E-03   10000.    
    23 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    24 'Normalizat'    1.2426       1.0000         .10000E-01   10.000    
    25 'Prefactor '    .55728       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=   5589.411     FROM MIGRAD    STATUS=CONVERGED    560 CALLS     2856 TOTAL
                     EDM=   .35E-10  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .4%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     38.045        79.018       -.63710E-06   -.34914E-04
   2  Prefactor     171.02        129.69        .11975E-06    .28552E-05
   3  Prefactor     .10000E-03    53.539        .21057E-06** at limit **
   4  Prefactor     .10000E-03    20.045       -.52118E-06** at limit **
   5  Prefactor     .10000E-03    65.511       -.67278E-06** at limit **
   6  norm          .10000E-03    18.584        .12237E-07** at limit **
   7  Prefactor     .10000E-03    2.1757        .13960E-06** at limit **
   8  Prefactor     .10000E-03    19.566        .23803E-06** at limit **
   9  norm          5.8493        2.9438        .35687E-07    .12886E-04
  10  Prefactor     22.835        35.977        .48434E-07    .51186E-05
  11  norm          2.2532        1.1956        .19049E-07    .12933E-04
  12  norm          .10000E-03    4.7565        .83197E-07** at limit **
  13  Prefactor     .10000E-03    1.2105        .11417E-06** at limit **
  14  Prefactor     .10000E-03    61.942        .34240E-06** at limit **
  15  norm          .10000E-03    1.3842        .48028E-07** at limit **
  16  Prefactor     9.5351        13.427        .15082E-06   -.45437E-05
  17  norm          .10000E-03    .83875       -.10032E-07** at limit **
  18  norm          9.0773        6.7526        .57326E-07   -.19092E-04
  19  Prefactor     .10000E-03    13.865        .31714E-06** at limit **
  20  Prefactor     5.7818        5.9276        .20793E-05   -.45291E-04
  21  Prefactor     .10000E-03    7.6997        .17485E-06** at limit **
  22  norm          .73323        2.4486        .11353E-05   -.68383E-04
  23  Prefactor     .10000E-03    15.254        .43828E-07** at limit **
  24  Normalizat    1.2425        .16512        .10468E-05   -.17650E-03
  25  Prefactor     .55738        .19766       -.35714E-05   -.20871E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 38.0452
  Prefactor  = 171.016
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 5.8493
  Prefactor  = 22.8352
  norm       = 2.25317
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 9.53509
  norm       = 0.0001
  norm       = 9.07733
  Prefactor  = 0.0001
  Prefactor  = 5.78176
  Prefactor  = 0.0001
  norm       = 0.733233
  Prefactor  = 0.0001
  Normalizat = 1.24254
  Prefactor  = 0.557376
 **********
 **   18 **HESSE 
 **********

 FCN=   5589.411     FROM HESSE     STATUS=OK           421 CALLS     3277 TOTAL
                     EDM=   .83E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     38.045        79.204        .32413E-03   -1.4474    
   2  Prefactor     171.02        129.72        .15427E-03   -1.3085    
   3  Prefactor     .10000E-03    53.565        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10000E-03    20.056        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .10000E-03    65.566        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  norm          .10000E-03    18.587        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    2.1973        .10770E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     .10000E-03    19.621        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  norm          5.8493        2.9407        .87033E-04   -1.5224    
  10  Prefactor     22.835        35.973        .83822E-04   -1.4752    
  11  norm          2.2532        1.1914        .53799E-04   -1.5408    
  12  norm          .10000E-03    4.7732        .15924E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     .10000E-03    1.2237        .80215E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     .10000E-03    62.036        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          .10000E-03    1.3854        .85903E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     9.5351        13.409        .12978E-03   -1.5090    
  17  norm          .10000E-03    4.6837        .13196E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  norm          9.0773        6.7526        .13303E-03   -1.5105    
  19  Prefactor     .10000E-03    13.916        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     5.7818        5.9640        .83515E-03   -1.5227    
  21  Prefactor     .10000E-03    7.7147        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  norm          .73323        2.4557        .20157E-03   -1.5537    
  23  Prefactor     .10000E-03    15.255        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Normalizat    1.2425        .18251        .19143E-03   -.85298    
  25  Prefactor     .55738        .21668        .33424E-03   -1.0941    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 8.2714e-11
Minuit parameter uncertainties:
  1  79.4243
  2  129.939
  3  0.000122621
  4  1.1954e-05
  5  6.78054e-05
  6  5.32465e-06
  7  1.82619e-06
  8  6.83908e-06
  9  2.94076
  10  36.0073
  11  1.19144
  12  3.06145e-06
  13  4.55068e-07
  14  4.04501e-06
  15  3.27763e-08
  16  13.4132
  17  6.17051e-06
  18  6.75319
  19  6.36165e-06
  20  5.96457
  21  1.65995e-06
  22  2.45603
  23  7.07815e-06
  24  0.1826
  25  0.217007
Done.

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

Extracting fit parameters...

4FGL J1158.5+4824
   Spectrum: PowerLaw
349    Prefactor:  9.535e+00  1.341e+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:  5.574e-01  2.170e-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.243e+00  1.826e-01  1.000e-02  1.000e+01 ( 1.000e+00)


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

Saving results to:
/scratch/kocevski/115203/likelihoodResults_670118401_670377601_4FGL_J1158.5+4824_daily_bin1662.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) = 5589.19391316
delta logL = 0.216703048963

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 5589.15701527
delta logL = 0.2536009365

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    13.644       1.0000         .10000E-03   10000.    
     2 'Index     '    1.7739       1.0000          .0000       10.000    
     3 'Normalizat'    1.2559       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .54440       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=   5589.157     FROM MIGRAD    STATUS=CONVERGED     90 CALLS      246 TOTAL
                     EDM=   .11E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     13.646        16.655        .10844E-03   -.31452E-06
   2  Index         1.7740        .77826        .11585E-01   -.53196E-05
   3  Normalizat    1.2559        .17842        .19052E-03   -.65640E-05
   4  Prefactor     .54441        .21672        .33776E-03    .30260E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 13.6464
  Index      = 1.77395
  Normalizat = 1.25586
  Prefactor  = 0.544407
 **********
 **   18 **HESSE 
 **********

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

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     13.646        16.735        .43375E-05   -1.4969    
   2  Index         1.7740        .78205        .46342E-03   -.70130    
   3  Normalizat    1.2559        .17853        .76207E-05   -.84894    
   4  Prefactor     .54441        .21686        .13510E-04   -1.0998    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.02434e-11
Minuit parameter uncertainties:
  1  16.7406
  2  0.787614
  3  0.178616
  4  0.217195
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/115203': 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) = 5589.15701526
delta logL = 0.253600948694

Extracting fit parameters...

4FGL J1158.5+4824
   Spectrum: PowerLaw
349    Prefactor:  1.365e+01  1.674e+01  1.000e-04  1.000e+04 ( 1.000e-13)
350        Index:  1.774e+00  7.876e-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:  5.444e-01  2.172e-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.256e+00  1.786e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 1.31
Ra Dec: 179.637 48.416
Photon Index (Free Index): 1.77 +/- 0.79
Photon Flux (Free Index): 9.46e-09 +/- 1.46e-08
Energy Flux (Free Index): 1.23e-05 +/- 2.32e-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/115203/cmap_HighResolution_670118401_670377601_4FGL_J1158.5+4824_daily_bin1662.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='5.92e-03', comment='SUCCESS', energy_flux2='1.23e-05', dlogl='2.54e-01', photon_flux2='9.46e-09', job_status='DONE', time_completed='2022-03-31 00:23:51.590146', photon_index_error2='0.79', photon_index2='1.77', ts='0.79', fit_tolerance='1e-08', GAL='0.56', photon_index_error='0.00', photon_flux_upper_limit='7.64e-08', energy_flux_error2='2.32e-05', EG='1.24', time_epoch_completed='1648711431.59', return_code='0', job_id='115203', GAL2='0.54', EG2='1.26', return_code2='0', photon_flux_error2='1.46e-08', ts2='1.31', photon_index='2.44' WHERE bin_id='1662' AND source_name='4FGL J1158.5+4824' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Mar 31 00:23:51 PDT 2022

------------------------------------------------------------
Sender: LSF System <lsf@bullet0250>
Subject: Job 115204: <4FGL_J1158.5+4824_daily_bin1662> in cluster <slac> Done

Job <4FGL_J1158.5+4824_daily_bin1662> was submitted from host <rhel6-64o> by user <kocevski> in cluster <slac> at Thu Mar 31 00:07:29 2022
Job was executed on host(s) <bullet0250>, in queue <medium>, as user <kocevski> in cluster <slac> at Thu Mar 31 00:07:31 2022
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Thu Mar 31 00:07:31 2022
Terminated at Thu Mar 31 00:22:54 2022
Results reported at Thu Mar 31 00:22:54 2022

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1158.5+4824_daily_bin1662 179.637 48.4161 670118401 670377601 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 :                                   736.08 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             282.24 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   923 sec.
    Turnaround time :                            925 sec.

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


------------------------------------------------------------
Sender: LSF System <lsf@bullet0095>
Subject: Job 115203: <4FGL_J1158.5+4824_daily_bin1662> in cluster <slac> Done

Job <4FGL_J1158.5+4824_daily_bin1662> was submitted from host <rhel6-64j> by user <kocevski> in cluster <slac> at Thu Mar 31 00:07:29 2022
Job was executed on host(s) <bullet0095>, in queue <medium>, as user <kocevski> in cluster <slac> at Thu Mar 31 00:07:31 2022
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Thu Mar 31 00:07:31 2022
Terminated at Thu Mar 31 00:23:52 2022
Results reported at Thu Mar 31 00:23:52 2022

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1158.5+4824_daily_bin1662 179.637 48.4161 670118401 670377601 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 :                                   610.00 sec.
    Max Memory :                                 1258 MB
    Average Memory :                             212.48 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   980 sec.
    Turnaround time :                            983 sec.

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

