/nfs/farm/g/glast/g/LCRepository/bin/miniconda2/envs/fermitools_v1.0.5/lib/python2.7/site-packages/matplotlib/font_manager.py:281: UserWarning: Matplotlib is building the font cache using fc-list. This may take a moment.
  'Matplotlib is building the font cache using fc-list. '
/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 83 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 = 7461
number of fields = 29
RA_SUN column already exists. File will not be modified.
Done.


Performing analysis on: 4FGL_J1017.8+0715_daily_bin640
RA = 154.473, Dec = 7.2638
tmin = 405216001, tmax = 405475201
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='780829', job_status='RUN', time_executed='2021-09-01 16:19:50.977182', time_epoch_executed='1630538390.98' WHERE source_name='4FGL J1017.8+0715' and cadence='daily' and bin_id='640'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/780829

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/780829/ft1_4FGL_J1017.8+0715_daily_bin640.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/780829/ft2_4FGL_J1017.8+0715_daily_bin640.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/780829/ft1_4FGL_J1017.8+0715_daily_bin640.fits outfile=/scratch/kocevski/780829/ft1_filteredMKT_4FGL_J1017.8+0715_daily_bin640.fits ra=154.473 dec=7.2638 rad=12.0 tmin=405216001.0 tmax=405475201.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.43
user 3.20
sys 0.19

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/780829/ft2_4FGL_J1017.8+0715_daily_bin640.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/780829/ft1_filteredMKT_4FGL_J1017.8+0715_daily_bin640.fits evtable="EVENTS" outfile="/scratch/kocevski/780829/ft1_filtered_4FGL_J1017.8+0715_daily_bin640.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.54
user 0.35
sys 0.16

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

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/780829/ft1_filtered_4FGL_J1017.8+0715_daily_bin640.fits evtable="EVENTS" scfile=/scratch/kocevski/780829/ft2_4FGL_J1017.8+0715_daily_bin640.fits sctable="SC_DATA" expcube=/scratch/kocevski/780829/ltcube_405216001_405475201_4FGL_J1017.8+0715_daily_bin640.fits outfile=/scratch/kocevski/780829/expmap_405216001_405475201_4FGL_J1017.8+0715_daily_bin640.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/780829/ltcube_405216001_405475201_4FGL_J1017.8+0715_daily_bin640.fits
.....................!
real 192.44
user 186.86
sys 5.11

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/780829/ft1_filtered_4FGL_J1017.8+0715_daily_bin640.fits scfile=/scratch/kocevski/780829/ft2_4FGL_J1017.8+0715_daily_bin640.fits outfile=/scratch/kocevski/780829/cmap_405216001_405475201_4FGL_J1017.8+0715_daily_bin640.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.58
user 0.40
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/780829/ft1_filtered_4FGL_J1017.8+0715_daily_bin640.fits scfile=/scratch/kocevski/780829/ft2_4FGL_J1017.8+0715_daily_bin640.fits outfile=/scratch/kocevski/780829/cmap_HighResolution_405216001_405475201_4FGL_J1017.8+0715_daily_bin640.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.58
user 0.40
sys 0.16

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

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/780829/ft1_filtered_4FGL_J1017.8+0715_daily_bin640.fits', '/scratch/kocevski/780829/ft2_4FGL_J1017.8+0715_daily_bin640.fits', expMap='/scratch/kocevski/780829/expmap_405216001_405475201_4FGL_J1017.8+0715_daily_bin640.fits', expCube='/scratch/kocevski/780829/ltcube_405216001_405475201_4FGL_J1017.8+0715_daily_bin640.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/780829/Model_4FGL_J1017.8+0715_daily_bin640.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/780829/ft1_filtered_4FGL_J1017.8+0715_daily_bin640.fits
Spacecraft file(s): /scratch/kocevski/780829/ft2_4FGL_J1017.8+0715_daily_bin640.fits
Exposure map: /scratch/kocevski/780829/expmap_405216001_405475201_4FGL_J1017.8+0715_daily_bin640.fits
Exposure cube: /scratch/kocevski/780829/ltcube_405216001_405475201_4FGL_J1017.8+0715_daily_bin640.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/780829/Model_4FGL_J1017.8+0715_daily_bin640.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) = 6785.6356097

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    2.2155       1.0000         .10000E-03   10000.    
     2 'norm      '    .16365       1.0000         .10000E-03   10000.    
     3 'Prefactor '    .97763       1.0000         .10000E-03   10000.    
     4 'Prefactor '    33.142       1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10034E-03   1.0000         .10000E-03   10000.    
     6 'norm      '    13.590       1.0000         .10000E-03   10000.    
     7 'Prefactor '    11.037       1.0000         .10000E-03   10000.    
     8 'Prefactor '    .30177E-02   1.0000         .10000E-03   10000.    
     9 'Prefactor '    20.562       1.0000         .10000E-03   10000.    
    10 'Prefactor '    46.995       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .13965E-03   1.0000         .10000E-03   10000.    
    12 'norm      '    5.0396       1.0000         .10000E-03   10000.    
    13 'Prefactor '    10.609       1.0000         .10000E-03   10000.    
    14 'Prefactor '    1.0978       1.0000         .10000E-03   10000.    
    15 'Prefactor '    6.1025       1.0000         .10000E-03   10000.    
    16 'Prefactor '    10.421       1.0000         .10000E-03   10000.    
    17 'norm      '    .43616       1.0000         .10000E-03   10000.    
    18 'Prefactor '    3.2056       1.0000         .10000E-03   10000.    
    19 'Prefactor '    20.868       1.0000         .10000E-03   10000.    
    20 'Normalizat'    1.5077       1.0000         .10000E-01   10.000    
    21 'Prefactor '    .66341       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.

 FCN=   6785.614     FROM MIGRAD    STATUS=CONVERGED    463 CALLS     2264 TOTAL
                     EDM=   .32E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  2.7%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          2.2155        1.3891        .79529E-07   -.27428E-04
   2  norm          .16371        .51027        .19753E-06   -.67230E-03
   3  Prefactor     .85052        14.672       -.12736E-06   -.27072E-03
   4  Prefactor     33.139        30.052       -.19594E-07   -.73514E-05
   5  Prefactor     .10000E-03    25.688        .14050E-06** at limit **
   6  norm          13.697        23.992        .18777E-05   -.33169E-04
   7  Prefactor     11.049        22.020        .42654E-06    .51392E-04
   8  Prefactor     .10001E-03    306.18       -.99999E-05** at limit **
   9  Prefactor     20.551        27.205        .61948E-07    .13961E-04
  10  Prefactor     46.945        98.835        .29174E-06   -.72334E-07
  11  Prefactor     .10000E-03    30.958       -.48262E-05** at limit **
  12  norm          5.0394        1.7145        .53578E-08   -.39994E-04
  13  Prefactor     10.608        8.6514        .95668E-07    .27812E-04
  14  Prefactor     1.0976        2.0956        .45985E-06    .40413E-03
  15  Prefactor     6.0965        7.5982        .15472E-06   -.34461E-04
  16  Prefactor     10.417        7.6960       -.98383E-07    .25969E-04
  17  norm          .43601        .71728        .15824E-06    .84336E-04
  18  Prefactor     3.2050        8.7607        .11775E-06    .13155E-04
  19  Prefactor     20.878        20.482       -.11559E-06   -.43952E-04
  20  Normalizat    1.5079        .19708        .20147E-06   -.41397E-04
  21  Prefactor     .66341        .15293       -.45925E-06   -.11637E-04
                               ERR DEF=  .500    
