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


Performing analysis on: 4FGL_J1158.5+4824_daily_bin682
RA = 179.637, Dec = 48.4161
tmin = 416102401, tmax = 416361601
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='197820', job_status='RUN', time_executed='2021-09-04 17:36:38.178017', time_epoch_executed='1630802198.18' WHERE source_name='4FGL J1158.5+4824' and cadence='daily' and bin_id='682'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/197820

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/197820/ft1_4FGL_J1158.5+4824_daily_bin682.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/197820/ft2_4FGL_J1158.5+4824_daily_bin682.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/197820/ft1_4FGL_J1158.5+4824_daily_bin682.fits outfile=/scratch/kocevski/197820/ft1_filteredMKT_4FGL_J1158.5+4824_daily_bin682.fits ra=179.637 dec=48.4161 rad=12.0 tmin=416102401.0 tmax=416361601.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 6.43
user 6.16
sys 0.24

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/197820/ft2_4FGL_J1158.5+4824_daily_bin682.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/197820/ft1_filteredMKT_4FGL_J1158.5+4824_daily_bin682.fits evtable="EVENTS" outfile="/scratch/kocevski/197820/ft1_filtered_4FGL_J1158.5+4824_daily_bin682.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/197820/ft1_filtered_4FGL_J1158.5+4824_daily_bin682.fits" evtable="EVENTS" scfile=/scratch/kocevski/197820/ft2_4FGL_J1158.5+4824_daily_bin682.fits sctable="SC_DATA" outfile=/scratch/kocevski/197820/ltcube_416102401_416361601_4FGL_J1158.5+4824_daily_bin682.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/197820/ft2_4FGL_J1158.5+4824_daily_bin682.fits
.....................!
real 12.14
user 11.49
sys 0.34

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/197820/ft1_filtered_4FGL_J1158.5+4824_daily_bin682.fits evtable="EVENTS" scfile=/scratch/kocevski/197820/ft2_4FGL_J1158.5+4824_daily_bin682.fits sctable="SC_DATA" expcube=/scratch/kocevski/197820/ltcube_416102401_416361601_4FGL_J1158.5+4824_daily_bin682.fits outfile=/scratch/kocevski/197820/expmap_416102401_416361601_4FGL_J1158.5+4824_daily_bin682.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/197820/ltcube_416102401_416361601_4FGL_J1158.5+4824_daily_bin682.fits
.....................!
real 190.84
user 184.98
sys 4.76

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/197820/ft1_filtered_4FGL_J1158.5+4824_daily_bin682.fits scfile=/scratch/kocevski/197820/ft2_4FGL_J1158.5+4824_daily_bin682.fits outfile=/scratch/kocevski/197820/cmap_416102401_416361601_4FGL_J1158.5+4824_daily_bin682.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.55
user 0.37
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/197820/ft1_filtered_4FGL_J1158.5+4824_daily_bin682.fits scfile=/scratch/kocevski/197820/ft2_4FGL_J1158.5+4824_daily_bin682.fits outfile=/scratch/kocevski/197820/cmap_HighResolution_416102401_416361601_4FGL_J1158.5+4824_daily_bin682.fits algorithm="CMAP" ebinalg="LOG" emin=30.0 emax=200000.0 ebinfile=NONE tbinalg="LIN" tbinfile=NONE nxpix=500 nypix=500 binsz=0.1 coordsys="CEL" xref=179.637 yref=48.4161 axisrot=0.0 rafield="RA" decfield="DEC" proj="AIT" hpx_ordering_scheme="RING" hpx_order=3 hpx_ebin=yes hpx_region="" evtable="EVENTS" sctable="SC_DATA" efield="ENERGY" tfield="TIME" chatter=2 clobber=yes debug=no gui=no mode="ql"

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

