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


Performing analysis on: 4FGL_J1158.5+4824_daily_bin38
RA = 179.637, Dec = 48.4161
tmin = 249177601, tmax = 249436801
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='194955', job_status='RUN', time_executed='2021-09-04 17:28:20.412154', time_epoch_executed='1630801700.41' WHERE source_name='4FGL J1158.5+4824' and cadence='daily' and bin_id='38'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/194955

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/194955/ft1_4FGL_J1158.5+4824_daily_bin38.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/194955/ft2_4FGL_J1158.5+4824_daily_bin38.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/194955/ft1_4FGL_J1158.5+4824_daily_bin38.fits outfile=/scratch/kocevski/194955/ft1_filteredMKT_4FGL_J1158.5+4824_daily_bin38.fits ra=179.637 dec=48.4161 rad=12.0 tmin=249177601.0 tmax=249436801.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.42
user 1.25
sys 0.16

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/194955/ft2_4FGL_J1158.5+4824_daily_bin38.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/194955/ft1_filteredMKT_4FGL_J1158.5+4824_daily_bin38.fits evtable="EVENTS" outfile="/scratch/kocevski/194955/ft1_filtered_4FGL_J1158.5+4824_daily_bin38.fits" apply_filter=yes overwrite=yes header_obstimes=yes tstart=0.0 tstop=0.0 gtifile="default" chatter=3 clobber=yes debug=no gui=no mode="ql"

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

