/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 217 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 = 7415
number of fields = 27
No RA_SUN column yet. Adding RA_SUN/DEC_SUN columns.
Done.


Performing analysis on: 4FGL_J1016.0+0512_daily_bin173
RA = 154.009, Dec = 5.2089
tmin = 284169601, tmax = 284428801
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='769619', job_status='RUN', time_executed='2021-09-01 15:46:18.723457', time_epoch_executed='1630536378.72' WHERE source_name='4FGL J1016.0+0512' and cadence='daily' and bin_id='173'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/769619

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/769619/ft1_4FGL_J1016.0+0512_daily_bin173.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/769619/ft2_4FGL_J1016.0+0512_daily_bin173.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/769619/ft1_4FGL_J1016.0+0512_daily_bin173.fits outfile=/scratch/kocevski/769619/ft1_filteredMKT_4FGL_J1016.0+0512_daily_bin173.fits ra=154.009 dec=5.2089 rad=12.0 tmin=284169601.0 tmax=284428801.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.69
user 3.36
sys 0.22

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/769619/ft2_4FGL_J1016.0+0512_daily_bin173.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/769619/ft2_4FGL_J1016.0+0512_daily_bin173.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/769619/ft1_filteredMKT_4FGL_J1016.0+0512_daily_bin173.fits evtable="EVENTS" outfile="/scratch/kocevski/769619/ft1_filtered_4FGL_J1016.0+0512_daily_bin173.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.35
sys 0.15

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/769619/ft1_filtered_4FGL_J1016.0+0512_daily_bin173.fits" evtable="EVENTS" scfile=/scratch/kocevski/769619/ft2_4FGL_J1016.0+0512_daily_bin173.fits sctable="SC_DATA" outfile=/scratch/kocevski/769619/ltcube_284169601_284428801_4FGL_J1016.0+0512_daily_bin173.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/769619/ft2_4FGL_J1016.0+0512_daily_bin173.fits
.....................!
real 14.40
user 13.40
sys 0.95

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/769619/ft1_filtered_4FGL_J1016.0+0512_daily_bin173.fits evtable="EVENTS" scfile=/scratch/kocevski/769619/ft2_4FGL_J1016.0+0512_daily_bin173.fits sctable="SC_DATA" expcube=/scratch/kocevski/769619/ltcube_284169601_284428801_4FGL_J1016.0+0512_daily_bin173.fits outfile=/scratch/kocevski/769619/expmap_284169601_284428801_4FGL_J1016.0+0512_daily_bin173.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/769619/ltcube_284169601_284428801_4FGL_J1016.0+0512_daily_bin173.fits
.....................!
real 191.33
user 185.97
sys 5.01

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 153 point sources and 0 extended sources

Setting source of interest to:
4FGL J1016.0+0512 @ 154.009 5.2089

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/769619/ft1_filtered_4FGL_J1016.0+0512_daily_bin173.fits scfile=/scratch/kocevski/769619/ft2_4FGL_J1016.0+0512_daily_bin173.fits outfile=/scratch/kocevski/769619/cmap_284169601_284428801_4FGL_J1016.0+0512_daily_bin173.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=154.009 yref=5.2089 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.38
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/769619/ft1_filtered_4FGL_J1016.0+0512_daily_bin173.fits scfile=/scratch/kocevski/769619/ft2_4FGL_J1016.0+0512_daily_bin173.fits outfile=/scratch/kocevski/769619/cmap_HighResolution_284169601_284428801_4FGL_J1016.0+0512_daily_bin173.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=154.009 yref=5.2089 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.39
sys 0.15

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/769619/ft1_filtered_4FGL_J1016.0+0512_daily_bin173.fits evtable="EVENTS" scfile=/scratch/kocevski/769619/ft2_4FGL_J1016.0+0512_daily_bin173.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/769619/Model_4FGL_J1016.0+0512_daily_bin173.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/769619/ft1_filtered_4FGL_J1016.0+0512_daily_bin173.fits.....................!
real 66.68
user 64.74
sys 1.79

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/769619/ft1_filtered_4FGL_J1016.0+0512_daily_bin173.fits', '/scratch/kocevski/769619/ft2_4FGL_J1016.0+0512_daily_bin173.fits', expMap='/scratch/kocevski/769619/expmap_284169601_284428801_4FGL_J1016.0+0512_daily_bin173.fits', expCube='/scratch/kocevski/769619/ltcube_284169601_284428801_4FGL_J1016.0+0512_daily_bin173.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/769619/Model_4FGL_J1016.0+0512_daily_bin173.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1016.0+0512'

