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


Performing analysis on: 4FGL_J1158.5+4824_daily_bin1460
RA = 179.637, Dec = 48.4161
tmin = 617760001, tmax = 618019201
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='201669', job_status='RUN', time_executed='2021-09-04 17:47:08.419704', time_epoch_executed='1630802828.42' WHERE source_name='4FGL J1158.5+4824' and cadence='daily' and bin_id='1460'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/201669

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/201669/ft1_4FGL_J1158.5+4824_daily_bin1460.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/201669/ft2_4FGL_J1158.5+4824_daily_bin1460.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/201669/ft1_4FGL_J1158.5+4824_daily_bin1460.fits outfile=/scratch/kocevski/201669/ft1_filteredMKT_4FGL_J1158.5+4824_daily_bin1460.fits ra=179.637 dec=48.4161 rad=12.0 tmin=617760001.0 tmax=618019201.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 2.67
user 2.46
sys 0.19

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

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

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

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/201669/ft1_filtered_4FGL_J1158.5+4824_daily_bin1460.fits evtable="EVENTS" scfile=/scratch/kocevski/201669/ft2_4FGL_J1158.5+4824_daily_bin1460.fits sctable="SC_DATA" expcube=/scratch/kocevski/201669/ltcube_617760001_618019201_4FGL_J1158.5+4824_daily_bin1460.fits outfile=/scratch/kocevski/201669/expmap_617760001_618019201_4FGL_J1158.5+4824_daily_bin1460.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/201669/ltcube_617760001_618019201_4FGL_J1158.5+4824_daily_bin1460.fits
.....................!
real 190.44
user 184.99
sys 5.06

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/201669/ft1_filtered_4FGL_J1158.5+4824_daily_bin1460.fits scfile=/scratch/kocevski/201669/ft2_4FGL_J1158.5+4824_daily_bin1460.fits outfile=/scratch/kocevski/201669/cmap_617760001_618019201_4FGL_J1158.5+4824_daily_bin1460.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.56
user 0.39
sys 0.16

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/201669/ft1_filtered_4FGL_J1158.5+4824_daily_bin1460.fits scfile=/scratch/kocevski/201669/ft2_4FGL_J1158.5+4824_daily_bin1460.fits outfile=/scratch/kocevski/201669/cmap_HighResolution_617760001_618019201_4FGL_J1158.5+4824_daily_bin1460.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/201669/ft1_filtered_4FGL_J1158.5+4824_daily_bin1460.fits evtable="EVENTS" scfile=/scratch/kocevski/201669/ft2_4FGL_J1158.5+4824_daily_bin1460.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/201669/Model_4FGL_J1158.5+4824_daily_bin1460.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/201669/ft1_filtered_4FGL_J1158.5+4824_daily_bin1460.fits.....................!
real 52.25
user 50.91
sys 1.15

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10010E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10031E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    200.40       1.0000         .10000E-03   10000.    
     4 'Prefactor '    41.799       1.0000         .10000E-03   10000.    
     5 'Prefactor '    48.931       1.0000         .10000E-03   10000.    
     6 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10095E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    14.213       1.0000         .10000E-03   10000.    
     9 'norm      '    .10067E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    110.00       1.0000         .10000E-03   10000.    
    11 'norm      '    .41218       1.0000         .10000E-03   10000.    
    12 'norm      '    24.993       1.0000         .10000E-03   10000.    
    13 'Prefactor '    .10004E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10345E-03   1.0000         .10000E-03   10000.    
    15 'norm      '    .10006E-03   1.0000         .10000E-03   10000.    
    16 'Prefactor '    .10464E-01   1.0000         .10000E-03   10000.    
    17 'norm      '    1.8125       1.0000         .10000E-03   10000.    
    18 'norm      '    5.8733       1.0000         .10000E-03   10000.    
    19 'Prefactor '    26.959       1.0000         .10000E-03   10000.    
    20 'Prefactor '    3.9709       1.0000         .10000E-03   10000.    
    21 'Prefactor '    25.998       1.0000         .10000E-03   10000.    
    22 'norm      '    2.8976       1.0000         .10000E-03   10000.    
    23 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
    24 'Normalizat'    .96053       1.0000         .10000E-01   10.000    
    25 'Prefactor '    1.1923       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=   6164.515     FROM MIGRAD    STATUS=CONVERGED    596 CALLS     3348 TOTAL
                     EDM=   .41E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .7%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    69.872       -.18856E-06** at limit **
   2  Prefactor     .10000E-03    69.800       -.44031E-07** at limit **
   3  Prefactor     200.22        196.53       -.10273E-05   -.65008E-04
   4  Prefactor     41.758        75.211       -.15437E-06   -.17107E-04
   5  Prefactor     48.882        102.89       -.15216E-06   -.22914E-04
   6  norm          .10000E-03    15.622       -.26599E-07** at limit **
   7  Prefactor     .10000E-03    7.5443        .32647E-07** at limit **
   8  Prefactor     14.217        26.288        .31280E-08   -.12903E-04
   9  norm          .10000E-03    1.2025        .48309E-07** at limit **
  10  Prefactor     110.05        61.910       -.20530E-05   -.12752E-03
  11  norm          .41166        .89810        .91230E-06    .75410E-03
  12  norm          24.994        12.632       -.14071E-06   -.87020E-04
  13  Prefactor     .10000E-03    1.5847        .56829E-07** at limit **
  14  Prefactor     .10000E-03    29.366       -.14167E-06** at limit **
  15  norm          .10000E-03    4.4790        .81596E-07** at limit **
  16  Prefactor     .10402E-03    18.241        .12441E-05** at limit **
  17  norm          1.8123        1.8832        .35771E-07   -.10938E-03
  18  norm          5.8744        6.2858        .80384E-07   -.62562E-04
  19  Prefactor     26.946        23.381       -.31654E-07    .72548E-05
  20  Prefactor     3.9707        4.8284        .14695E-05   -.56943E-03
  21  Prefactor     25.996        19.216        .27494E-07   -.12793E-04
  22  norm          2.8975        1.9409        .22877E-07   -.60394E-04
  23  Prefactor     .10000E-03    77.979        .39009E-06** at limit **
  24  Normalizat    .96077        .18374        .39247E-06   -.27027E-03
  25  Prefactor     1.1921        .21519       -.12992E-05   -.88977E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 200.218
  Prefactor  = 41.7579
  Prefactor  = 48.8818
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 14.2168
  norm       = 0.0001
  Prefactor  = 110.047
  norm       = 0.41166
  norm       = 24.9939
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.000104017
  norm       = 1.81229
  norm       = 5.87445
  Prefactor  = 26.9465
  Prefactor  = 3.97067
  Prefactor  = 25.9961
  norm       = 2.89748
  Prefactor  = 0.0001
  Normalizat = 0.960766
  Prefactor  = 1.19205
 **********
 **   18 **HESSE 
 **********

 FCN=   6164.515     FROM HESSE     STATUS=OK           431 CALLS     3779 TOTAL
                     EDM=   .87E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    69.911        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    69.807        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     200.22        196.87        .14272E-03   -1.2868    
   4  Prefactor     41.758        75.568        .62003E-04   -1.4415    
   5  Prefactor     48.882        102.99        .57327E-04   -1.4309    
   6  norm          .10000E-03    15.622        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    7.6174        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     14.217        26.286        .10624E-03   -1.4954    
   9  norm          .10000E-03    1.2123        .84006E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     110.05        61.377        .38350E-04   -1.3606    
  11  norm          .41166        .87223        .10678E-02   -1.5580    
  12  norm          24.994        12.635        .80127E-04   -1.4708    
  13  Prefactor     .10000E-03    1.6041        .96346E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     .10000E-03    29.417        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          .10000E-03    4.5065        .16224E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     .10402E-03    22.907        .92056E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          1.8123        1.8777        .10469E-03   -1.5439    
  18  norm          5.8744        6.2690        .16571E-03   -1.5223    
  19  Prefactor     26.946        23.362        .77157E-04   -1.4669    
  20  Prefactor     3.9707        4.6395        .88794E-03   -1.5309    
  21  Prefactor     25.996        19.231        .78567E-04   -1.4688    
  22  norm          2.8975        1.9360        .86685E-04   -1.5368    
  23  Prefactor     .10000E-03    78.140        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Normalizat    .96077        .21702        .25539E-03   -.94357    
  25  Prefactor     1.1921        .25245        .28393E-03   -.86576    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 8.65165e-10