This is gtmktime version HEAD
Applying GTI filter:
IN_SAA!=T && LIVETIME>0 && gtifilter('/nfs/farm/g/glast/g/LCRepository/Likelihood/GTIs/nogrb.gti',(START+STOP)/2) && (angsep(RA_SUN,DEC_SUN,RA_ZENITH,DEC_ZENITH)>115 || gtifilter('/nfs/farm/g/glast/g/LCRepository/Likelihood/GTIs/nosolarflares.gti',(START+STOP)/2))
real 0.49
user 0.33
sys 0.14

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/194955/ft1_filtered_4FGL_J1158.5+4824_daily_bin38.fits" evtable="EVENTS" scfile=/scratch/kocevski/194955/ft2_4FGL_J1158.5+4824_daily_bin38.fits sctable="SC_DATA" outfile=/scratch/kocevski/194955/ltcube_249177601_249436801_4FGL_J1158.5+4824_daily_bin38.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/194955/ft2_4FGL_J1158.5+4824_daily_bin38.fits
.....................!
real 12.99
user 12.60
sys 0.32

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/194955/ft1_filtered_4FGL_J1158.5+4824_daily_bin38.fits evtable="EVENTS" scfile=/scratch/kocevski/194955/ft2_4FGL_J1158.5+4824_daily_bin38.fits sctable="SC_DATA" expcube=/scratch/kocevski/194955/ltcube_249177601_249436801_4FGL_J1158.5+4824_daily_bin38.fits outfile=/scratch/kocevski/194955/expmap_249177601_249436801_4FGL_J1158.5+4824_daily_bin38.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/194955/ltcube_249177601_249436801_4FGL_J1158.5+4824_daily_bin38.fits
.....................!
real 190.34
user 185.09
sys 4.58

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/194955/ft1_filtered_4FGL_J1158.5+4824_daily_bin38.fits scfile=/scratch/kocevski/194955/ft2_4FGL_J1158.5+4824_daily_bin38.fits outfile=/scratch/kocevski/194955/cmap_249177601_249436801_4FGL_J1158.5+4824_daily_bin38.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.52
user 0.37
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/194955/ft1_filtered_4FGL_J1158.5+4824_daily_bin38.fits scfile=/scratch/kocevski/194955/ft2_4FGL_J1158.5+4824_daily_bin38.fits outfile=/scratch/kocevski/194955/cmap_HighResolution_249177601_249436801_4FGL_J1158.5+4824_daily_bin38.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.38
sys 0.14

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    91.933       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10010E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    .13039E-02   1.0000         .10000E-03   10000.    
     4 'Prefactor '    82.334       1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     6 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    .10005E-03   1.0000         .10000E-03   10000.    
     9 'norm      '    .75056       1.0000         .10000E-03   10000.    
    10 'Prefactor '    24.655       1.0000         .10000E-03   10000.    
    11 'norm      '    1.4571       1.0000         .10000E-03   10000.    
    12 'norm      '    .10006E-03   1.0000         .10000E-03   10000.    
    13 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    153.15       1.0000         .10000E-03   10000.    
    15 'norm      '    4.0257       1.0000         .10000E-03   10000.    
    16 'Prefactor '    1.4885       1.0000         .10000E-03   10000.    
    17 'norm      '    .10002E-03   1.0000         .10000E-03   10000.    
    18 'norm      '    18.915       1.0000         .10000E-03   10000.    
    19 'Prefactor '    2.3095       1.0000         .10000E-03   10000.    
    20 'Prefactor '    8.7994       1.0000         .10000E-03   10000.    
    21 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
    22 'norm      '    2.3562       1.0000         .10000E-03   10000.    
    23 'Prefactor '    49.111       1.0000         .10000E-03   10000.    
    24 'Normalizat'    1.1726       1.0000         .10000E-01   10.000    
    25 'Prefactor '    .51763       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=   4261.287     FROM MIGRAD    STATUS=CONVERGED    575 CALLS     3291 TOTAL
                     EDM=   .76E-10  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  5.3%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     91.881        105.84        .22926E-05   -.20181E-04
   2  Prefactor     .10000E-03    67.661       -.21367E-05** at limit **
   3  Prefactor     .10003E-03    1101.9        .16699E-04** at limit **
   4  Prefactor     82.350        58.960       -.39108E-06    .62358E-05
   5  Prefactor     .10000E-03    24.341       -.17388E-06** at limit **
   6  norm          .10000E-03    17.475        .54118E-07** at limit **
   7  Prefactor     .10000E-03    2.4533       -.41695E-07** at limit **
   8  Prefactor     .10000E-03    49.352        .11408E-05** at limit **
   9  norm          .75061        1.6245       -.18220E-06   -.33935E-03
  10  Prefactor     24.657        22.931        .44948E-07    .56052E-06
  11  norm          1.4571        .94906        .24718E-07    .31649E-04
  12  norm          .10000E-03    7.5090        .80277E-07** at limit **
  13  Prefactor     .10000E-03    2.1273        .66062E-06** at limit **
  14  Prefactor     153.16        75.888       -.27583E-06    .99623E-05
  15  norm          4.0262        5.5259        .43091E-07   -.12124E-04
  16  Prefactor     1.5003        105.50        .10525E-04   -.11232E-04
  17  norm          .10000E-03    .78922       -.11261E-07** at limit **
  18  norm          18.901        12.787        .11424E-05    .15004E-03
  19  Prefactor     2.3766        138.12       -.10610E-04   -.12174E-04
  20  Prefactor     8.7999        8.5623        .22380E-06    .40337E-05
  21  Prefactor     .10000E-03    10.472        .52231E-07** at limit **
  22  norm          2.3563        2.0422        .29677E-07    .19938E-04
  23  Prefactor     49.090        67.437        .13564E-05   -.85807E-05
  24  Normalizat    1.1724        .19437       -.14412E-05   -.15397E-05
  25  Prefactor     .51780        .21603        .19999E-05   -.18189E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 91.8815
  Prefactor  = 0.0001
  Prefactor  = 0.000100029
  Prefactor  = 82.3495
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.750609
  Prefactor  = 24.6568
  norm       = 1.4571
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 153.162
  norm       = 4.02625
  Prefactor  = 1.50026
  norm       = 0.0001
  norm       = 18.901
  Prefactor  = 2.37657
  Prefactor  = 8.79993
  Prefactor  = 0.0001
  norm       = 2.35635
  Prefactor  = 49.0901
  Normalizat = 1.17237
  Prefactor  = 0.517799
 **********
 **   18 **HESSE 
 **********

 FCN=   4261.287     FROM HESSE     STATUS=OK           425 CALLS     3716 TOTAL
                     EDM=   .10E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     91.881        105.49        .20956E-03   -1.3788    
   2  Prefactor     .10000E-03    67.513        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     .10003E-03    1095.2        .20578E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     82.350        59.073        .44266E-04   -1.3891    
   5  Prefactor     .10000E-03    24.341        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  norm          .10000E-03    17.475        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    2.4590        .99847E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     .10000E-03    49.589        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  norm          .75061        1.3533        .11980E-02   -1.5535    
  10  Prefactor     24.657        22.908        .80675E-04   -1.4714    
  11  norm          1.4571        .94732        .47824E-04   -1.5467    
  12  norm          .10000E-03    7.5316        .17463E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     .10000E-03    2.1556        .92996E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     153.16        75.764        .16287E-03   -1.3226    
  15  norm          4.0262        5.5178        .17499E-03   -1.5307    
  16  Prefactor     1.5003        105.75        .17574E-02   -1.5463    
  17  norm          .10000E-03    .79997        .56616E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  norm          18.901        12.603        .92092E-04   -1.4838    
  19  Prefactor     2.3766        135.30        .26998E-03   -1.5400    
  20  Prefactor     8.7999        8.5607        .67562E-03   -1.5115    
  21  Prefactor     .10000E-03    10.482        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  norm          2.3563        2.0416        .84508E-04   -1.5401    
  23  Prefactor     49.090        67.421        .57222E-04   -1.4306    
  24  Normalizat    1.1724        .21312        .19949E-03   -.87461    
  25  Prefactor     .51780        .23699        .34048E-03   -1.1117    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 9.99143e-11