4FGL J1016.0+0512
   Spectrum: PowerLaw
210    Prefactor:  6.181e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-13)
211        Index:  2.223e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
212        Scale:  1.475e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/769619/ft1_filtered_4FGL_J1016.0+0512_daily_bin173.fits
Spacecraft file(s): /scratch/kocevski/769619/ft2_4FGL_J1016.0+0512_daily_bin173.fits
Exposure map: /scratch/kocevski/769619/expmap_284169601_284428801_4FGL_J1016.0+0512_daily_bin173.fits
Exposure cube: /scratch/kocevski/769619/ltcube_284169601_284428801_4FGL_J1016.0+0512_daily_bin173.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/769619/Model_4FGL_J1016.0+0512_daily_bin173.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) = 6917.26839151

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    2.1247       1.0000         .10000E-03   10000.    
     2 'norm      '    .44053       1.0000         .10000E-03   10000.    
     3 'Prefactor '    16.173       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .12883E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     6 'norm      '    9.6249       1.0000         .10000E-03   10000.    
     7 'Prefactor '    10.087       1.0000         .10000E-03   10000.    
     8 'Prefactor '    .31071E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    101.01       1.0000         .10000E-03   10000.    
    10 'Prefactor '    .12597E-03   1.0000         .10000E-03   10000.    
    11 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    13 'Prefactor '    .48401E-02   1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10030E-03   1.0000         .10000E-03   10000.    
    15 'norm      '    .65959       1.0000         .10000E-03   10000.    
    16 'Prefactor '    6.2398       1.0000         .10000E-03   10000.    
    17 'Normalizat'    1.5796       1.0000         .10000E-01   10.000    
    18 'Prefactor '    .68540       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .4910E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   6917.216     FROM MIGRAD    STATUS=CONVERGED    405 CALLS     1861 TOTAL
                     EDM=   .75E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  2.1%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          2.1251        1.6441       -.71034E-07    .16305E-03
   2  norm          .44060        .53442        .14241E-06    .35372E-03
   3  Prefactor     16.163        14.409       -.53247E-06    .11729E-03
   4  Prefactor     .10000E-03    56.756        .66642E-06** at limit **
   5  Prefactor     .10000E-03    13.917        .22818E-06** at limit **
   6  norm          9.6154        14.211        .16493E-05    .15199E-03
   7  Prefactor     10.102        17.096        .14616E-05    .27484E-03
   8  Prefactor     .10002E-03    170.51       -.24025E-04** at limit **
   9  Prefactor     100.68        111.94       -.38807E-05    .45192E-04
  10  Prefactor     .10000E-03    26.882       -.11905E-04** at limit **
  11  norm          .10000E-03    .43156       -.98615E-07** at limit **
  12  Prefactor     .10000E-03    1.5220        .78415E-07** at limit **
  13  Prefactor     .74039E-03    1.3146        .59989E-06** at limit **
  14  Prefactor     .10000E-03    4.6414        .10986E-06** at limit **
  15  norm          .65982        .69589        .10362E-06    .15608E-03
  16  Prefactor     6.2331        9.6020       -.18473E-06    .39900E-04
  17  Normalizat    1.5793        .20451        .50411E-05   -.14975E-03
  18  Prefactor     .68550        .15702       -.52969E-05    .21718E-03
                               ERR DEF=  .500    
