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


Performing analysis on: 4FGL_J1158.5+4824_daily_bin44
RA = 179.637, Dec = 48.4161
tmin = 250732801, tmax = 250992001
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='194961', job_status='RUN', time_executed='2021-09-04 17:29:33.263768', time_epoch_executed='1630801773.26' WHERE source_name='4FGL J1158.5+4824' and cadence='daily' and bin_id='44'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/194961

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/194961/ft1_4FGL_J1158.5+4824_daily_bin44.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/194961/ft2_4FGL_J1158.5+4824_daily_bin44.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/194961/ft1_4FGL_J1158.5+4824_daily_bin44.fits outfile=/scratch/kocevski/194961/ft1_filteredMKT_4FGL_J1158.5+4824_daily_bin44.fits ra=179.637 dec=48.4161 rad=12.0 tmin=250732801.0 tmax=250992001.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.52
user 1.27
sys 0.18

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

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

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

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

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

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/194961/ft1_filtered_4FGL_J1158.5+4824_daily_bin44.fits evtable="EVENTS" scfile=/scratch/kocevski/194961/ft2_4FGL_J1158.5+4824_daily_bin44.fits sctable="SC_DATA" expcube=/scratch/kocevski/194961/ltcube_250732801_250992001_4FGL_J1158.5+4824_daily_bin44.fits outfile=/scratch/kocevski/194961/expmap_250732801_250992001_4FGL_J1158.5+4824_daily_bin44.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/194961/ltcube_250732801_250992001_4FGL_J1158.5+4824_daily_bin44.fits
.....................!
real 191.48
user 185.94
sys 4.91

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/194961/ft1_filtered_4FGL_J1158.5+4824_daily_bin44.fits scfile=/scratch/kocevski/194961/ft2_4FGL_J1158.5+4824_daily_bin44.fits outfile=/scratch/kocevski/194961/cmap_250732801_250992001_4FGL_J1158.5+4824_daily_bin44.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.54
user 0.39
sys 0.15

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

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10000E-03   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 '    .10000E-03   1.0000         .10000E-03   10000.    
     6 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10999E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    .10007E-03   1.0000         .10000E-03   10000.    
     9 'norm      '    2.4446       1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    11 'norm      '    2.1697       1.0000         .10000E-03   10000.    
    12 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    13 'Prefactor '    4.2443       1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10010E-03   1.0000         .10000E-03   10000.    
    15 'norm      '    .10008E-03   1.0000         .10000E-03   10000.    
    16 'Prefactor '    10.540       1.0000         .10000E-03   10000.    
    17 'norm      '    3.5905       1.0000         .10000E-03   10000.    
    18 'norm      '    17.694       1.0000         .10000E-03   10000.    
    19 'Prefactor '    .11184E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    .37414E-03   1.0000         .10000E-03   10000.    
    21 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    22 'norm      '    2.1720       1.0000         .10000E-03   10000.    
    23 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    24 'Normalizat'    .57719       1.0000         .10000E-01   10.000    
    25 'Prefactor '    1.3422       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=   6438.943     FROM MIGRAD    STATUS=CONVERGED    576 CALLS     2481 TOTAL
                     EDM=   .11E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .9%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    78.860       -.54648E-05** at limit **
   2  Prefactor     .10000E-03    33.945       -.41366E-05** at limit **
   3  Prefactor     .10000E-03    78.563       -.41258E-05** at limit **
   4  Prefactor     .10000E-03    22.565        .64888E-05** at limit **
   5  Prefactor     .10000E-03    27.079       -.52990E-05** at limit **
   6  norm          .10000E-03    12.027       -.64949E-05** at limit **
   7  Prefactor     .10005E-03    4.8176       -.12184E-05** at limit **
   8  Prefactor     .10000E-03    38.937        .10912E-04** at limit **
   9  norm          2.4447        1.8553       -.15561E-07   -.88830E-04
  10  Prefactor     .10000E-03    10.753       -.47934E-05** at limit **
  11  norm          2.1700        .93905        .21986E-09   -.26090E-03
  12  norm          .10000E-03    3.5457       -.55847E-07** at limit **
  13  Prefactor     4.2440        3.3076        .20735E-06   -.16390E-03
  14  Prefactor     .10000E-03    38.470        .94851E-05** at limit **
  15  norm          .10000E-03    11.194        .10315E-04** at limit **
  16  Prefactor     10.539        16.604       -.20873E-05   -.79592E-03
  17  norm          3.5906        2.3063       -.69806E-07   -.44639E-03
  18  norm          17.679        7.6793        .10626E-06    .30980E-03
  19  Prefactor     .10000E-03    28.434       -.78015E-05** at limit **
  20  Prefactor     .10003E-03    2.8851       -.45588E-06** at limit **
  21  Prefactor     .10000E-03    3.6466       -.61514E-07** at limit **
  22  norm          2.1720        1.5398       -.92757E-08    .46553E-04
  23  Prefactor     .10000E-03    19.530        .31868E-05** at limit **
  24  Normalizat    .57722        .15040       -.14614E-06    .65817E-05
  25  Prefactor     1.3421        .18804        .13492E-06   -.55541E-06
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.00010005
  Prefactor  = 0.0001
  norm       = 2.4447
  Prefactor  = 0.0001
  norm       = 2.17004
  norm       = 0.0001
  Prefactor  = 4.24403
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 10.5385
  norm       = 3.59059
  norm       = 17.6791
  Prefactor  = 0.0001
  Prefactor  = 0.000100026
  Prefactor  = 0.0001
  norm       = 2.17204
  Prefactor  = 0.0001
  Normalizat = 0.577223
  Prefactor  = 1.34214
 **********
 **   18 **HESSE 
 **********

 FCN=   6438.943     FROM HESSE     STATUS=OK           423 CALLS     2904 TOTAL
                     EDM=   .47E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    78.943        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    33.926        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     .10000E-03    78.643        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10000E-03    22.534        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .10000E-03    27.052        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  norm          .10000E-03    11.978        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10005E-03    26.756        .33357E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     .10000E-03    38.857        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  norm          2.4447        1.8532        .92239E-04   -1.5395    
  10  Prefactor     .10000E-03    10.733        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  norm          2.1700        .93552        .48987E-04   -1.5413    
  12  norm          .10000E-03    3.5502        .14756E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     4.2440        3.3063        .11394E-03   -1.5296    
  14  Prefactor     .10000E-03    38.447        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          .10000E-03    11.195        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     10.539        17.118        .61706E-03   -1.5059    
  17  norm          3.5906        2.3051        .92198E-04   -1.5329    
  18  norm          17.679        7.6574        .95214E-04   -1.4867    
  19  Prefactor     .10000E-03    28.718        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     .10003E-03    22.910        .26367E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Prefactor     .10000E-03    3.6477        .14965E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  norm          2.1720        1.5406        .81542E-04   -1.5413    
  23  Prefactor     .10000E-03    19.528        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Normalizat    .57722        .17549        .26899E-03   -1.0896    
  25  Prefactor     1.3421        .22396        .23719E-03   -.82062    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 4.66882e-09