This is gtbin version HEAD
real 0.55
user 0.38
sys 0.15

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10007E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10006E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    93.471       1.0000         .10000E-03   10000.    
     5 'Prefactor '    .16061E-03   1.0000         .10000E-03   10000.    
     6 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     9 'norm      '    6.6570       1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    11 'norm      '    12.702       1.0000         .10000E-03   10000.    
    12 'norm      '    .10002E-03   1.0000         .10000E-03   10000.    
    13 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    86.547       1.0000         .10000E-03   10000.    
    15 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
    16 'Prefactor '    .10007E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    1.3509       1.0000         .10000E-03   10000.    
    18 'norm      '    .10002E-03   1.0000         .10000E-03   10000.    
    19 'Prefactor '    27.013       1.0000         .10000E-03   10000.    
    20 'Prefactor '    2.4196       1.0000         .10000E-03   10000.    
    21 'Prefactor '    .10007E-03   1.0000         .10000E-03   10000.    
    22 'norm      '    6.9422       1.0000         .10000E-03   10000.    
    23 'Prefactor '    8.5989       1.0000         .10000E-03   10000.    
    24 'Normalizat'    .90410       1.0000         .10000E-01   10.000    
    25 'Prefactor '    1.1445       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=   6767.216     FROM MIGRAD    STATUS=CONVERGED    591 CALLS     2941 TOTAL
                     EDM=   .88E-10  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .2%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    46.403       -.75889E-05** at limit **
   2  Prefactor     .10000E-03    52.249        .73186E-05** at limit **
   3  Prefactor     .10000E-03    41.310       -.52274E-05** at limit **
   4  Prefactor     93.466        82.220       -.31876E-05   -.26188E-05
   5  Prefactor     .10000E-03    241.01        .13508E-06** at limit **
   6  norm          .10000E-03    18.179        .12178E-06** at limit **
   7  Prefactor     .10000E-03    4.0458        .11840E-06** at limit **
   8  Prefactor     .10000E-03    13.073        .81573E-07** at limit **
   9  norm          6.6572        3.5661        .33943E-07   -.43474E-04
  10  Prefactor     .10000E-03    28.540       -.19686E-05** at limit **
  11  norm          12.702        2.2949       -.93944E-07    .59186E-04
  12  norm          .10000E-03    3.8573        .66901E-07** at limit **
  13  Prefactor     .10000E-03    .98259        .17052E-08** at limit **
  14  Prefactor     86.553        72.012        .40168E-05   -.36827E-05
  15  norm          .10000E-03    6.0232       -.26609E-08** at limit **
  16  Prefactor     .10000E-03    34.965        .76572E-05** at limit **
  17  norm          1.3510        1.7037       -.51589E-08   -.54233E-03
  18  norm          .10000E-03    3.4505        .13895E-06** at limit **
  19  Prefactor     27.016        20.252       -.86159E-06   -.32481E-04
  20  Prefactor     2.4197        3.6285       -.18450E-06   -.44637E-03
  21  Prefactor     .10000E-03    10.175        .66028E-07** at limit **
  22  norm          6.9423        2.2830        .20208E-07    .31655E-04
  23  Prefactor     8.6191        91.832        .31251E-04   -.45010E-05
  24  Normalizat    .90403        .16872       -.29724E-06   -.10664E-03
  25  Prefactor     1.1445        .20017       -.65581E-06   -.71816E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 93.4658
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 6.65718
  Prefactor  = 0.0001
  norm       = 12.7015
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 86.553
  norm       = 0.0001
  Prefactor  = 0.0001
  norm       = 1.35097
  norm       = 0.0001
  Prefactor  = 27.0164
  Prefactor  = 2.41965
  Prefactor  = 0.0001
  norm       = 6.94226
  Prefactor  = 8.61905
  Normalizat = 0.904028
  Prefactor  = 1.14452
 **********
 **   18 **HESSE 
 **********

 FCN=   6767.216     FROM HESSE     STATUS=OK           419 CALLS     3360 TOTAL
                     EDM=   .17E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    46.365        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    52.253        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     .10000E-03    41.300        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     93.466        82.607        .41569E-04   -1.3771    
   5  Prefactor     .10000E-03    241.89        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  norm          .10000E-03    18.180        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    4.0813        .16156E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     .10000E-03    13.080        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  norm          6.6572        3.5664        .10941E-03   -1.5192    
  10  Prefactor     .10000E-03    28.559        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  norm          12.702        2.3022        .47251E-04   -1.4995    
  12  norm          .10000E-03    3.8599        .15777E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     .10000E-03    .98855        .79609E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     86.553        72.167        .43185E-04   -1.3845    
  15  norm          .10000E-03    6.1580        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     .10000E-03    35.587        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          1.3510        1.6802        .11535E-03   -1.5476    
  18  norm          .10000E-03    3.4764        .14909E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     27.016        20.302        .77079E-04   -1.4668    
  20  Prefactor     2.4197        3.6213        .18728E-03   -1.5397    
  21  Prefactor     .10000E-03    10.220        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  norm          6.9423        2.2836        .69202E-04   -1.5181    
  23  Prefactor     8.6191        91.086        .13670E-03   -1.5121    
  24  Normalizat    .90403        .19958        .25961E-03   -.96319    
  25  Prefactor     1.1445        .23657        .28708E-03   -.88056    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.7373e-10
