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


Performing analysis on: 4FGL_J1017.8+0715_daily_bin473
RA = 154.473, Dec = 7.2638
tmin = 361929601, tmax = 362188801
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='780586', job_status='RUN', time_executed='2021-09-01 16:19:38.213588', time_epoch_executed='1630538378.21' WHERE source_name='4FGL J1017.8+0715' and cadence='daily' and bin_id='473'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/780586

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

Retrieving the FT1 file...

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

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

Retrieving 51 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/780586/ft1_4FGL_J1017.8+0715_daily_bin473.fits


Retrieving the FT1 file...

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

Retrieving 51 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/780586/ft2_4FGL_J1017.8+0715_daily_bin473.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/780586/ft1_4FGL_J1017.8+0715_daily_bin473.fits outfile=/scratch/kocevski/780586/ft1_filteredMKT_4FGL_J1017.8+0715_daily_bin473.fits ra=154.473 dec=7.2638 rad=12.0 tmin=361929601.0 tmax=362188801.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 5.62
user 5.31
sys 0.23

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/780586/ft2_4FGL_J1017.8+0715_daily_bin473.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/780586/ft2_4FGL_J1017.8+0715_daily_bin473.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/780586/ft1_filteredMKT_4FGL_J1017.8+0715_daily_bin473.fits evtable="EVENTS" outfile="/scratch/kocevski/780586/ft1_filtered_4FGL_J1017.8+0715_daily_bin473.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.52
user 0.37
sys 0.14

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/780586/ft1_filtered_4FGL_J1017.8+0715_daily_bin473.fits" evtable="EVENTS" scfile=/scratch/kocevski/780586/ft2_4FGL_J1017.8+0715_daily_bin473.fits sctable="SC_DATA" outfile=/scratch/kocevski/780586/ltcube_361929601_362188801_4FGL_J1017.8+0715_daily_bin473.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/780586/ft2_4FGL_J1017.8+0715_daily_bin473.fits
.....................!
real 16.66
user 16.26
sys 0.32

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/780586/ft1_filtered_4FGL_J1017.8+0715_daily_bin473.fits evtable="EVENTS" scfile=/scratch/kocevski/780586/ft2_4FGL_J1017.8+0715_daily_bin473.fits sctable="SC_DATA" expcube=/scratch/kocevski/780586/ltcube_361929601_362188801_4FGL_J1017.8+0715_daily_bin473.fits outfile=/scratch/kocevski/780586/expmap_361929601_362188801_4FGL_J1017.8+0715_daily_bin473.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/780586/ltcube_361929601_362188801_4FGL_J1017.8+0715_daily_bin473.fits
.....................!
real 192.91
user 187.45
sys 4.77

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

Setting source of interest to:
4FGL J1017.8+0715 @ 154.473 7.2638

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/780586/ft1_filtered_4FGL_J1017.8+0715_daily_bin473.fits scfile=/scratch/kocevski/780586/ft2_4FGL_J1017.8+0715_daily_bin473.fits outfile=/scratch/kocevski/780586/cmap_361929601_362188801_4FGL_J1017.8+0715_daily_bin473.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.473 yref=7.2638 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.42
sys 0.13

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/780586/ft1_filtered_4FGL_J1017.8+0715_daily_bin473.fits scfile=/scratch/kocevski/780586/ft2_4FGL_J1017.8+0715_daily_bin473.fits outfile=/scratch/kocevski/780586/cmap_HighResolution_361929601_362188801_4FGL_J1017.8+0715_daily_bin473.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.473 yref=7.2638 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.61
user 0.43
sys 0.13

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/780586/ft1_filtered_4FGL_J1017.8+0715_daily_bin473.fits evtable="EVENTS" scfile=/scratch/kocevski/780586/ft2_4FGL_J1017.8+0715_daily_bin473.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/780586/Model_4FGL_J1017.8+0715_daily_bin473.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/780586/ft1_filtered_4FGL_J1017.8+0715_daily_bin473.fits.....................!
real 61.52
user 59.69
sys 1.23

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/780586/ft1_filtered_4FGL_J1017.8+0715_daily_bin473.fits', '/scratch/kocevski/780586/ft2_4FGL_J1017.8+0715_daily_bin473.fits', expMap='/scratch/kocevski/780586/expmap_361929601_362188801_4FGL_J1017.8+0715_daily_bin473.fits', expCube='/scratch/kocevski/780586/ltcube_361929601_362188801_4FGL_J1017.8+0715_daily_bin473.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/780586/Model_4FGL_J1017.8+0715_daily_bin473.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1017.8+0715'