Minuit parameter uncertainties:
  1  9.559e-06
  2  6.72912e-07
  3  6.72756e-06
  4  2.12235e-06
  5  1.42597e-06
  6  1.41845e-07
  7  0.00231296
  8  1.53151e-06
  9  1.8532
  10  1.93934e-06
  11  0.935522
  12  3.99356e-07
  13  3.30646
  14  1.11858e-05
  15  0.0001045
  16  17.1257
  17  2.30515
  18  7.65786
  19  7.28747e-05
  20  0.00154331
  21  4.45975e-07
  22  1.54064
  23  1.11054e-07
  24  0.175662
  25  0.224118
Done.

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

Extracting fit parameters...

4FGL J1158.5+4824
   Spectrum: PowerLaw
349    Prefactor:  1.054e+01  1.713e+01  1.000e-04  1.000e+04 ( 1.000e-13)
350        Index:  2.443e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
351        Scale:  9.466e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
680    Prefactor:  1.342e+00  2.241e-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:  5.772e-01  1.757e-01  1.000e-02  1.000e+01 ( 1.000e+00)


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

Saving results to:
/scratch/kocevski/194961/likelihoodResults_250732801_250992001_4FGL_J1158.5+4824_daily_bin44.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) = 6438.85637766
delta logL = 0.086223863068

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 6438.85544079
delta logL = 0.087160733181

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    7.5521       1.0000         .10000E-03   10000.    
     2 'Index     '    2.8504       1.0000          .0000       10.000    
     3 'Normalizat'    .56952       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.3479       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.
 MACHINE ACCURACY LIMITS FURTHER IMPROVEMENT.

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   6438.855     FROM MIGRAD    STATUS=CONVERGED    100 CALLS      289 TOTAL
                     EDM=   .11E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     7.5721        16.897        .72966E-03   -.51136E-04
   2  Index         2.8494        1.2043        .90608E-02    .37735E-03
   3  Normalizat    .56955        .17353        .27064E-03    .58935E-04
   4  Prefactor     1.3478        .22411        .23673E-03   -.66820E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 7.57209
  Index      = 2.84937
  Normalizat = 0.569554
  Prefactor  = 1.34778
 **********
 **   18 **HESSE 
 **********

 FCN=   6438.855     FROM HESSE     STATUS=OK            27 CALLS      316 TOTAL
                     EDM=   .84E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     7.5721        14.419        .29187E-04   -1.5158    
   2  Index         2.8494        1.0308        .18122E-02   -.44463    
   3  Normalizat    .56955        .17358        .10826E-04   -1.0929    
   4  Prefactor     1.3478        .22409        .47346E-04   -.81897    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 8.3757e-11
Minuit parameter uncertainties:
  1  14.4257
  2  1.03996
  3  0.173747
  4  0.224255
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/194961': 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) = 6438.85543973
delta logL = 0.0871617867515

Extracting fit parameters...

4FGL J1158.5+4824
   Spectrum: PowerLaw
349    Prefactor:  7.572e+00  1.443e+01  1.000e-04  1.000e+04 ( 1.000e-13)
350        Index:  2.849e+00  1.040e+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:  1.348e+00  2.243e-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:  5.696e-01  1.737e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 0.55
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/194961/cmap_HighResolution_250732801_250992001_4FGL_J1158.5+4824_daily_bin44.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='6.23e-03', job_status='DONE', photon_flux_upper_limit='8.04e-08', time_completed='2021-09-04 17:42:03.374648', job_id='194961', GAL2='1.35', fit_tolerance='1e-08', EG2='0.57', EG='0.58', time_epoch_completed='1630802523.37', return_code2='0', ts='0.55', comment='SUCCESS', return_code='0', GAL='1.34', dlogl='8.72e-02', ts2='0.73', photon_index_error='0.00', photon_index='2.44' WHERE bin_id='44' AND source_name='4FGL J1158.5+4824' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sat Sep  4 17:42:03 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0047>
Subject: Job 194961: <4FGL_J1158.5+4824_daily_bin44> in cluster <slac> Done

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

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1158.5+4824_daily_bin44 179.637 48.4161 250732801 250992001 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 :                                   748.00 sec.
    Max Memory :                                 1257 MB
    Average Memory :                             304.52 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   942 sec.
    Turnaround time :                            945 sec.

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