Minuit parameter uncertainties:
  1  2.33656e-05
  2  1.44192e-05
  3  4.87947e-06
  4  82.709
  5  0.000232804
  6  2.06753e-06
  7  8.26807e-06
  8  4.90681e-06
  9  3.56656
  10  8.04433e-06
  11  2.30218
  12  5.1647e-06
  13  7.11179e-07
  14  72.2402
  15  9.01298e-06
  16  1.55431e-05
  17  1.68025
  18  9.0702e-06
  19  20.3072
  20  3.62164
  21  4.39544e-06
  22  2.28363
  23  56.1477
  24  0.199745
  25  0.236789
Done.

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

Extracting fit parameters...

4FGL J1158.5+4824
   Spectrum: PowerLaw
349    Prefactor:  1.000e-04  1.554e-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:  1.145e+00  2.368e-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:  9.040e-01  1.997e-01  1.000e-02  1.000e+01 ( 1.000e+00)


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

Saving results to:
/scratch/kocevski/197820/likelihoodResults_416102401_416361601_4FGL_J1158.5+4824_daily_bin682.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) = 6767.21650814
delta logL = -0.000133839704176

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 6767.21650813
delta logL = -0.000133821830786

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .96351E-02   1.0000         .10000E-03   10000.    
     2 'Index     '    2.4426       1.0000          .0000       10.000    
     3 'Normalizat'    .90403       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.1445       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=   6767.071     FROM MIGRAD    STATUS=CONVERGED    106 CALLS      251 TOTAL
                     EDM=   .80E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     9.5200        27.656        .90713E-02   -.18858E-03
   2  Index         1.6061        .91453        .23743       -.51652E-04
   3  Normalizat    .91408        .16303        .44953E-01   -.69614E-04
   4  Prefactor     1.1243        .20280        .65405E-01   -.88631E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 9.52004
  Index      = 1.60611
  Normalizat = 0.914077
  Prefactor  = 1.12429
 **********
 **   18 **HESSE 
 **********

 FCN=   6767.071     FROM HESSE     STATUS=OK            33 CALLS      284 TOTAL
                     EDM=   .22E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     9.5200        20.046        .36285E-03   -1.6325    
   2  Index         1.6061        .79294        .14396E-01   -.74610    
   3  Normalizat    .91408        .19141        .25833E-03   -.95967    
   4  Prefactor     1.1243        .23740        .28932E-03   -.88694    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.24054e-11
Minuit parameter uncertainties:
  1  20.0602
  2  0.799238
  3  0.191557
  4  0.237621
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/197820': 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) = 6767.0710334
delta logL = 0.145340905094

Extracting fit parameters...

4FGL J1158.5+4824
   Spectrum: PowerLaw
349    Prefactor:  9.520e+00  2.006e+01  1.000e-04  1.000e+04 ( 1.000e-13)
350        Index:  1.606e+00  7.992e-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:  1.124e+00  2.376e-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:  9.141e-01  1.916e-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 -2.500e-04 [aplpy.core]
INFO: Auto-setting vmax to  2.775e-03 [aplpy.core]
Saving /scratch/kocevski/197820/cmap_HighResolution_416102401_416361601_4FGL_J1158.5+4824_daily_bin682.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='5.53e-03', job_status='DONE', photon_flux_upper_limit='7.14e-08', time_completed='2021-09-04 17:50:32.267702', job_id='197820', GAL2='1.12', fit_tolerance='1e-08', EG2='0.91', EG='0.90', time_epoch_completed='1630803032.27', return_code2='0', ts='-0.00', comment='SUCCESS', return_code='0', GAL='1.14', dlogl='1.45e-01', ts2='0.30', photon_index_error='0.00', photon_index='2.44' WHERE bin_id='682' AND source_name='4FGL J1158.5+4824' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sat Sep  4 17:50:32 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0221>
Subject: Job 197820: <4FGL_J1158.5+4824_daily_bin682> in cluster <slac> Done

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

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1158.5+4824_daily_bin682 179.637 48.4161 416102401 416361601 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 :                                   831.00 sec.
    Max Memory :                                 1258 MB
    Average Memory :                             331.37 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   846 sec.
    Turnaround time :                            849 sec.

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