Final values: 
  norm       = 2.21555
  norm       = 0.163713
  Prefactor  = 0.850523
  Prefactor  = 33.1392
  Prefactor  = 0.0001
  norm       = 13.6971
  Prefactor  = 11.0494
  Prefactor  = 0.000100012
  Prefactor  = 20.5509
  Prefactor  = 46.945
  Prefactor  = 0.0001
  norm       = 5.03938
  Prefactor  = 10.6076
  Prefactor  = 1.09762
  Prefactor  = 6.09653
  Prefactor  = 10.4175
  norm       = 0.43601
  Prefactor  = 3.20503
  Prefactor  = 20.8779
  Normalizat = 1.5079
  Prefactor  = 0.663414
 **********
 **   18 **HESSE 
 **********

 FCN=   6785.614     FROM HESSE     STATUS=OK           337 CALLS     2601 TOTAL
                     EDM=   .50E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          2.2155        1.3835        .72609E-04   -1.5410    
   2  norm          .16371        .64136        .93773E-03   -1.5627    
   3  Prefactor     .85052        222.74        .47530E-02   -1.5524    
   4  Prefactor     33.139        30.045        .69605E-04   -1.4556    
   5  Prefactor     .10000E-03    25.736        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  norm          13.697        31.807        .10865E-03   -1.4968    
   7  Prefactor     11.049        21.658        .12060E-03   -1.5043    
   8  Prefactor     .10001E-03    308.59        .19822E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     20.551        27.207        .88329E-04   -1.4801    
  10  Prefactor     46.945        97.463        .58490E-04   -1.4337    
  11  Prefactor     .10000E-03    30.228        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  norm          5.0394        1.7132        .59985E-04   -1.5259    
  13  Prefactor     10.608        8.6458        .12301E-03   -1.5056    
  14  Prefactor     1.0976        1.7856        .16108E-02   -1.5498    
  15  Prefactor     6.0965        7.6342        .16252E-03   -1.5214    
  16  Prefactor     10.417        7.6633        .12412E-03   -1.5062    
  17  norm          .43601        .68195        .69142E-03   -1.5576    
  18  Prefactor     3.2050        8.7598        .22629E-03   -1.5350    
  19  Prefactor     20.878        20.513        .87680E-04   -1.4794    
  20  Normalizat    1.5079        .23397        .24005E-03   -.77557    
  21  Prefactor     .66341        .17791        .28615E-03   -1.0498    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 5.01799e-09