Minuit parameter uncertainties:
  1  4.90069e-05
  2  2.86213e-05
  3  197.528
  4  75.7421
  5  103.366
  6  2.67987e-06
  7  3.16538e-06
  8  26.3079
  9  9.02248e-08
  10  61.4127
  11  0.872257
  12  12.6361
  13  3.15687e-06
  14  5.31302e-05
  15  1.71354e-06
  16  0.019193
  17  1.87774
  18  6.26972
  19  23.3703
  20  4.63988
  21  19.2356
  22  1.936
  23  1.32028e-05
  24  0.21722
  25  0.252706
Done.

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

Extracting fit parameters...

4FGL J1158.5+4824
   Spectrum: PowerLaw
349    Prefactor:  1.040e-04  1.919e-02  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.192e+00  2.527e-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.608e-01  2.172e-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: 8.48e-08 ph cm-2 s-1
Energy Flux Upper Limit: 6.57e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/201669/likelihoodResults_617760001_618019201_4FGL_J1158.5+4824_daily_bin1460.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) = 6164.51511655
delta logL = -7.55481960368e-06

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 6164.09965501
delta logL = 0.415453984991

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    15.076       1.0000         .10000E-03   10000.    
     2 'Index     '    1.5022       1.0000          .0000       10.000    
     3 'Normalizat'    .97924       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.1569       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=   6164.100     FROM MIGRAD    STATUS=CONVERGED     51 CALLS      292 TOTAL
                     EDM=   .17E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY= 15.1%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     15.074        18.713       -.49094E-05    .55540E-03
   2  Index         1.5021        .38582        .61534E-05    .44528E-03
   3  Normalizat    .97924        .17321       -.41213E-06   -.45650E-04
   4  Prefactor     1.1569        .21342        .72307E-06   -.74823E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 15.0739
  Index      = 1.50215
  Normalizat = 0.979238
  Prefactor  = 1.15692
 **********
 **   18 **HESSE 
 **********

 FCN=   6164.100     FROM HESSE     STATUS=OK            31 CALLS      323 TOTAL
                     EDM=   .78E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     15.074        21.219        .10315E-03   -1.4931    
   2  Index         1.5021        .59913        .99661E-02   -.77480    
   3  Normalizat    .97924        .20433        .25323E-03   -.93729    
   4  Prefactor     1.1569        .25172        .28750E-03   -.87667    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 7.75051e-09
