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


Performing analysis on: 4FGL_J1158.5+4824_daily_bin1353
RA = 179.637, Dec = 48.4161
tmin = 590025601, tmax = 590284801
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='201500', job_status='RUN', time_executed='2021-09-04 17:49:14.361710', time_epoch_executed='1630802954.36' WHERE source_name='4FGL J1158.5+4824' and cadence='daily' and bin_id='1353'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/201500

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/201500/ft1_4FGL_J1158.5+4824_daily_bin1353.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/201500/ft2_4FGL_J1158.5+4824_daily_bin1353.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/201500/ft1_4FGL_J1158.5+4824_daily_bin1353.fits outfile=/scratch/kocevski/201500/ft1_filteredMKT_4FGL_J1158.5+4824_daily_bin1353.fits ra=179.637 dec=48.4161 rad=12.0 tmin=590025601.0 tmax=590284801.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.98
user 3.68
sys 0.22

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/201500/ft2_4FGL_J1158.5+4824_daily_bin1353.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/201500/ft1_filteredMKT_4FGL_J1158.5+4824_daily_bin1353.fits evtable="EVENTS" outfile="/scratch/kocevski/201500/ft1_filtered_4FGL_J1158.5+4824_daily_bin1353.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.62
user 0.33
sys 0.17

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

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/201500/ft1_filtered_4FGL_J1158.5+4824_daily_bin1353.fits evtable="EVENTS" scfile=/scratch/kocevski/201500/ft2_4FGL_J1158.5+4824_daily_bin1353.fits sctable="SC_DATA" expcube=/scratch/kocevski/201500/ltcube_590025601_590284801_4FGL_J1158.5+4824_daily_bin1353.fits outfile=/scratch/kocevski/201500/expmap_590025601_590284801_4FGL_J1158.5+4824_daily_bin1353.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/201500/ltcube_590025601_590284801_4FGL_J1158.5+4824_daily_bin1353.fits
.....................!
real 191.75
user 185.16
sys 5.33

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/201500/ft1_filtered_4FGL_J1158.5+4824_daily_bin1353.fits scfile=/scratch/kocevski/201500/ft2_4FGL_J1158.5+4824_daily_bin1353.fits outfile=/scratch/kocevski/201500/cmap_590025601_590284801_4FGL_J1158.5+4824_daily_bin1353.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.63
user 0.37
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/201500/ft1_filtered_4FGL_J1158.5+4824_daily_bin1353.fits scfile=/scratch/kocevski/201500/ft2_4FGL_J1158.5+4824_daily_bin1353.fits outfile=/scratch/kocevski/201500/cmap_HighResolution_590025601_590284801_4FGL_J1158.5+4824_daily_bin1353.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.60
user 0.37
sys 0.17

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10008E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     6 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    3.1178       1.0000         .10000E-03   10000.    
     8 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     9 'norm      '    .10010E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    45.342       1.0000         .10000E-03   10000.    
    11 'norm      '    1.5407       1.0000         .10000E-03   10000.    
    12 'norm      '    13.874       1.0000         .10000E-03   10000.    
    13 'Prefactor '    3.8632       1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    15 'norm      '    1.8049       1.0000         .10000E-03   10000.    
    16 'Prefactor '    38.778       1.0000         .10000E-03   10000.    
    17 'norm      '    4.0218       1.0000         .10000E-03   10000.    
    18 'norm      '    9.9896       1.0000         .10000E-03   10000.    
    19 'Prefactor '    4.2234       1.0000         .10000E-03   10000.    
    20 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    21 'Prefactor '    .10031E-03   1.0000         .10000E-03   10000.    
    22 'norm      '    2.6463       1.0000         .10000E-03   10000.    
    23 'Prefactor '    .10008E-03   1.0000         .10000E-03   10000.    
    24 'Normalizat'    .84434       1.0000         .10000E-01   10.000    
    25 'Prefactor '    1.2391       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=   6897.658     FROM MIGRAD    STATUS=CONVERGED    572 CALLS     2865 TOTAL
                     EDM=   .31E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .4%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    66.543       -.24812E-04** at limit **
   2  Prefactor     .10000E-03    37.793        .56076E-05** at limit **
   3  Prefactor     .10000E-03    54.911        .15802E-04** at limit **
   4  Prefactor     .10000E-03    30.267       -.13195E-04** at limit **
   5  Prefactor     .10000E-03    22.280        .71058E-06** at limit **
   6  norm          .10000E-03    15.055       -.75766E-05** at limit **
   7  Prefactor     3.1181        5.5275        .16539E-05   -.58179E-03
   8  Prefactor     .10000E-03    11.676        .59087E-06** at limit **
   9  norm          .10000E-03    1.4979        .25499E-06** at limit **
  10  Prefactor     45.335        36.651       -.49348E-05   -.46298E-04
  11  norm          1.5407        .91009        .17393E-06   -.37254E-03
  12  norm          13.874        9.4158        .34701E-07   -.25890E-04
  13  Prefactor     3.8640        4.1168       -.29878E-08   -.42961E-03
  14  Prefactor     .10000E-03    17.211        .11567E-04** at limit **
  15  norm          1.8053        3.3150       -.38287E-06   -.48683E-03
  16  Prefactor     38.777        24.569       -.49730E-06   -.12041E-05
  17  norm          4.0220        2.0904       -.44378E-07   -.22536E-03
  18  norm          9.9895        7.2020       -.20301E-06   -.79967E-04
  19  Prefactor     4.2250        15.843       -.63306E-06   -.55409E-04
  20  Prefactor     .10000E-03    2.4976        .46571E-07** at limit **
  21  Prefactor     .10000E-03    23.337       -.51038E-05** at limit **
  22  norm          2.6463        1.7078       -.13901E-08    .31406E-04
  23  Prefactor     .10000E-03    40.251        .12288E-04** at limit **
  24  Normalizat    .84424        .15453        .20732E-06   -.60973E-05
  25  Prefactor     1.2392        .19221        .15768E-06    .28975E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 3.11806
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 45.335
  norm       = 1.54073
  norm       = 13.8736
  Prefactor  = 3.86405
  Prefactor  = 0.0001
  norm       = 1.80534
  Prefactor  = 38.7766
  norm       = 4.02198
  norm       = 9.98953
  Prefactor  = 4.225
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 2.64629
  Prefactor  = 0.0001
  Normalizat = 0.84424
  Prefactor  = 1.23923
 **********
 **   18 **HESSE 
 **********

 FCN=   6897.658     FROM HESSE     STATUS=OK           427 CALLS     3292 TOTAL
                     EDM=   .63E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    66.598        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    37.794        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     .10000E-03    54.926        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10000E-03    30.329        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .10000E-03    22.282        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  norm          .10000E-03    15.056        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     3.1181        5.4784        .22963E-03   -1.5355    
   8  Prefactor     .10000E-03    11.689        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  norm          .10000E-03    3.2645        .19598E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     45.335        36.507        .59542E-04   -1.4360    
  11  norm          1.5407        .90609        .56338E-04   -1.5460    
  12  norm          13.874        9.4177        .10754E-03   -1.4963    
  13  Prefactor     3.8640        4.0830        .14611E-03   -1.5315    
  14  Prefactor     .10000E-03    17.225        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          1.8053        3.2916        .19979E-03   -1.5439    
  16  Prefactor     38.777        24.426        .64365E-04   -1.4462    
  17  norm          4.0220        2.0901        .82519E-04   -1.5307    
  18  norm          9.9895        7.1717        .12678E-03   -1.5076    
  19  Prefactor     4.2250        15.770        .19608E-03   -1.5297    
  20  Prefactor     .10000E-03    2.5465        .12817E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Prefactor     .10000E-03    23.616        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  norm          2.6463        1.7090        .84738E-04   -1.5383    
  23  Prefactor     .10000E-03    40.344        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Normalizat    .84424        .18061        .24785E-03   -.98448    
  25  Prefactor     1.2392        .22499        .26796E-03   -.85132    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 6.34218e-10