Minuit parameter uncertainties:
  1  1.38355
  2  0.64139
  3  27.6308
  4  30.0586
  5  4.03628e-05
  6  31.8465
  7  21.6737
  8  0.00381009
  9  27.2234
  10  97.7964
  11  2.32515e-05
  12  1.71325
  13  8.6468
  14  1.78572
  15  7.63541
  16  7.66406
  17  0.681966
  18  8.76329
  19  20.5195
  20  0.234138
  21  0.178065
Done.

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

Extracting fit parameters...

4FGL J1017.8+0715
   Spectrum: PowerLaw
205    Prefactor:  1.000e-04  3.810e-03  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.634e-01  1.781e-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.508e+00  2.341e-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: 1.22e-07 ph cm-2 s-1
Energy Flux Upper Limit: 9.66e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/780829/likelihoodResults_405216001_405475201_4FGL_J1017.8+0715_daily_bin640.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) = 6785.61431585
delta logL = -1.52955099111e-05

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 6785.61430064
delta logL = -8.39581844048e-08

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10697E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.7073       1.0000          .0000       10.000    
     3 'Normalizat'    1.5079       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .66342       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=   6784.046     FROM MIGRAD    STATUS=FAILED       262 CALLS      447 TOTAL
                     EDM=   .13E-06    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .16174E-02    .42441E-01    .23380E-04** at limit **
   2  Index         9.6876        9.5728        .28489E-01   -.10965E-04
   3  Normalizat    1.4042        .16937        .24665E-03    .73591E-04
   4  Prefactor     .72281        .13807        .27539E-03    .78891E-04
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   6784.046     FROM SIMPLEX   STATUS=UNCHANGED     85 CALLS      532 TOTAL
                     EDM=   .13E-04    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .16174E-02    .42441E-01    .11872E-04** at limit **
   2  Index         9.6876        9.5728        .97706E-02   -.10965E-04
   3  Normalizat    1.4042        .16937        .20302E-03    .73591E-04
   4  Prefactor     .72281        .13807        .65827E-04    .78891E-04
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   6784.046     FROM MIGRAD    STATUS=CONVERGED     40 CALLS      572 TOTAL
                     EDM=   .43E-12    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .16174E-02    .43513E-01    .46760E-05** at limit **
   2  Index         9.6876        9.5326        .11396E-02   -.51876E-06
   3  Normalizat    1.4042        .21244        .49330E-04    .16132E-05
   4  Prefactor     .72281        .17343        .11015E-04    .55732E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0016174
  Index      = 9.68763
  Normalizat = 1.40419
  Prefactor  = 0.722811
 **********
 **   18 **HESSE 
 **********

 FCN=   6784.046     FROM HESSE     STATUS=OK            25 CALLS      597 TOTAL
                     EDM=   .77E-13    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .16174E-02    .68413E-01    .18704E-06   -1.5700    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         9.6876        7.9170        .45583E-04    1.2155    
   3  Normalizat    1.4042        .22261        .98660E-05   -.80508    
   4  Prefactor     .72281        .18124        .22031E-05   -1.0264    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 7.67013e-14