4FGL J1017.8+0715
   Spectrum: PowerLaw
205    Prefactor:  7.924e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-13)
206        Index:  2.733e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
207        Scale:  6.199e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/780586/ft1_filtered_4FGL_J1017.8+0715_daily_bin473.fits
Spacecraft file(s): /scratch/kocevski/780586/ft2_4FGL_J1017.8+0715_daily_bin473.fits
Exposure map: /scratch/kocevski/780586/expmap_361929601_362188801_4FGL_J1017.8+0715_daily_bin473.fits
Exposure cube: /scratch/kocevski/780586/ltcube_361929601_362188801_4FGL_J1017.8+0715_daily_bin473.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/780586/Model_4FGL_J1017.8+0715_daily_bin473.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) = 6183.30234328

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    2.5983       1.0000         .10000E-03   10000.    
     2 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    27.455       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10025E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    7.0488       1.0000         .10000E-03   10000.    
     6 'norm      '    1.1442       1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    .10041E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    8.8935       1.0000         .10000E-03   10000.    
    12 'norm      '    1.0539       1.0000         .10000E-03   10000.    
    13 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    6.6015       1.0000         .10000E-03   10000.    
    15 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    16 'Prefactor '    .10011E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    .10002E-03   1.0000         .10000E-03   10000.    
    18 'Prefactor '    6.2859       1.0000         .10000E-03   10000.    
    19 'Prefactor '    13.893       1.0000         .10000E-03   10000.    
    20 'Normalizat'    1.6155       1.0000         .10000E-01   10.000    
    21 'Prefactor '    .68168       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .4960E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.
 MACHINE ACCURACY LIMITS FURTHER IMPROVEMENT.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   6183.237     FROM MIGRAD    STATUS=CONVERGED    458 CALLS     1937 TOTAL
                     EDM=   .67E-06    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          2.5981        1.7916         .0000        .52728E-03
   2  norm          .10000E-03    .42743         .0000    ** at limit **
   3  Prefactor     27.458        15.552         .0000       -.15187E-03
   4  Prefactor     .10000E-03    43.964         .0000    ** at limit **
   5  Prefactor     7.0489        44.588         .0000       -.70979E-04
   6  norm          1.1394        20.375         .0000        .12806E-01
   7  Prefactor     .10000E-03    2.8830         .0000    ** at limit **
   8  Prefactor     .10000E-03    30.861         .0000    ** at limit **
   9  Prefactor     .10000E-03    31.107         .0000    ** at limit **
  10  Prefactor     .10000E-03    12.391         .0000    ** at limit **
  11  Prefactor     8.8932        9.2193         .0000       -.85924E-03
  12  norm          1.0539        .98635         .0000       -.19640E-04
  13  Prefactor     .10000E-03    3.5418         .0000    ** at limit **
  14  Prefactor     6.6013        3.6254         .0000        .13177E-03
  15  Prefactor     .10000E-03    7.1805         .0000    ** at limit **
  16  Prefactor     .10000E-03    8.7825         .0000    ** at limit **
  17  norm          .10000E-03    .17915         .0000    ** at limit **
  18  Prefactor     6.2854        7.2515         .0000        .20133E-03
  19  Prefactor     13.893        17.226         .0000        .44248E-04
  20  Normalizat    1.6156        .20159         .0000       -.13960E-04
  21  Prefactor     .68164        .15970         .0000        .10485E-04
                               ERR DEF=  .500    
