/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 121 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 = 7402
number of fields = 30
RA_SUN column already exists. File will not be modified.
Done.


Performing analysis on: 4FGL_J1158.5+4824_daily_bin1083
RA = 179.637, Dec = 48.4161
tmin = 520041601, tmax = 520300801
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='199775', job_status='RUN', time_executed='2021-09-04 17:43:59.729720', time_epoch_executed='1630802639.73' WHERE source_name='4FGL J1158.5+4824' and cadence='daily' and bin_id='1083'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/199775

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/199775/ft1_4FGL_J1158.5+4824_daily_bin1083.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/199775/ft2_4FGL_J1158.5+4824_daily_bin1083.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/199775/ft1_4FGL_J1158.5+4824_daily_bin1083.fits outfile=/scratch/kocevski/199775/ft1_filteredMKT_4FGL_J1158.5+4824_daily_bin1083.fits ra=179.637 dec=48.4161 rad=12.0 tmin=520041601.0 tmax=520300801.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 4.29
user 4.03
sys 0.22

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/199775/ft1_filtered_4FGL_J1158.5+4824_daily_bin1083.fits" evtable="EVENTS" scfile=/scratch/kocevski/199775/ft2_4FGL_J1158.5+4824_daily_bin1083.fits sctable="SC_DATA" outfile=/scratch/kocevski/199775/ltcube_520041601_520300801_4FGL_J1158.5+4824_daily_bin1083.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/199775/ft2_4FGL_J1158.5+4824_daily_bin1083.fits
.....................!
real 11.78
user 11.42
sys 0.33

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/199775/ft1_filtered_4FGL_J1158.5+4824_daily_bin1083.fits evtable="EVENTS" scfile=/scratch/kocevski/199775/ft2_4FGL_J1158.5+4824_daily_bin1083.fits sctable="SC_DATA" expcube=/scratch/kocevski/199775/ltcube_520041601_520300801_4FGL_J1158.5+4824_daily_bin1083.fits outfile=/scratch/kocevski/199775/expmap_520041601_520300801_4FGL_J1158.5+4824_daily_bin1083.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/199775/ltcube_520041601_520300801_4FGL_J1158.5+4824_daily_bin1083.fits
.....................!
real 190.28
user 184.94
sys 4.78

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/199775/ft1_filtered_4FGL_J1158.5+4824_daily_bin1083.fits scfile=/scratch/kocevski/199775/ft2_4FGL_J1158.5+4824_daily_bin1083.fits outfile=/scratch/kocevski/199775/cmap_520041601_520300801_4FGL_J1158.5+4824_daily_bin1083.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.53
user 0.37
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/199775/ft1_filtered_4FGL_J1158.5+4824_daily_bin1083.fits scfile=/scratch/kocevski/199775/ft2_4FGL_J1158.5+4824_daily_bin1083.fits outfile=/scratch/kocevski/199775/cmap_HighResolution_520041601_520300801_4FGL_J1158.5+4824_daily_bin1083.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.17

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10077E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    .12951E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    74.292       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     6 'norm      '    13.769       1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10129E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    68.094       1.0000         .10000E-03   10000.    
     9 'norm      '    .10010E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    31.643       1.0000         .10000E-03   10000.    
    11 'norm      '    5.3474       1.0000         .10000E-03   10000.    
    12 'norm      '    .10008E-03   1.0000         .10000E-03   10000.    
    13 'Prefactor '    5.8745       1.0000         .10000E-03   10000.    
    14 'Prefactor '    .50282       1.0000         .10000E-03   10000.    
    15 'norm      '    .10064E-03   1.0000         .10000E-03   10000.    
    16 'Prefactor '    .39715       1.0000         .10000E-03   10000.    
    17 'norm      '    2.7745       1.0000         .10000E-03   10000.    
    18 'norm      '    11.332       1.0000         .10000E-03   10000.    
    19 'Prefactor '    .11170E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    21 'Prefactor '    .10157E-03   1.0000         .10000E-03   10000.    
    22 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
    23 'Prefactor '    .10007E-03   1.0000         .10000E-03   10000.    
    24 'Normalizat'    1.0856       1.0000         .10000E-01   10.000    
    25 'Prefactor '    .77531       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=   5613.511     FROM MIGRAD    STATUS=CONVERGED    638 CALLS     2982 TOTAL
                     EDM=   .29E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .3%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    278.84       -.39296E-04** at limit **
   2  Prefactor     .10000E-03    285.83        .39686E-04** at limit **
   3  Prefactor     74.697        107.48        .42182E-04   -.11106E-05
   4  Prefactor     .10000E-03    28.945       -.12444E-06** at limit **
   5  Prefactor     .10000E-03    22.898        .62159E-06** at limit **
   6  norm          13.771        27.122        .14792E-04   -.41148E-05
   7  Prefactor     .10000E-03    3.4563        .63073E-07** at limit **
   8  Prefactor     68.096        34.730        .18635E-05   -.58026E-05
   9  norm          .10000E-03    1.2530        .16920E-06** at limit **
  10  Prefactor     31.642        44.737       -.67383E-05   -.55664E-04
  11  norm          5.3518        1.7199        .27645E-06   -.14990E-02
  12  norm          .10000E-03    6.9136       -.44979E-07** at limit **
  13  Prefactor     5.8689        3.2935        .14217E-06    .12367E-03
  14  Prefactor     .68267E-01    66.688        .30645E-05   -.13081E-03
  15  norm          .10000E-03    3.2086       -.47722E-07** at limit **
  16  Prefactor     .53268        14.166       -.79533E-06   -.47808E-05
  17  norm          2.7747        2.7469        .16228E-06   -.52927E-03
  18  norm          11.334        8.8452        .15125E-06   -.45843E-04
  19  Prefactor     .10000E-03    74.392       -.52079E-06** at limit **
  20  Prefactor     .10000E-03    2.1447        .21511E-08** at limit **
  21  Prefactor     .10000E-03    20.668        .24507E-06** at limit **
  22  norm          .10000E-03    .57562       -.12489E-07** at limit **
  23  Prefactor     .10000E-03    23.043       -.78198E-06** at limit **
  24  Normalizat    1.0855        .17065       -.13579E-05    .10649E-04
  25  Prefactor     .77549        .20203       -.65034E-06   -.83673E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000100001
  Prefactor  = 0.0001
  Prefactor  = 74.6966
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 13.7711
  Prefactor  = 0.0001
  Prefactor  = 68.0957
  norm       = 0.0001
  Prefactor  = 31.6424
  norm       = 5.35176
  norm       = 0.0001
  Prefactor  = 5.86895
  Prefactor  = 0.068267
  norm       = 0.0001
  Prefactor  = 0.532684
  norm       = 2.77472
  norm       = 11.3336
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  Normalizat = 1.08546
  Prefactor  = 0.775491
 **********
 **   18 **HESSE 
 **********

 FCN=   5613.511     FROM HESSE     STATUS=OK           431 CALLS     3413 TOTAL
                     EDM=   .33E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    281.45        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    287.50        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     74.697        107.47        .46582E-04   -1.3977    
   4  Prefactor     .10000E-03    28.989        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .10000E-03    22.900        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  norm          13.771        27.123        .10794E-03   -1.4966    
   7  Prefactor     .10000E-03    3.4896        .13594E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     68.096        34.751        .48641E-04   -1.4056    
   9  norm          .10000E-03    2.0788        .16232E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     31.642        44.806        .71230E-04   -1.4582    
  11  norm          5.3518        1.7372        .45792E-04   -1.5245    
  12  norm          .10000E-03    6.9346        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     5.8689        3.3322        .92642E-04   -1.5223    
  14  Prefactor     .68267E-01    68.924        .15334       -1.5656    
  15  norm          .10000E-03    3.2361        .13103E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     .53268        120.16        .50724E-02   -1.5562    
  17  norm          2.7747        2.7438        .11464E-03   -1.5375    
  18  norm          11.334        8.7934        .11901E-03   -1.5035    
  19  Prefactor     .10000E-03    75.360        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     .10000E-03    2.1536        .10716E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Prefactor     .10000E-03    20.788        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  norm          .10000E-03    .57708        .55509E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     .10000E-03    23.049        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Normalizat    1.0855        .19947        .21365E-03   -.90220    
  25  Prefactor     .77549        .23514        .30692E-03   -1.0064    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.31013e-08
