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


Performing analysis on: 4FGL_J1158.5+4824_daily_bin1340
RA = 179.637, Dec = 48.4161
tmin = 586656001, tmax = 586915201
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='201473', job_status='RUN', time_executed='2021-09-04 17:46:45.703434', time_epoch_executed='1630802805.7' WHERE source_name='4FGL J1158.5+4824' and cadence='daily' and bin_id='1340'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/201473

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/201473/ft1_4FGL_J1158.5+4824_daily_bin1340.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/201473/ft2_4FGL_J1158.5+4824_daily_bin1340.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/201473/ft1_4FGL_J1158.5+4824_daily_bin1340.fits outfile=/scratch/kocevski/201473/ft1_filteredMKT_4FGL_J1158.5+4824_daily_bin1340.fits ra=179.637 dec=48.4161 rad=12.0 tmin=586656001.0 tmax=586915201.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 3.63
user 3.42
sys 0.19

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

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

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

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/201473/ft1_filtered_4FGL_J1158.5+4824_daily_bin1340.fits evtable="EVENTS" scfile=/scratch/kocevski/201473/ft2_4FGL_J1158.5+4824_daily_bin1340.fits sctable="SC_DATA" expcube=/scratch/kocevski/201473/ltcube_586656001_586915201_4FGL_J1158.5+4824_daily_bin1340.fits outfile=/scratch/kocevski/201473/expmap_586656001_586915201_4FGL_J1158.5+4824_daily_bin1340.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/201473/ltcube_586656001_586915201_4FGL_J1158.5+4824_daily_bin1340.fits
.....................!
real 190.75
user 185.24
sys 5.19

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/201473/ft1_filtered_4FGL_J1158.5+4824_daily_bin1340.fits scfile=/scratch/kocevski/201473/ft2_4FGL_J1158.5+4824_daily_bin1340.fits outfile=/scratch/kocevski/201473/cmap_586656001_586915201_4FGL_J1158.5+4824_daily_bin1340.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.59
user 0.37
sys 0.15

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

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .19059E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    41.694       1.0000         .10000E-03   10000.    
     3 'Prefactor '    367.09       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .11806E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10372E-03   1.0000         .10000E-03   10000.    
     6 'norm      '    .45197E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    7.8758       1.0000         .10000E-03   10000.    
     8 'Prefactor '    .13419E-03   1.0000         .10000E-03   10000.    
     9 'norm      '    4.4253       1.0000         .10000E-03   10000.    
    10 'Prefactor '    127.36       1.0000         .10000E-03   10000.    
    11 'norm      '    1.0733       1.0000         .10000E-03   10000.    
    12 'norm      '    6.2417       1.0000         .10000E-03   10000.    
    13 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    .11931E-03   1.0000         .10000E-03   10000.    
    15 'norm      '    7.1331       1.0000         .10000E-03   10000.    
    16 'Prefactor '    39.167       1.0000         .10000E-03   10000.    
    17 'norm      '    8.8441       1.0000         .10000E-03   10000.    
    18 'norm      '    5.8688       1.0000         .10000E-03   10000.    
    19 'Prefactor '    .83435E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    4.2355       1.0000         .10000E-03   10000.    
    21 'Prefactor '    .10186E-03   1.0000         .10000E-03   10000.    
    22 'norm      '    2.9436       1.0000         .10000E-03   10000.    
    23 'Prefactor '    .10881E-03   1.0000         .10000E-03   10000.    
    24 'Normalizat'    1.0899       1.0000         .10000E-01   10.000    
    25 'Prefactor '    .67437       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=   5882.776     FROM MIGRAD    STATUS=CONVERGED    576 CALLS     2904 TOTAL
                     EDM=   .15E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.0%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    96.371        .48131E-06** at limit **
   2  Prefactor     41.807        113.03        .14876E-05    .39188E-04
   3  Prefactor     367.00        157.56       -.12493E-06   -.56313E-04
   4  Prefactor     .10000E-03    33.170        .45586E-06** at limit **
   5  Prefactor     .10000E-03    31.255        .26926E-07** at limit **
   6  norm          .10000E-03    192.93       -.11382E-05** at limit **
   7  Prefactor     7.8759        6.6573        .19963E-06    .32132E-04
   8  Prefactor     .10000E-03    24.610       -.76131E-07** at limit **
   9  norm          4.4245        3.2917       -.17722E-07   -.10378E-03
  10  Prefactor     127.43        57.910       -.16708E-05    .25804E-04
  11  norm          1.0733        1.2345        .82342E-06    .12568E-02
  12  norm          6.2405        6.2058       -.16512E-06   -.75451E-05
  13  Prefactor     .10000E-03    2.0030        .72013E-08** at limit **
  14  Prefactor     .10000E-03    69.686       -.11165E-05** at limit **
  15  norm          7.1357        7.2360        .20697E-06    .21126E-04
  16  Prefactor     39.163        22.054        .11807E-06    .11946E-03
  17  norm          8.8441        2.9132        .46348E-07    .32564E-03
  18  norm          5.8635        5.3314        .21333E-05    .15698E-02
  19  Prefactor     .10819E-03    24.521       -.67740E-05** at limit **
  20  Prefactor     4.2341        4.7501        .20558E-06    .65286E-04
  21  Prefactor     .10000E-03    32.063       -.37325E-06** at limit **
  22  norm          2.9435        1.7772        .62973E-08    .15383E-03
  23  Prefactor     .10000E-03    30.276        .11821E-06** at limit **
  24  Normalizat    1.0900        .17959       -.14377E-05    .50142E-03
  25  Prefactor     .67426        .20404        .10583E-05    .22330E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 41.8074
  Prefactor  = 366.997
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 7.87587
  Prefactor  = 0.0001
  norm       = 4.4245
  Prefactor  = 127.431
  norm       = 1.0733
  norm       = 6.24053
  Prefactor  = 0.0001
  Prefactor  = 0.000100001
  norm       = 7.13567
  Prefactor  = 39.1633
  norm       = 8.84406
  norm       = 5.86354
  Prefactor  = 0.000108191
  Prefactor  = 4.23411
  Prefactor  = 0.0001
  norm       = 2.94354
  Prefactor  = 0.0001
  Normalizat = 1.09001
  Prefactor  = 0.674264
 **********
 **   18 **HESSE 
 **********

 FCN=   5882.776     FROM HESSE     STATUS=OK           435 CALLS     3339 TOTAL
                     EDM=   .35E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    96.924        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     41.807        112.75        .31041E-03   -1.4414    
   3  Prefactor     367.00        157.64        .10636E-03   -1.1853    
   4  Prefactor     .10000E-03    33.216        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .10000E-03    31.259        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  norm          .10000E-03    199.60        .42413E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     7.8759        6.6695        .14288E-03   -1.5147    
   8  Prefactor     .10000E-03    24.683        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  norm          4.4245        3.2848        .11301E-03   -1.5287    
  10  Prefactor     127.43        57.514        .17836E-03   -1.3445    
  11  norm          1.0733        1.2047        .81230E-04   -1.5501    
  12  norm          6.2405        6.2105        .16068E-03   -1.5208    
  13  Prefactor     .10000E-03    2.0340        .10552E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     .10000E-03    69.968        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          7.1357        7.2317        .15019E-03   -1.5174    
  16  Prefactor     39.163        21.998        .64045E-04   -1.4456    
  17  norm          8.8441        2.9217        .71098E-04   -1.5113    
  18  norm          5.8635        5.5184        .81395E-03   -1.5224    
  19  Prefactor     .10819E-03    22.660        .89827E-01   -1.5707    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     4.2341        4.7414        .17188E-03   -1.5296    
  21  Prefactor     .10000E-03    32.448        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  norm          2.9435        1.7792        .77261E-04   -1.5365    
  23  Prefactor     .10000E-03    30.292        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Normalizat    1.0900        .20708        .22163E-03   -.90073    
  25  Prefactor     .67426        .23456        .32836E-03   -1.0454    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.48084e-09