Minuit parameter uncertainties:
  1  0.0203774
  2  7.177
  3  0.222766
  4  0.181384
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/780829': 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) = 6784.04641115
delta logL = 1.56788939747

Extracting fit parameters...

4FGL J1017.8+0715
   Spectrum: PowerLaw
205    Prefactor:  1.617e-03  2.038e-02  1.000e-04  1.000e+04 ( 1.000e-13)
206        Index:  9.688e+00  7.177e+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:  7.228e-01  1.814e-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.404e+00  2.228e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 3.30
Ra Dec: 154.473 7.264
Photon Index (Free Index): 9.69 +/- 7.18
Photon Flux (Free Index): 9.10e-08 +/- 6.74e-08
Energy Flux (Free Index): 1.02e-05 +/- 8.12e-06

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/780829/cmap_HighResolution_405216001_405475201_4FGL_J1017.8+0715_daily_bin640.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='9.66e-03', comment='SUCCESS', energy_flux2='1.02e-05', dlogl='1.57e+00', photon_flux2='9.10e-08', job_status='DONE', time_completed='2021-09-01 16:30:45.240089', photon_index_error2='7.18', photon_index2='9.69', ts='-0.00', fit_tolerance='1e-08', GAL='0.66', photon_index_error='0.00', photon_flux_upper_limit='1.22e-07', energy_flux_error2='8.12e-06', EG='1.51', time_epoch_completed='1630539045.24', return_code='0', job_id='780829', GAL2='0.72', EG2='1.40', return_code2='0', photon_flux_error2='6.74e-08', ts2='3.30', photon_index='2.73' WHERE bin_id='640' AND source_name='4FGL J1017.8+0715' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Wed Sep  1 16:30:45 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0174>
Subject: Job 780829: <4FGL_J1017.8+0715_daily_bin640> in cluster <slac> Done

Job <4FGL_J1017.8+0715_daily_bin640> was submitted from host <rhel6-64k> by user <kocevski> in cluster <slac> at Wed Sep  1 16:15:45 2021
Job was executed on host(s) <bullet0174>, in queue <medium>, as user <kocevski> in cluster <slac> at Wed Sep  1 16:17:55 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:17:55 2021
Terminated at Wed Sep  1 16:30:46 2021
Results reported at Wed Sep  1 16:30:46 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1017.8+0715_daily_bin640 154.473 7.2638 405216001 405475201 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 :                                   654.44 sec.
    Max Memory :                                 1255 MB
    Average Memory :                             300.74 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   770 sec.
    Turnaround time :                            901 sec.

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