Minuit parameter uncertainties:
  1  0.000940248
  2  0.000187024
  3  107.749
  4  1.73806e-05
  5  1.07574e-06
  6  27.1475
  7  7.02484e-08
  8  34.7616
  9  3.17594e-05
  10  44.854
  11  1.73726
  12  5.17744e-06
  13  3.33233
  14  4.34014
  15  6.78454e-07
  16  16.0324
  17  2.74396
  18  8.79439
  19  0.000233159
  20  1.95262e-06
  21  4.37175e-05
  22  7.78145e-07
  23  8.48509e-06
  24  0.199613
  25  0.235448
Done.

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

Extracting fit parameters...

4FGL J1158.5+4824
   Spectrum: PowerLaw
349    Prefactor:  5.327e-01  1.603e+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:  7.755e-01  2.354e-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.085e+00  1.996e-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: 7.33e-08 ph cm-2 s-1
Energy Flux Upper Limit: 5.68e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/199775/likelihoodResults_520041601_520300801_4FGL_J1158.5+4824_daily_bin1083.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) = 5613.50576609
delta logL = 0.00566950220218

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 5613.50403772
delta logL = 0.00739787545353

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    1.0328       1.0000         .10000E-03   10000.    
     2 'Index     '    2.9378       1.0000          .0000       10.000    
     3 'Normalizat'    1.0830       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .77642       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=   5613.504     FROM MIGRAD    STATUS=CONVERGED     87 CALLS      279 TOTAL
                     EDM=   .27E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     1.0325        29.022        .49795E-03    .92283E-04
   2  Index         2.9379        3.5384        .82480E-02    .63647E-04
   3  Normalizat    1.0830        .19005        .21385E-03   -.25872E-03
   4  Prefactor     .77641        .23359        .30673E-03   -.17513E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 1.03252
  Index      = 2.93786
  Normalizat = 1.08297
  Prefactor  = 0.776412
 **********
 **   18 **HESSE 
 **********

 FCN=   5613.504     FROM HESSE     STATUS=OK            23 CALLS      302 TOTAL
                     EDM=   .22E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     1.0325        23.538        .19918E-04   -1.5505    
   2  Index         2.9379        3.2723        .32992E-03   -.42512    
   3  Normalizat    1.0830        .19026        .42769E-04   -.90301    
   4  Prefactor     .77641        .23377        .12269E-04   -1.0060    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.24933e-09