Minuit parameter uncertainties:
  1  0.000313297
  2  113.333
  3  157.823
  4  2.18031e-05
  5  3.49537e-05
  6  0.000306551
  7  6.67011
  8  1.73223e-05
  9  3.28496
  10  57.5392
  11  1.20468
  12  6.21115
  13  2.47759e-06
  14  0.000470962
  15  7.23263
  16  22.0025
  17  2.92174
  18  5.51891
  19  0.0272569
  20  4.7418
  21  5.46932e-05
  22  1.77927
  23  8.87729e-05
  24  0.207231
  25  0.234903
Done.

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

Extracting fit parameters...

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

GAL_V02
   Spectrum: PowerLaw
680    Prefactor:  6.743e-01  2.349e-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.090e+00  2.072e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 5.19
Ra Dec: 179.637 48.416
Photon Index (Fixed Index): 2.44 +/- 0.00
Photon Flux (Fixed Index): 6.58e-08 +/- 3.70e-08
Energy Flux (Fixed Index): 2.04e-05 +/- 1.15e-05

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) = 5882.70939962
delta logL = 0.0669875731728

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 5882.70641782
delta logL = 0.0699693706938

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    31.552       1.0000         .10000E-03   10000.    
     2 'Index     '    2.6667       1.0000          .0000       10.000    
     3 'Normalizat'    1.0748       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .68778       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=   5882.706     FROM MIGRAD    STATUS=CONVERGED     58 CALLS      235 TOTAL
                     EDM=   .80E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     31.519        314.92        .17833E-02    .98175E-05
   2  Index         2.6673        3.2629        .13929        .11170E-03
   3  Normalizat    1.0748        .77901E-01    .39132E-01    .59048E-05
   4  Prefactor     .68778        .79285E-01    .73519E-01    .23360E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 31.5186
  Index      = 2.66731
  Normalizat = 1.0748
  Prefactor  = 0.68778
 **********
 **   18 **HESSE 
 **********

 FCN=   5882.706     FROM HESSE     STATUS=OK            33 CALLS      268 TOTAL
                     EDM=   .80E-11    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     31.519        31.175        .71333E-04   -1.4585    
   2  Index         2.6673        .69364        .51274E-02   -.48537    
   3  Normalizat    1.0748        .20025        .22295E-03   -.90565    
   4  Prefactor     .68778        .23542        .32543E-03   -1.0401    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 8.02053e-12
