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


Performing analysis on: 4FGL_J1158.5+4824_daily_bin554
RA = 179.637, Dec = 48.4161
tmin = 382924801, tmax = 383184001
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='196387', job_status='RUN', time_executed='2021-09-04 17:31:55.597996', time_epoch_executed='1630801915.6' WHERE source_name='4FGL J1158.5+4824' and cadence='daily' and bin_id='554'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/196387

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/196387/ft1_4FGL_J1158.5+4824_daily_bin554.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/196387/ft2_4FGL_J1158.5+4824_daily_bin554.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/196387/ft1_4FGL_J1158.5+4824_daily_bin554.fits outfile=/scratch/kocevski/196387/ft1_filteredMKT_4FGL_J1158.5+4824_daily_bin554.fits ra=179.637 dec=48.4161 rad=12.0 tmin=382924801.0 tmax=383184001.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.43
user 4.22
sys 0.20

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/196387/ft1_filtered_4FGL_J1158.5+4824_daily_bin554.fits" evtable="EVENTS" scfile=/scratch/kocevski/196387/ft2_4FGL_J1158.5+4824_daily_bin554.fits sctable="SC_DATA" outfile=/scratch/kocevski/196387/ltcube_382924801_383184001_4FGL_J1158.5+4824_daily_bin554.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/196387/ft2_4FGL_J1158.5+4824_daily_bin554.fits
.....................!
real 11.61
user 11.24
sys 0.31

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/196387/ft1_filtered_4FGL_J1158.5+4824_daily_bin554.fits evtable="EVENTS" scfile=/scratch/kocevski/196387/ft2_4FGL_J1158.5+4824_daily_bin554.fits sctable="SC_DATA" expcube=/scratch/kocevski/196387/ltcube_382924801_383184001_4FGL_J1158.5+4824_daily_bin554.fits outfile=/scratch/kocevski/196387/expmap_382924801_383184001_4FGL_J1158.5+4824_daily_bin554.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/196387/ltcube_382924801_383184001_4FGL_J1158.5+4824_daily_bin554.fits
.....................!
real 193.24
user 187.96
sys 4.89

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/196387/ft1_filtered_4FGL_J1158.5+4824_daily_bin554.fits scfile=/scratch/kocevski/196387/ft2_4FGL_J1158.5+4824_daily_bin554.fits outfile=/scratch/kocevski/196387/cmap_382924801_383184001_4FGL_J1158.5+4824_daily_bin554.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.36
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/196387/ft1_filtered_4FGL_J1158.5+4824_daily_bin554.fits scfile=/scratch/kocevski/196387/ft2_4FGL_J1158.5+4824_daily_bin554.fits outfile=/scratch/kocevski/196387/cmap_HighResolution_382924801_383184001_4FGL_J1158.5+4824_daily_bin554.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.54
user 0.35
sys 0.18

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    2.2010       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    .33362E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10005E-03   1.0000         .10000E-03   10000.    
     6 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    4.2671       1.0000         .10000E-03   10000.    
     8 'Prefactor '    48.599       1.0000         .10000E-03   10000.    
     9 'norm      '    .21241E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    19.970       1.0000         .10000E-03   10000.    
    11 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
    12 'norm      '    .10024E-03   1.0000         .10000E-03   10000.    
    13 'Prefactor '    .14822E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    57.577       1.0000         .10000E-03   10000.    
    15 'norm      '    .10036E-03   1.0000         .10000E-03   10000.    
    16 'Prefactor '    .10008E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    12.273       1.0000         .10000E-03   10000.    
    18 'norm      '    7.6328       1.0000         .10000E-03   10000.    
    19 'Prefactor '    .10573E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    4.8096       1.0000         .10000E-03   10000.    
    21 'Prefactor '    .10048E-03   1.0000         .10000E-03   10000.    
    22 'norm      '    5.1992       1.0000         .10000E-03   10000.    
    23 'Prefactor '    87.444       1.0000         .10000E-03   10000.    
    24 'Normalizat'    1.1690       1.0000         .10000E-01   10.000    
    25 'Prefactor '    .72293       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=   5656.231     FROM MIGRAD    STATUS=CONVERGED    618 CALLS     2950 TOTAL
                     EDM=   .77E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .3%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     2.0005        366.89       -.20158E-04   -.60724E-05
   2  Prefactor     .10000E-03    41.687        .10373E-04** at limit **
   3  Prefactor     .10000E-03    266.67        .70718E-04** at limit **
   4  Prefactor     .10000E-03    18.338       -.10788E-04** at limit **
   5  Prefactor     .10000E-03    48.697        .21478E-04** at limit **
   6  norm          .10000E-03    14.157       -.36464E-06** at limit **
   7  Prefactor     4.2654        7.3269       -.28877E-05   -.30134E-03
   8  Prefactor     48.600        52.847       -.17512E-06    .19991E-04
   9  norm          .10255E-03    1.2407       -.19956E-06** at limit **
  10  Prefactor     19.994        28.109       -.10012E-04    .59439E-04
  11  norm          .10000E-03    .67817       -.22926E-06** at limit **
  12  norm          .10000E-03    5.6165       -.23510E-06** at limit **
  13  Prefactor     .10000E-03    1.8244       -.55864E-07** at limit **
  14  Prefactor     57.671        62.353        .12063E-04    .73271E-04
  15  norm          .10000E-03    7.3442       -.10315E-06** at limit **
  16  Prefactor     .10000E-03    7.0186       -.18214E-06** at limit **
  17  norm          12.272        3.3791       -.83834E-07   -.17148E-04
  18  norm          7.6322        7.9028        .43453E-05    .47348E-04
  19  Prefactor     .10001E-03    40.316       -.83603E-05** at limit **
  20  Prefactor     4.8085        6.9352        .46195E-05   -.22893E-03
  21  Prefactor     .10000E-03    17.923        .11213E-04** at limit **
  22  norm          5.1987        2.6736       -.11412E-06   -.17142E-03
  23  Prefactor     87.435        68.730       -.36508E-05   -.66388E-05
  24  Normalizat    1.1690        .17600       -.60612E-07   -.10674E-04
  25  Prefactor     .72306        .20690       -.13132E-05    .73728E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 2.00046
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 4.26539
  Prefactor  = 48.5996
  norm       = 0.00010255
  Prefactor  = 19.994
  norm       = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 57.6709
  norm       = 0.0001
  Prefactor  = 0.0001
  norm       = 12.272
  norm       = 7.63224
  Prefactor  = 0.000100006
  Prefactor  = 4.80854
  Prefactor  = 0.0001
  norm       = 5.19874
  Prefactor  = 87.4345
  Normalizat = 1.16903
  Prefactor  = 0.723056
 **********
 **   18 **HESSE 
 **********

 FCN=   5656.231     FROM HESSE     STATUS=OK           435 CALLS     3385 TOTAL
                     EDM=   .31E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     2.0005        371.05        .27733E-03   -1.5425    
   2  Prefactor     .10000E-03    41.687        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     .10000E-03    267.08        .21344E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10000E-03    18.322        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .10000E-03    48.694        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  norm          .10000E-03    14.157        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     4.2654        7.3067        .19505E-03   -1.5295    
   8  Prefactor     48.600        52.448        .57521E-04   -1.4313    
   9  norm          .10255E-03    3.0869        .28795E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     19.994        27.842        .89628E-04   -1.4813    
  11  norm          .10000E-03    1.2966        .11270E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  norm          .10000E-03    5.6319        .17403E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     .10000E-03    6.0497        .19398E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     57.671        60.047        .52870E-04   -1.4188    
  15  norm          .10000E-03    7.4592        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     .10000E-03    7.0256        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          12.272        3.3860        .69071E-04   -1.5007    
  18  norm          7.6322        7.8891        .14515E-03   -1.5155    
  19  Prefactor     .10001E-03    40.901        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     4.8085        6.8936        .18344E-03   -1.5269    
  21  Prefactor     .10000E-03    18.064        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  norm          5.1987        2.6717        .85376E-04   -1.5252    
  23  Prefactor     87.435        68.742        .42964E-04   -1.3835    
  24  Normalizat    1.1690        .20281        .21137E-03   -.87565    
  25  Prefactor     .72306        .23862        .32032E-03   -1.0263    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.13845e-09
