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


Performing analysis on: 4FGL_J1158.5+4824_daily_bin500
RA = 179.637, Dec = 48.4161
tmin = 368928001, tmax = 369187201
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='196304', job_status='RUN', time_executed='2021-09-04 17:31:51.631281', time_epoch_executed='1630801911.63' WHERE source_name='4FGL J1158.5+4824' and cadence='daily' and bin_id='500'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/196304

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/196304/ft1_4FGL_J1158.5+4824_daily_bin500.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/196304/ft2_4FGL_J1158.5+4824_daily_bin500.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/196304/ft1_4FGL_J1158.5+4824_daily_bin500.fits outfile=/scratch/kocevski/196304/ft1_filteredMKT_4FGL_J1158.5+4824_daily_bin500.fits ra=179.637 dec=48.4161 rad=12.0 tmin=368928001.0 tmax=369187201.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.33
user 3.12
sys 0.18

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

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

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

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/196304/ft1_filtered_4FGL_J1158.5+4824_daily_bin500.fits evtable="EVENTS" scfile=/scratch/kocevski/196304/ft2_4FGL_J1158.5+4824_daily_bin500.fits sctable="SC_DATA" expcube=/scratch/kocevski/196304/ltcube_368928001_369187201_4FGL_J1158.5+4824_daily_bin500.fits outfile=/scratch/kocevski/196304/expmap_368928001_369187201_4FGL_J1158.5+4824_daily_bin500.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/196304/ltcube_368928001_369187201_4FGL_J1158.5+4824_daily_bin500.fits
.....................!
real 190.72
user 185.90
sys 4.44

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/196304/ft1_filtered_4FGL_J1158.5+4824_daily_bin500.fits scfile=/scratch/kocevski/196304/ft2_4FGL_J1158.5+4824_daily_bin500.fits outfile=/scratch/kocevski/196304/cmap_368928001_369187201_4FGL_J1158.5+4824_daily_bin500.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.38
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/196304/ft1_filtered_4FGL_J1158.5+4824_daily_bin500.fits scfile=/scratch/kocevski/196304/ft2_4FGL_J1158.5+4824_daily_bin500.fits outfile=/scratch/kocevski/196304/cmap_HighResolution_368928001_369187201_4FGL_J1158.5+4824_daily_bin500.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.37
sys 0.16

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

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 '    .10001E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    39.309       1.0000         .10000E-03   10000.    
     6 'norm      '    60.817       1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10011E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    .10155E-03   1.0000         .10000E-03   10000.    
     9 'norm      '    3.0709       1.0000         .10000E-03   10000.    
    10 'Prefactor '    .51510       1.0000         .10000E-03   10000.    
    11 'norm      '    3.9745       1.0000         .10000E-03   10000.    
    12 'norm      '    16.155       1.0000         .10000E-03   10000.    
    13 'Prefactor '    .48499       1.0000         .10000E-03   10000.    
    14 'Prefactor '    .20399E-03   1.0000         .10000E-03   10000.    
    15 'norm      '    3.6675       1.0000         .10000E-03   10000.    
    16 'Prefactor '    .10004E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    7.3787       1.0000         .10000E-03   10000.    
    18 'norm      '    2.5723       1.0000         .10000E-03   10000.    
    19 'Prefactor '    7.4085       1.0000         .10000E-03   10000.    
    20 'Prefactor '    15.159       1.0000         .10000E-03   10000.    
    21 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    22 'norm      '    4.3840       1.0000         .10000E-03   10000.    
    23 'Prefactor '    .10011E-03   1.0000         .10000E-03   10000.    
    24 'Normalizat'    1.0632       1.0000         .10000E-01   10.000    
    25 'Prefactor '    .78127       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=   5421.453     FROM MIGRAD    STATUS=CONVERGED    636 CALLS     2551 TOTAL
                     EDM=   .37E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .6%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    21.434       -.60292E-06** at limit **
   2  Prefactor     .10000E-03    46.078       -.38507E-06** at limit **
   3  Prefactor     .10000E-03    28.061        .10654E-06** at limit **
   4  Prefactor     .10000E-03    21.211        .48131E-06** at limit **
   5  Prefactor     39.309        45.005       -.13410E-07   -.62758E-06
   6  norm          60.817        43.192       -.16674E-07   -.10847E-05
   7  Prefactor     .10000E-03    3.5880       -.79290E-08** at limit **
   8  Prefactor     .10000E-03    53.814        .31220E-06** at limit **
   9  norm          3.0719        2.5843        .98762E-06   -.64017E-03
  10  Prefactor     .22994        41.076       -.25570E-05    .74002E-04
  11  norm          3.9763        1.5414       -.38525E-09    .10458E-02
  12  norm          16.152        11.372       -.71872E-07   -.90413E-05
  13  Prefactor     .48492        3.2830        .13617E-05   -.25276E-03
  14  Prefactor     .10000E-03    279.95        .29480E-05** at limit **
  15  norm          3.6672        6.6256       -.20779E-05   -.59419E-03
  16  Prefactor     .10000E-03    6.9496       -.12142E-06** at limit **
  17  norm          7.3785        2.9701        .69158E-08   -.34342E-04
  18  norm          2.5731        6.2560        .34634E-06   -.10661E-03
  19  Prefactor     7.4035        17.287        .49193E-07    .44403E-05
  20  Prefactor     15.158        7.4742       -.21207E-06   -.19069E-03
  21  Prefactor     .10000E-03    11.290       -.30457E-07** at limit **
  22  norm          4.3839        2.0730        .34946E-08    .26585E-04
  23  Prefactor     .10000E-03    88.335        .17068E-06** at limit **
  24  Normalizat    1.0634        .16834        .22702E-07    .61681E-04
  25  Prefactor     .78104        .20402       -.44411E-06    .41884E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 39.3091
  norm       = 60.8172
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 3.07194
  Prefactor  = 0.229936
  norm       = 3.97631
  norm       = 16.1523
  Prefactor  = 0.484919
  Prefactor  = 0.000100002
  norm       = 3.66717
  Prefactor  = 0.0001
  norm       = 7.37852
  norm       = 2.57306
  Prefactor  = 7.40353
  Prefactor  = 15.1582
  Prefactor  = 0.0001
  norm       = 4.38388
  Prefactor  = 0.0001
  Normalizat = 1.06342
  Prefactor  = 0.781038
 **********
 **   18 **HESSE 
 **********

 FCN=   5421.453     FROM HESSE     STATUS=OK           433 CALLS     2984 TOTAL
                     EDM=   .13E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    21.465        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    46.092        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     .10000E-03    28.064        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10000E-03    21.247        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     39.309        45.008        .63930E-04   -1.4453    
   6  norm          60.817        43.193        .51450E-04   -1.4147    
   7  Prefactor     .10000E-03    3.6315        .13617E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     .10000E-03    54.323        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  norm          3.0719        2.7139        .53838E-03   -1.5357    
  10  Prefactor     .22994        52.789        .11617       -1.5612    
  11  norm          3.9763        1.5621        .49827E-04   -1.5309    
  12  norm          16.152        11.379        .99649E-04   -1.4904    
  13  Prefactor     .48492        3.3804        .25732E-03   -1.5569    
  14  Prefactor     .10000E-03    282.62        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          3.6672        7.2482        .21092E-03   -1.5325    
  16  Prefactor     .10000E-03    6.9569        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          7.3785        2.9735        .76638E-04   -1.5165    
  18  norm          2.5731        6.2249        .25449E-03   -1.5387    
  19  Prefactor     7.4035        17.216        .14735E-03   -1.5164    
  20  Prefactor     15.158        7.4947        .10287E-03   -1.4929    
  21  Prefactor     .10000E-03    11.325        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  norm          4.3839        2.0741        .71013E-04   -1.5289    
  23  Prefactor     .10000E-03    88.626        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Normalizat    1.0634        .19597        .21542E-03   -.90935    
  25  Prefactor     .78104        .23643        .30566E-03   -1.0043    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.31903e-09