Minuit parameter uncertainties:
  1  105.702
  2  0.000173188
  3  0.0115596
  4  59.115
  5  4.80759e-06
  6  3.30535e-06
  7  2.41259e-07
  8  0.000114577
  9  1.35337
  10  22.9157
  11  0.947331
  12  3.69746e-06
  13  8.02755e-07
  14  75.8125
  15  5.51852
  16  25.2367
  17  2.61237e-07
  18  12.605
  19  35.949
  20  8.56194
  21  7.8817e-06
  22  2.04164
  23  67.5256
  24  0.213273
  25  0.237444
Done.

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

Extracting fit parameters...

4FGL J1158.5+4824
   Spectrum: PowerLaw
349    Prefactor:  1.500e+00  2.524e+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.178e-01  2.374e-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.172e+00  2.133e-01  1.000e-02  1.000e+01 ( 1.000e+00)


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

Saving results to:
/scratch/kocevski/194955/likelihoodResults_249177601_249436801_4FGL_J1158.5+4824_daily_bin38.txt

Performing a free index iterative likelihood fit...

Freezing all point sources, except source of interest...

Done.

Freeing candidate source...
Done.

Fit tolerance = 1

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 4259.82801622
delta logL = 1.4591915807

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 4259.76906151
delta logL = 1.51814628984

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .13477       1.0000         .10000E-03   10000.    
     2 'Index     '    5.6103       1.0000          .0000       10.000    
     3 'Normalizat'    1.0731       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .58946       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=   4259.769     FROM MIGRAD    STATUS=CONVERGED     55 CALLS      254 TOTAL
                     EDM=   .19E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .13493        1.7073        .35745E-02    .10199E-02
   2  Index         5.6101        2.8698        .94469E-01    .11410E-03
   3  Normalizat    1.0732        .54055E-01    .39216E-01    .68648E-05
   4  Prefactor     .58947        .63729E-01    .72379E-01    .23085E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.134926
  Index      = 5.61013
  Normalizat = 1.07323
  Prefactor  = 0.589468
 **********
 **   18 **HESSE 
 **********

 FCN=   4259.769     FROM HESSE     STATUS=NOT POSDEF    33 CALLS      287 TOTAL
                     EDM=   .20E-06    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .13493        3.2889        .16138E-04   -1.5635    
   2  Index         5.6101        4.0736        .38065E-02    .12233    
   3  Normalizat    1.0732        .18273        .20681E-03   -.90616    
   4  Prefactor     .58947        .21169        .32042E-03   -1.0803    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 2.00917e-07
Minuit parameter uncertainties:
  1  1.33189
  2  4.77855
  3  0.182835
  4  0.211972
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/194955': 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) = 4259.76906034
delta logL = 1.51814746696

Extracting fit parameters...

4FGL J1158.5+4824
   Spectrum: PowerLaw
349    Prefactor:  1.349e-01  1.332e+00  1.000e-04  1.000e+04 ( 1.000e-13)
350        Index:  5.610e+00  4.779e+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:  5.895e-01  2.120e-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.073e+00  1.828e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 3.19
Ra Dec: 179.637 48.416
Photon Index (Free Index): 5.61 +/- 4.78
Photon Flux (Free Index): 8.84e-08 +/- 6.13e-08
Energy Flux (Free Index): 1.13e-05 +/- 9.05e-06

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/194955/cmap_HighResolution_249177601_249436801_4FGL_J1158.5+4824_daily_bin38.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='7.96e-03', comment='SUCCESS', energy_flux2='1.13e-05', dlogl='1.52e+00', photon_flux2='8.84e-08', job_status='DONE', time_completed='2021-09-04 17:39:08.130894', photon_index_error2='4.78', photon_index2='5.61', ts='0.00', fit_tolerance='1e-08', GAL='0.52', photon_index_error='0.00', photon_flux_upper_limit='1.03e-07', energy_flux_error2='9.05e-06', EG='1.17', time_epoch_completed='1630802348.13', return_code='0', job_id='194955', GAL2='0.59', EG2='1.07', return_code2='102', photon_flux_error2='6.13e-08', ts2='3.19', photon_index='2.44' WHERE bin_id='38' AND source_name='4FGL J1158.5+4824' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sat Sep  4 17:39:08 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0037>
Subject: Job 194955: <4FGL_J1158.5+4824_daily_bin38> in cluster <slac> Done

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

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1158.5+4824_daily_bin38 179.637 48.4161 249177601 249436801 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 :                                   646.40 sec.
    Max Memory :                                 1095 MB
    Average Memory :                             295.88 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   769 sec.
    Turnaround time :                            770 sec.

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