Minuit parameter uncertainties:
  1  1.65467e-05
  2  3.83424e-06
  3  2.78793e-06
  4  1.54915e-06
  5  8.39866e-08
  6  1.56128e-07
  7  5.47928
  8  1.32542e-05
  9  4.32502e-05
  10  36.525
  11  0.906098
  12  9.41874
  13  4.08325
  14  2.14851e-06
  15  3.2919
  16  24.4323
  17  2.09015
  18  7.17229
  19  15.7854
  20  6.58565e-07
  21  3.14294e-05
  22  1.70899
  23  2.55475e-05
  24  0.18074
  25  0.225163
Done.

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

Extracting fit parameters...

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

GAL_V02
   Spectrum: PowerLaw
680    Prefactor:  1.239e+00  2.252e-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:  8.442e-01  1.807e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 8.35
Ra Dec: 179.637 48.416
Photon Index (Fixed Index): 2.44 +/- 0.00
Photon Flux (Fixed Index): 6.52e-08 +/- 4.10e-08
Energy Flux (Fixed Index): 2.02e-05 +/- 1.27e-05

Performing a free index iterative likelihood fit...

Freezing all point sources, except source of interest...

Done.

Freeing candidate source...
Done.

Fit tolerance = 1

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 6897.65441569
delta logL = 0.00343021561366

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 6897.65181643
delta logL = 0.00602947511652

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    36.927       1.0000         .10000E-03   10000.    
     2 'Index     '    2.5011       1.0000          .0000       10.000    
     3 'Normalizat'    .84078       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.2419       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=   6897.652     FROM MIGRAD    STATUS=CONVERGED     61 CALLS      236 TOTAL
                     EDM=   .55E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     36.949        413.33        .16488E-02    .12177E-03
   2  Index         2.5008        3.5571        .12606        .12942E-03
   3  Normalizat    .84062        .93959E-01    .44140E-01    .16446E-04
   4  Prefactor     1.2421        .85877E-01    .60526E-01    .59716E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 36.9493
  Index      = 2.50078
  Normalizat = 0.840622
  Prefactor  = 1.2421
 **********
 **   18 **HESSE 
 **********

 FCN=   6897.652     FROM HESSE     STATUS=OK            33 CALLS      269 TOTAL
                     EDM=   .47E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     36.949        28.424        .32976E-03   -1.4491    
   2  Index         2.5008        .56586        .61712E-02   -.52342    
   3  Normalizat    .84062        .17860        .24831E-03   -.98579    
   4  Prefactor     1.2421        .22588        .26767E-03   -.85045    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 4.65422e-09