Minuit parameter uncertainties:
  1  8.89238e-05
  2  8.3461e-05
  3  1.55154e-05
  4  6.51618e-05
  5  45.0474
  6  43.2152
  7  9.38019e-06
  8  0.000300101
  9  2.71398
  10  6.97265
  11  1.56214
  12  11.3805
  13  2.56059
  14  0.00134045
  15  7.24996
  16  1.40181e-05
  17  2.9736
  18  6.22644
  19  17.2276
  20  7.49515
  21  9.40274e-06
  22  2.07413
  23  6.50019e-06
  24  0.196101
  25  0.236736
Done.

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

Extracting fit parameters...

4FGL J1158.5+4824
   Spectrum: PowerLaw
349    Prefactor:  1.000e-04  1.402e-05  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.810e-01  2.367e-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.063e+00  1.961e-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.51e-08 ph cm-2 s-1
Energy Flux Upper Limit: 4.27e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/196304/likelihoodResults_368928001_369187201_4FGL_J1158.5+4824_daily_bin500.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) = 5421.45397294
delta logL = -0.000683675756591

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 5421.45328924
delta logL = 2.28837961913e-08

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10033E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.4296       1.0000          .0000       10.000    
     3 'Normalizat'    1.0634       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .78104       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=   5421.453     FROM MIGRAD    STATUS=FAILED        96 CALLS      248 TOTAL
                     EDM=   .32E-06    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10216E-03    20.613        .18142E-01** at limit **
   2  Index         2.0237        5.5381        .50000        .28174E-05
   3  Normalizat    1.0634        .65996E-02    .21542E-03    .89189E-05
   4  Prefactor     .78104        .81776E-02    .30566E-03   -.34962E-05
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   5421.453     FROM SIMPLEX   STATUS=UNCHANGED    115 CALLS      363 TOTAL
                     EDM=   .10E-04    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10216E-03    20.613        .45620E-03** at limit **
   2  Index         2.0237        5.5381        .12872E-02    .28174E-05
   3  Normalizat    1.0634        .65996E-02    .68199E-05    .89189E-05
   4  Prefactor     .78104        .81776E-02    .10283E-04   -.34962E-05
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   5421.453     FROM MIGRAD    STATUS=CONVERGED     72 CALLS      435 TOTAL
                     EDM=   .30E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    694.15        .40738E-03** at limit **
   2  Index         1.9437        5.7944        .50000       -.15120E-07
   3  Normalizat    1.0634        .18989        .17234E-05    .92355E-05
   4  Prefactor     .78104        .23511        .24453E-05    .92985E-06
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Index      = 1.94373
  Normalizat = 1.06342
  Prefactor  = 0.781037
 **********
 **   18 **HESSE 
 **********

 FCN=   5421.453     FROM HESSE     STATUS=OK            29 CALLS      464 TOTAL
                     EDM=   .11E-11    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    8.4044        .81475E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         1.9437        5.6534        .50000       -.65764    
   3  Normalizat    1.0634        .19592        .34467E-06   -.90935    
   4  Prefactor     .78104        .24295        .48906E-06   -1.0043    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.0831e-12