Final values: 
  norm       = 2.12509
  norm       = 0.440597
  Prefactor  = 16.1627
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 9.61537
  Prefactor  = 10.1017
  Prefactor  = 0.000100022
  Prefactor  = 100.683
  Prefactor  = 0.000100003
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.000740387
  Prefactor  = 0.0001
  norm       = 0.659823
  Prefactor  = 6.23307
  Normalizat = 1.57932
  Prefactor  = 0.685497
 **********
 **   18 **HESSE 
 **********

 FCN=   6917.216     FROM HESSE     STATUS=OK           256 CALLS     2117 TOTAL
                     EDM=   .25E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          2.1251        1.6389        .88271E-04   -1.5416    
   2  norm          .44060        .51881        .63126E-04   -1.5575    
   3  Prefactor     16.163        14.395        .99592E-04   -1.4904    
   4  Prefactor     .10000E-03    57.916        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .10000E-03    13.948        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  norm          9.6154        14.228        .64585E-03   -1.5088    
   7  Prefactor     10.102        17.172        .12616E-03   -1.5072    
   8  Prefactor     .10002E-03    175.89        .21375E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     100.68        112.02        .20001E-03   -1.3698    
  10  Prefactor     .10000E-03    27.680        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  norm          .10000E-03    .44612        .10662E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .10000E-03    1.5294        .10019E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     .74039E-03    2.4306        .32913E-01   -1.5713    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     .10000E-03    4.6822        .17487E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          .65982        .67412        .55498E-03   -1.5546    
  16  Prefactor     6.2331        9.7497        .16070E-03   -1.5209    
  17  Normalizat    1.5793        .22452        .23586E-03   -.75573    
  18  Prefactor     .68550        .17222        .27354E-03   -1.0410    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.50647e-09
Minuit parameter uncertainties:
  1  1.63891
  2  0.518813
  3  14.3977
  4  1.29366e-05
  5  2.62752e-06
  6  14.2327
  7  17.1802
  8  0.00391579
  9  112.256
  10  0.000565257
  11  6.94569e-07
  12  2.57564e-07
  13  0.0789082
  14  7.84613e-06
  15  0.674129
  16  9.75214
  17  0.224667
  18  0.172355
Done.

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

Extracting fit parameters...

4FGL J1016.0+0512
   Spectrum: PowerLaw
210    Prefactor:  1.010e+01  1.718e+01  1.000e-04  1.000e+04 ( 1.000e-13)
211        Index:  2.223e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
212        Scale:  1.475e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
488    Prefactor:  6.855e-01  1.724e-01  0.000e+00  1.000e+01 ( 1.000e+00)
489        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
490        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
487   Normalization:  1.579e+00  2.247e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 1.15
Ra Dec: 154.009 5.209
Photon Index (Fixed Index): 2.22 +/- 0.00
Photon Flux (Fixed Index): 3.28e-08 +/- 5.58e-08
Energy Flux (Fixed Index): 1.41e-05 +/- 2.40e-05

TS (Fixed Index): 1.15
Ra Dec: 154.009 5.209
Photon Flux Upper Limit: 1.18e-07 ph cm-2 s-1
Energy Flux Upper Limit: 9.02e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/769619/likelihoodResults_284169601_284428801_4FGL_J1016.0+0512_daily_bin173.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): 0
logL (Free Index) = 6917.15119327
delta logL = 0.0643106770376

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 6917.1428311
delta logL = 0.0726728457403

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    6.2256       1.0000         .10000E-03   10000.    
     2 'Index     '    2.7688       1.0000          .0000       10.000    
     3 'Normalizat'    1.5477       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .70080       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .4910E+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=   6917.143     FROM MIGRAD    STATUS=FAILED        88 CALLS      322 TOTAL
                     EDM=   .72E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     6.2243        250.29        .16089E-03   -.16310E-02
   2  Index         2.7698        5.8306        .73346E-02   -.46256E-03
   3  Normalizat    1.5464        .39379        .23771E-03   -.92020E-03
   4  Prefactor     .70183        .24113        .27059E-03   -.57773E-03
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   6917.143     FROM SIMPLEX   STATUS=UNCHANGED     91 CALLS      413 TOTAL
                     EDM=   .12E-04    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     6.2243        250.29        .25975E-03   -.16310E-02
   2  Index         2.7698        5.8306        .12297E-02   -.46256E-03
   3  Normalizat    1.5464        .39379        .29346E-03   -.92020E-03
   4  Prefactor     .70183        .24113        .38278E-03   -.57773E-03
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   6917.143     FROM MIGRAD    STATUS=CONVERGED     31 CALLS      444 TOTAL
                     EDM=   .72E-11    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     6.2236        15.685        .64355E-05   -.11341E-03
   2  Index         2.7699        1.5528        .29338E-03   -.20538E-04
   3  Normalizat    1.5464        .23378        .47543E-04   -.16978E-04
   4  Prefactor     .70183        .17825        .54118E-04   -.58821E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 6.22358
  Index      = 2.7699
  Normalizat = 1.54638
  Prefactor  = 0.701834
 **********
 **   18 **HESSE 
 **********

 FCN=   6917.143     FROM HESSE     STATUS=OK            23 CALLS      467 TOTAL
                     EDM=   .72E-11    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     6.2236        15.337        .12871E-05   -1.5209    
   2  Index         2.7699        1.5191        .11735E-04   -.46231    
   3  Normalizat    1.5464        .23323        .95085E-05   -.76483    
   4  Prefactor     .70183        .17802        .10824E-04   -1.0346    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 7.18244e-12