Minuit parameter uncertainties:
  1  31.1912
  2  0.696516
  3  0.200392
  4  0.235765
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/201473': 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) = 5882.70641706
delta logL = 0.0699701298381

Extracting fit parameters...

4FGL J1158.5+4824
   Spectrum: PowerLaw
349    Prefactor:  3.152e+01  3.119e+01  1.000e-04  1.000e+04 ( 1.000e-13)
350        Index:  2.667e+00  6.965e-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:  6.878e-01  2.358e-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.075e+00  2.004e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 5.29
Ra Dec: 179.637 48.416
Photon Index (Free Index): 2.67 +/- 0.70
Photon Flux (Free Index): 7.60e-08 +/- 4.78e-08
Energy Flux (Free Index): 1.88e-05 +/- 1.13e-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/201473/cmap_HighResolution_586656001_586915201_4FGL_J1158.5+4824_daily_bin1340.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='6.58e-08', energy_flux2='1.88e-05', photon_flux_error='3.70e-08', dlogl='7.00e-02', energy_flux='2.04e-05', photon_flux2='7.60e-08', job_status='DONE', time_completed='2021-09-04 17:58:04.517434', photon_index_error2='0.70', photon_index2='2.67', ts='5.19', fit_tolerance='1e-08', GAL='0.67', photon_index_error='0.00', energy_flux_error2='1.13e-05', EG='1.09', time_epoch_completed='1630803484.52', return_code='0', job_id='201473', GAL2='0.69', EG2='1.07', return_code2='0', energy_flux_error='1.15e-05', photon_flux_error2='4.78e-08', ts2='5.29', photon_index='2.44' WHERE bin_id='1340' AND source_name='4FGL J1158.5+4824' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sat Sep  4 17:58:04 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0094>
Subject: Job 201473: <4FGL_J1158.5+4824_daily_bin1340> in cluster <slac> Done

Job <4FGL_J1158.5+4824_daily_bin1340> was submitted from host <rhel6-64d> by user <kocevski> in cluster <slac> at Sat Sep  4 17:46:34 2021
Job was executed on host(s) <bullet0094>, in queue <medium>, as user <kocevski> in cluster <slac> at Sat Sep  4 17:46:35 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:46:35 2021
Terminated at Sat Sep  4 17:58:05 2021
Results reported at Sat Sep  4 17:58:05 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1158.5+4824_daily_bin1340 179.637 48.4161 586656001 586915201 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 :                                   674.50 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             337.91 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   689 sec.
    Turnaround time :                            691 sec.

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