Final values: 
  norm       = 2.59813
  norm       = 0.0001
  Prefactor  = 27.4579
  Prefactor  = 0.0001
  Prefactor  = 7.04893
  norm       = 1.13936
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 8.89321
  norm       = 1.0539
  Prefactor  = 0.0001
  Prefactor  = 6.60125
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 6.2854
  Prefactor  = 13.893
  Normalizat = 1.61556
  Prefactor  = 0.681639
 **********
 **   18 **HESSE 
 **********

 FCN=   6183.237     FROM HESSE     STATUS=OK           317 CALLS     2254 TOTAL
                     EDM=   .23E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          2.5981        1.7923        .82098E-04   -1.5386    
   2  norm          .10000E-03    .87884        .98629E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     27.458        15.385        .76457E-04   -1.4659    
   4  Prefactor     .10000E-03    44.137        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     7.0489        44.597        .15110E-03   -1.5177    
   6  norm          1.1394        20.075        .21695E-02   -1.5494    
   7  Prefactor     .10000E-03    2.8860        .13038E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     .10000E-03    30.989        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     .10000E-03    31.122        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .10000E-03    12.393        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     8.8932        9.2216        .67202E-03   -1.5111    
  12  norm          1.0539        .99954        .72983E-04   -1.5503    
  13  Prefactor     .10000E-03    3.5708        .14447E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     6.6013        3.6268        .10611E-03   -1.5194    
  15  Prefactor     .10000E-03    7.3208        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     .10000E-03    9.0541        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          .10000E-03    .18269        .64507E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     6.2854        7.1933        .16010E-03   -1.5207    
  19  Prefactor     13.893        17.222        .10746E-03   -1.4962    
  20  Normalizat    1.6156        .23834        .23777E-03   -.74581    
  21  Prefactor     .68164        .18763        .28252E-03   -1.0425    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.34828e-09
Minuit parameter uncertainties:
  1  1.79235
  2  1.3315e-07
  3  15.3871
  4  7.64487e-07
  5  35.499
  6  9.56848
  7  1.49864e-06
  8  0.000209314
  9  0.000205437
  10  3.63014e-07
  11  9.22307
  12  0.999556
  13  3.89915e-07
  14  3.62688
  15  9.32988e-07
  16  4.58108e-07
  17  1.51505e-07
  18  7.1943
  19  17.2283
  20  0.238509
  21  0.187802
Done.

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

Extracting fit parameters...

4FGL J1017.8+0715
   Spectrum: PowerLaw