Minuit parameter uncertainties:
  1  21.2293
  2  0.601972
  3  0.204496
  4  0.25198
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/201669': 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) = 6164.09965499
delta logL = 0.415453999791

Extracting fit parameters...

4FGL J1158.5+4824
   Spectrum: PowerLaw
349    Prefactor:  1.507e+01  2.123e+01  1.000e-04  1.000e+04 ( 1.000e-13)
350        Index:  1.502e+00  6.020e-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.157e+00  2.520e-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.792e-01  2.045e-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/201669/cmap_HighResolution_617760001_618019201_4FGL_J1158.5+4824_daily_bin1460.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='6.57e-03', job_status='DONE', photon_flux_upper_limit='8.48e-08', time_completed='2021-09-04 18:00:38.077383', job_id='201669', GAL2='1.16', fit_tolerance='1e-08', EG2='0.98', EG='0.96', time_epoch_completed='1630803638.08', return_code2='0', ts='-0.00', comment='SUCCESS', return_code='0', GAL='1.19', dlogl='4.15e-01', ts2='0.85', photon_index_error='0.00', photon_index='2.44' WHERE bin_id='1460' AND source_name='4FGL J1158.5+4824' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sat Sep  4 18:00:38 PDT 2021


------------------------------------------------------------
Sender: LSF System <scs@bullet0256>
Subject: Job 201669: <4FGL_J1158.5+4824_daily_bin1460> in cluster <slac> Done

Job <4FGL_J1158.5+4824_daily_bin1460> was submitted from host <rhel6-64d> by user <kocevski> in cluster <slac> at Sat Sep  4 17:46:50 2021
Job was executed on host(s) <bullet0256>, in queue <medium>, as user <kocevski> in cluster <slac> at Sat Sep  4 17:46:51 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:51 2021
Terminated at Sat Sep  4 18:00:38 2021
Results reported at Sat Sep  4 18:00:38 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1158.5+4824_daily_bin1460 179.637 48.4161 617760001 618019201 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 :                                   805.00 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             331.96 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   827 sec.
    Turnaround time :                            828 sec.

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