Minuit parameter uncertainties:
  1  54.8361
  2  1.20456e-05
  3  0.000211587
  4  2.28718e-05
  5  1.54895e-05
  6  1.09704e-06
  7  7.30823
  8  52.4975
  9  0.00561176
  10  27.8603
  11  2.18186e-05
  12  3.00203e-05
  13  2.41015e-06
  14  60.1099
  15  3.04417e-05
  16  4.51053e-06
  17  3.38608
  18  7.89015
  19  0.000976781
  20  6.89478
  21  6.512e-05
  22  2.67177
  23  68.8049
  24  0.202946
  25  0.238955
Done.

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

Extracting fit parameters...

4FGL J1158.5+4824
   Spectrum: PowerLaw
349    Prefactor:  1.000e-04  4.511e-06  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.231e-01  2.390e-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.169e+00  2.029e-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: 5.42e-08 ph cm-2 s-1
Energy Flux Upper Limit: 4.20e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/196387/likelihoodResults_382924801_383184001_4FGL_J1158.5+4824_daily_bin554.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) = 5656.23134712
delta logL = -0.000676651679896

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 5656.23067046
delta logL = 1.04673745227e-08

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.4352       1.0000          .0000       10.000    
     3 'Normalizat'    1.1690       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .72306       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.
 MIGRAD TERMINATED WITHOUT CONVERGENCE.

 FCN=   5656.231     FROM MIGRAD    STATUS=FAILED        92 CALLS      244 TOTAL
                     EDM=   .67E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10147E-03    468.43        .18142E-02** at limit **
   2  Index         2.2870        6.2059        .50000        .61877E-05
   3  Normalizat    1.1690        .35870E-01    .21137E-03    .37650E-06
   4  Prefactor     .72306        .43917E-01    .32032E-03    .14551E-05
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   5656.231     FROM SIMPLEX   STATUS=PROGRESS     142 CALLS      386 TOTAL
                     EDM=   .74E-05    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10078E-03    468.43        .39082E-03** at limit **
   2  Index         2.2868        6.2059        .72897E-04    .61877E-05
   3  Normalizat    1.1690        .35870E-01    .69960E-06    .37650E-06
   4  Prefactor     .72305        .43917E-01    .13315E-05    .14551E-05
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   5656.231     FROM MIGRAD    STATUS=CONVERGED     44 CALLS      430 TOTAL
                     EDM=   .21E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    16.459        .36285E-03** at limit **
   2  Index         2.0259        5.1742        .50000       -.10070E-06
   3  Normalizat    1.1690        .19255        .84549E-05    .84174E-04
   4  Prefactor     .72306        .23560        .12813E-04    .50220E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Index      = 2.0259
  Normalizat = 1.16903
  Prefactor  = 0.723055
 **********
 **   18 **HESSE 
 **********

 FCN=   5656.231     FROM HESSE     STATUS=OK            29 CALLS      459 TOTAL
                     EDM=   .70E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    7.7030        .72569E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         2.0259        8.7965        .50000       -.63704    
   3  Normalizat    1.1690        .19225        .16910E-05   -.87565    
   4  Prefactor     .72306        .23518        .25626E-05   -1.0263    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 7.02103e-11