205    Prefactor:  1.000e-04  2.093e-04  1.000e-04  1.000e+04 ( 1.000e-13)
206        Index:  2.733e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
207        Scale:  6.199e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
493    Prefactor:  6.816e-01  1.878e-01  0.000e+00  1.000e+01 ( 1.000e+00)
494        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
495        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
492   Normalization:  1.616e+00  2.385e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): -0.00
Ra Dec: 154.473 7.264
Photon Flux Upper Limit: 7.16e-08 ph cm-2 s-1
Energy Flux Upper Limit: 5.65e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/780586/likelihoodResults_361929601_362188801_4FGL_J1017.8+0715_daily_bin473.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) = 6183.23726229
delta logL = -0.000153665048856

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 6183.23710943
delta logL = -8.02950125944e-07

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10004E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.9288       1.0000          .0000       10.000    
     3 'Normalizat'    1.6156       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .68164       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .4960E+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=   6183.232     FROM MIGRAD    STATUS=FAILED       285 CALLS      482 TOTAL
                     EDM=   .13E-03    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     2.8478        8187.4        .18142E-01    .59840E-02
   2  Index         1.7806        8.8879        .50000        .35392E-06
   3  Normalizat    1.6162        .71061E-01    .23777E-03   -.21947E-04
   4  Prefactor     .68038        .63752E-01    .28252E-03   -.53680E-04
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   6183.232     FROM SIMPLEX   STATUS=UNCHANGED     95 CALLS      577 TOTAL
                     EDM=   .15E-04    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     2.8478        8187.4        .15003E-02    .59840E-02
   2  Index         1.7806        8.8879        .19055E-02    .35392E-06
   3  Normalizat    1.6162        .71061E-01    .56450E-05   -.21947E-04
   4  Prefactor     .68038        .63752E-01    .53326E-05   -.53680E-04
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   6183.232     FROM MIGRAD    STATUS=CONVERGED     34 CALLS      611 TOTAL
                     EDM=   .19E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     2.8481        70.360        .36285E-02    .20200E-04
   2  Index         1.7805        2.1801        .24208E-01    .27600E-05
   3  Normalizat    1.6162        .22960        .95106E-05   -.10519E-04
   4  Prefactor     .68038        .18741        .11301E-04   -.36820E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 2.84812
  Index      = 1.78055
  Normalizat = 1.61617
  Prefactor  = 0.680384
 **********
 **   18 **HESSE 
 **********

 FCN=   6183.232     FROM HESSE     STATUS=OK            27 CALLS      638 TOTAL
                     EDM=   .22E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     2.8481        70.801        .14514E-03   -1.5370    
   2  Index         1.7805        2.1898        .96830E-03   -.69957    
   3  Normalizat    1.6162        .22950        .19021E-05   -.74564    
   4  Prefactor     .68038        .18727        .22602E-05   -1.0430    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.16255e-11
Minuit parameter uncertainties:
  1  28.4379
  2  2.33148
  3  0.229647
  4  0.187443
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/780586': 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) = 6183.23168009
delta logL = 0.00542853617662

Extracting fit parameters...

4FGL J1017.8+0715
   Spectrum: PowerLaw
205    Prefactor:  2.848e+00  2.844e+01  1.000e-04  1.000e+04 ( 1.000e-13)
206        Index:  1.781e+00  2.331e+00  0.000e+00  1.000e+01 (-1.000e+00)
207        Scale:  6.199e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
493    Prefactor:  6.804e-01  1.874e-01  0.000e+00  1.000e+01 ( 1.000e+00)
494        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
495        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
492   Normalization:  1.616e+00  2.296e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): -0.00
Ra Dec: 154.473 7.264

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/780586/cmap_HighResolution_361929601_362188801_4FGL_J1017.8+0715_daily_bin473.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='5.65e-03', job_status='DONE', photon_flux_upper_limit='7.16e-08', time_completed='2021-09-01 16:29:46.341895', job_id='780586', GAL2='0.68', fit_tolerance='1e-08', EG2='1.62', EG='1.62', time_epoch_completed='1630538986.34', return_code2='0', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.68', dlogl='5.43e-03', ts2='0.01', photon_index_error='0.00', photon_index='2.73' WHERE bin_id='473' AND source_name='4FGL J1017.8+0715' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Wed Sep  1 16:29:46 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0036>
Subject: Job 780586: <4FGL_J1017.8+0715_daily_bin473> in cluster <slac> Done

Job <4FGL_J1017.8+0715_daily_bin473> was submitted from host <rhel6-64k> by user <kocevski> in cluster <slac> at Wed Sep  1 16:15:29 2021
Job was executed on host(s) <bullet0036>, in queue <medium>, as user <kocevski> in cluster <slac> at Wed Sep  1 16:16:34 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Wed Sep  1 16:16:34 2021
Terminated at Wed Sep  1 16:29:46 2021
Results reported at Wed Sep  1 16:29:46 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1017.8+0715_daily_bin473 154.473 7.2638 361929601 362188801 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J1017.8+0715 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   605.37 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             278.29 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   792 sec.
    Turnaround time :                            857 sec.

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