Minuit parameter uncertainties:
  1  4.46893e-06
  2  225.367
  3  0.19605
  4  0.243281
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/196304': 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) = 5421.45328827
delta logL = 9.93646608549e-07

Extracting fit parameters...

4FGL J1158.5+4824
   Spectrum: PowerLaw
349    Prefactor:  1.000e-04  4.469e-06  1.000e-04  1.000e+04 ( 1.000e-13)
350        Index:  1.944e+00  2.254e+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.810e-01  2.433e-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.063e+00  1.961e-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/196304/cmap_HighResolution_368928001_369187201_4FGL_J1158.5+4824_daily_bin500.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='4.27e-03', job_status='DONE', photon_flux_upper_limit='5.51e-08', time_completed='2021-09-04 17:43:47.095915', job_id='196304', GAL2='0.78', fit_tolerance='1e-08', EG2='1.06', EG='1.06', time_epoch_completed='1630802627.1', return_code2='0', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.78', dlogl='9.94e-07', ts2='-0.00', photon_index_error='0.00', photon_index='2.44' WHERE bin_id='500' AND source_name='4FGL J1158.5+4824' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sat Sep  4 17:43:47 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0217>
Subject: Job 196304: <4FGL_J1158.5+4824_daily_bin500> in cluster <slac> Done

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

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1158.5+4824_daily_bin500 179.637 48.4161 368928001 369187201 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 :                                   714.00 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             320.84 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   734 sec.
    Turnaround time :                            736 sec.

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