Minuit parameter uncertainties:
  1  15.3467
  2  1.54994
  3  0.233396
  4  0.178164
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/769619': 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) = 6917.14281339
delta logL = 0.0726905628835

Extracting fit parameters...

4FGL J1016.0+0512
   Spectrum: PowerLaw
210    Prefactor:  6.224e+00  1.535e+01  1.000e-04  1.000e+04 ( 1.000e-13)
211        Index:  2.770e+00  1.550e+00  0.000e+00  1.000e+01 (-1.000e+00)
212        Scale:  1.475e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
488    Prefactor:  7.018e-01  1.782e-01  0.000e+00  1.000e+01 ( 1.000e+00)
489        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
490        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
487   Normalization:  1.546e+00  2.334e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 1.36
Ra Dec: 154.009 5.209
Photon Index (Free Index): 2.77 +/- 1.55
Photon Flux (Free Index): 6.09e-08 +/- 8.65e-08
Energy Flux (Free Index): 1.39e-05 +/- 1.36e-05

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/769619/cmap_HighResolution_284169601_284428801_4FGL_J1016.0+0512_daily_bin173.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='9.02e-03', comment='SUCCESS', photon_flux='3.28e-08', energy_flux2='1.39e-05', photon_flux_error='5.58e-08', dlogl='7.27e-02', energy_flux='1.41e-05', photon_flux2='6.09e-08', job_status='DONE', time_completed='2021-09-01 15:56:08.669445', photon_index_error2='1.55', photon_index2='2.77', ts='1.15', fit_tolerance='1e-08', GAL='0.69', photon_index_error='0.00', photon_flux_upper_limit='1.18e-07', energy_flux_error2='1.36e-05', EG='1.58', time_epoch_completed='1630536968.67', return_code='0', job_id='769619', GAL2='0.70', EG2='1.55', return_code2='0', energy_flux_error='2.40e-05', photon_flux_error2='8.65e-08', ts2='1.36', photon_index='2.22' WHERE bin_id='173' AND source_name='4FGL J1016.0+0512' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Wed Sep  1 15:56:08 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0204>
Subject: Job 769619: <4FGL_J1016.0+0512_daily_bin173> in cluster <slac> Done

Job <4FGL_J1016.0+0512_daily_bin173> was submitted from host <rhel6-64d> by user <kocevski> in cluster <slac> at Wed Sep  1 15:40:55 2021
Job was executed on host(s) <bullet0204>, in queue <medium>, as user <kocevski> in cluster <slac> at Wed Sep  1 15:42:28 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Wed Sep  1 15:42:28 2021
Terminated at Wed Sep  1 15:56:09 2021
Results reported at Wed Sep  1 15:56:09 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1016.0+0512_daily_bin173 154.009 5.2089 284169601 284428801 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J1016.0+0512 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   589.00 sec.
    Max Memory :                                 1093 MB
    Average Memory :                             255.21 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   820 sec.
    Turnaround time :                            914 sec.

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