Minuit parameter uncertainties:
  1  6.67281e-05
  2  242.086
  3  0.19237
  4  0.235503
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/196387': 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) = 5656.23066999
delta logL = 4.80451490148e-07

Extracting fit parameters...

4FGL J1158.5+4824
   Spectrum: PowerLaw
349    Prefactor:  1.000e-04  6.673e-05  1.000e-04  1.000e+04 ( 1.000e-13)
350        Index:  2.026e+00  2.421e+02  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.231e-01  2.355e-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.169e+00  1.924e-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/196387/cmap_HighResolution_382924801_383184001_4FGL_J1158.5+4824_daily_bin554.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='4.20e-03', job_status='DONE', photon_flux_upper_limit='5.42e-08', time_completed='2021-09-04 17:44:41.664238', job_id='196387', GAL2='0.72', fit_tolerance='1e-08', EG2='1.17', EG='1.17', time_epoch_completed='1630802681.66', return_code2='0', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.72', dlogl='4.80e-07', ts2='-0.00', photon_index_error='0.00', photon_index='2.44' WHERE bin_id='554' AND source_name='4FGL J1158.5+4824' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sat Sep  4 17:44:41 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0261>
Subject: Job 196387: <4FGL_J1158.5+4824_daily_bin554> in cluster <slac> Done

Job <4FGL_J1158.5+4824_daily_bin554> was submitted from host <rhel6-64p> by user <kocevski> in cluster <slac> at Sat Sep  4 17:31:38 2021
Job was executed on host(s) <bullet0261>, in queue <medium>, as user <kocevski> in cluster <slac> at Sat Sep  4 17:31:39 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:31:39 2021
Terminated at Sat Sep  4 17:44:42 2021
Results reported at Sat Sep  4 17:44:42 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1158.5+4824_daily_bin554 179.637 48.4161 382924801 383184001 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 :                                   764.00 sec.
    Max Memory :                                 1257 MB
    Average Memory :                             347.33 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   782 sec.
    Turnaround time :                            784 sec.

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