Minuit parameter uncertainties:
  1  9.8637
  2  3.65083
  3  0.190383
  4  0.234069
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/199775': 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) = 5613.50403772
delta logL = 0.0073978774717

Extracting fit parameters...

4FGL J1158.5+4824
   Spectrum: PowerLaw
349    Prefactor:  1.033e+00  9.864e+00  1.000e-04  1.000e+04 ( 1.000e-13)
350        Index:  2.938e+00  3.651e+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:  7.764e-01  2.341e-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.083e+00  1.904e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 0.00
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/199775/cmap_HighResolution_520041601_520300801_4FGL_J1158.5+4824_daily_bin1083.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='5.68e-03', job_status='DONE', photon_flux_upper_limit='7.33e-08', time_completed='2021-09-04 17:56:39.464678', job_id='199775', GAL2='0.78', fit_tolerance='1e-08', EG2='1.08', EG='1.09', time_epoch_completed='1630803399.46', return_code2='0', ts='0.00', comment='SUCCESS', return_code='0', GAL='0.78', dlogl='7.40e-03', ts2='0.02', photon_index_error='0.00', photon_index='2.44' WHERE bin_id='1083' AND source_name='4FGL J1158.5+4824' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sat Sep  4 17:56:39 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0186>
Subject: Job 199775: <4FGL_J1158.5+4824_daily_bin1083> in cluster <slac> Done

Job <4FGL_J1158.5+4824_daily_bin1083> was submitted from host <rhel6-64h> by user <kocevski> in cluster <slac> at Sat Sep  4 17:41:39 2021
Job was executed on host(s) <bullet0186>, in queue <medium>, as user <kocevski> in cluster <slac> at Sat Sep  4 17:41:40 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:41:40 2021
Terminated at Sat Sep  4 17:56:40 2021
Results reported at Sat Sep  4 17:56:40 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1158.5+4824_daily_bin1083 179.637 48.4161 520041601 520300801 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 :                                   752.35 sec.
    Max Memory :                                 1095 MB
    Average Memory :                             291.32 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   899 sec.
    Turnaround time :                            901 sec.

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