Minuit parameter uncertainties:
  1  28.4346
  2  0.567481
  3  0.178722
  4  0.226061
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/201500': 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) = 6897.6518156
delta logL = 0.00603030214825

Extracting fit parameters...

4FGL J1158.5+4824
   Spectrum: PowerLaw
349    Prefactor:  3.695e+01  2.843e+01  1.000e-04  1.000e+04 ( 1.000e-13)
350        Index:  2.501e+00  5.675e-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.242e+00  2.261e-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:  8.406e-01  1.787e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 8.39
Ra Dec: 179.637 48.416
Photon Index (Free Index): 2.50 +/- 0.57
Photon Flux (Free Index): 6.81e-08 +/- 4.49e-08
Energy Flux (Free Index): 1.97e-05 +/- 1.21e-05

Creating a high resolution counts map...
INFO: Auto-setting vmin to -1.000e-01 [aplpy.core]
INFO: Auto-setting vmax to  1.110e+00 [aplpy.core]
Saving /scratch/kocevski/201500/cmap_HighResolution_590025601_590284801_4FGL_J1158.5+4824_daily_bin1353.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='6.52e-08', energy_flux2='1.97e-05', photon_flux_error='4.10e-08', dlogl='6.03e-03', energy_flux='2.02e-05', photon_flux2='6.81e-08', job_status='DONE', time_completed='2021-09-04 18:01:57.293629', photon_index_error2='0.57', photon_index2='2.50', ts='8.35', fit_tolerance='1e-08', GAL='1.24', photon_index_error='0.00', energy_flux_error2='1.21e-05', EG='0.84', time_epoch_completed='1630803717.29', return_code='0', job_id='201500', GAL2='1.24', EG2='0.84', return_code2='0', energy_flux_error='1.27e-05', photon_flux_error2='4.49e-08', ts2='8.39', photon_index='2.44' WHERE bin_id='1353' AND source_name='4FGL J1158.5+4824' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sat Sep  4 18:01:57 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0220>
Subject: Job 201500: <4FGL_J1158.5+4824_daily_bin1353> in cluster <slac> Done

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

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1158.5+4824_daily_bin1353 179.637 48.4161 590025601 590284801 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 :                                   737.15 sec.
    Max Memory :                                 1257 MB
    Average Memory :                             286.56 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   920 sec.
    Turnaround time :                            923 sec.

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

