aklog: Couldn't determine realm of user:aklog: unknown RPC error (-1765328189)  while getting realm
/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 106 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 = 14587
number of fields = 30
RA_SUN column already exists. File will not be modified.
Done.


Performing analysis on: 4FGL_J0840.8+1317_weekly_bin505
RA = 130.222, Dec = 13.2871
tmin = 544406401, tmax = 545011201
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='249332', job_status='RUN', time_executed='2021-07-14 02:27:08.698323', time_epoch_executed='1626254828.7' WHERE source_name='4FGL J0840.8+1317' and cadence='weekly' and bin_id='505'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/249332

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

Retrieving the FT1 file...

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

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

Retrieving 97 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/249332/ft1_4FGL_J0840.8+1317_weekly_bin505.fits


Retrieving the FT1 file...

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

Retrieving 97 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/249332/ft2_4FGL_J0840.8+1317_weekly_bin505.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/249332/ft1_4FGL_J0840.8+1317_weekly_bin505.fits outfile=/scratch/kocevski/249332/ft1_filteredMKT_4FGL_J0840.8+1317_weekly_bin505.fits ra=130.222 dec=13.2871 rad=12.0 tmin=544406401.0 tmax=545011201.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 12.43
user 11.95
sys 0.36

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/249332/ft2_4FGL_J0840.8+1317_weekly_bin505.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/249332/ft2_4FGL_J0840.8+1317_weekly_bin505.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/249332/ft1_filteredMKT_4FGL_J0840.8+1317_weekly_bin505.fits evtable="EVENTS" outfile="/scratch/kocevski/249332/ft1_filtered_4FGL_J0840.8+1317_weekly_bin505.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.57
user 0.39
sys 0.14

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/249332/ft1_filtered_4FGL_J0840.8+1317_weekly_bin505.fits" evtable="EVENTS" scfile=/scratch/kocevski/249332/ft2_4FGL_J0840.8+1317_weekly_bin505.fits sctable="SC_DATA" outfile=/scratch/kocevski/249332/ltcube_544406401_545011201_4FGL_J0840.8+1317_weekly_bin505.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/249332/ft2_4FGL_J0840.8+1317_weekly_bin505.fits
.....................!
real 22.95
user 22.51
sys 0.35

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/249332/ft1_filtered_4FGL_J0840.8+1317_weekly_bin505.fits evtable="EVENTS" scfile=/scratch/kocevski/249332/ft2_4FGL_J0840.8+1317_weekly_bin505.fits sctable="SC_DATA" expcube=/scratch/kocevski/249332/ltcube_544406401_545011201_4FGL_J0840.8+1317_weekly_bin505.fits outfile=/scratch/kocevski/249332/expmap_544406401_545011201_4FGL_J0840.8+1317_weekly_bin505.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/249332/ltcube_544406401_545011201_4FGL_J0840.8+1317_weekly_bin505.fits
.....................!
real 191.24
user 184.84
sys 5.65

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

Setting source of interest to:
4FGL J0840.8+1317 @ 130.222 13.2871

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/249332/ft1_filtered_4FGL_J0840.8+1317_weekly_bin505.fits scfile=/scratch/kocevski/249332/ft2_4FGL_J0840.8+1317_weekly_bin505.fits outfile=/scratch/kocevski/249332/cmap_544406401_545011201_4FGL_J0840.8+1317_weekly_bin505.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=130.222 yref=13.2871 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.65
user 0.39
sys 0.17

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/249332/ft1_filtered_4FGL_J0840.8+1317_weekly_bin505.fits scfile=/scratch/kocevski/249332/ft2_4FGL_J0840.8+1317_weekly_bin505.fits outfile=/scratch/kocevski/249332/cmap_HighResolution_544406401_545011201_4FGL_J0840.8+1317_weekly_bin505.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=130.222 yref=13.2871 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.59
user 0.39
sys 0.18

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/249332/ft1_filtered_4FGL_J0840.8+1317_weekly_bin505.fits evtable="EVENTS" scfile=/scratch/kocevski/249332/ft2_4FGL_J0840.8+1317_weekly_bin505.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/249332/Model_4FGL_J0840.8+1317_weekly_bin505.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/249332/ft1_filtered_4FGL_J0840.8+1317_weekly_bin505.fits......................!
real 22.07
user 20.41
sys 1.29

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/249332/ft1_filtered_4FGL_J0840.8+1317_weekly_bin505.fits', '/scratch/kocevski/249332/ft2_4FGL_J0840.8+1317_weekly_bin505.fits', expMap='/scratch/kocevski/249332/expmap_544406401_545011201_4FGL_J0840.8+1317_weekly_bin505.fits', expCube='/scratch/kocevski/249332/ltcube_544406401_545011201_4FGL_J0840.8+1317_weekly_bin505.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/249332/Model_4FGL_J0840.8+1317_weekly_bin505.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J0840.8+1317'

4FGL J0840.8+1317
   Spectrum: PowerLaw
297    Prefactor:  5.096e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-13)
298        Index:  2.494e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
299        Scale:  7.999e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/249332/ft1_filtered_4FGL_J0840.8+1317_weekly_bin505.fits
Spacecraft file(s): /scratch/kocevski/249332/ft2_4FGL_J0840.8+1317_weekly_bin505.fits
Exposure map: /scratch/kocevski/249332/expmap_544406401_545011201_4FGL_J0840.8+1317_weekly_bin505.fits
Exposure cube: /scratch/kocevski/249332/ltcube_544406401_545011201_4FGL_J0840.8+1317_weekly_bin505.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/249332/Model_4FGL_J0840.8+1317_weekly_bin505.xml
Optimizer: MINUIT
Statistic: UNBINNED

Performing an iterative likelihood fit...

Fit tolerance = 1

Performing likelihood fit...
Done.

MINUIT Return Code (Fixed Index): 101
logL (Fixed Index) = 833.015893225

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Fixed Index): 101
logL (Fixed Index) = 831.33091853

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .11859E-01   1.0000         .10000E-03   10000.    
     2 'Prefactor '    6.7548       1.0000         .10000E-03   10000.    
     3 'norm      '    9.7363       1.0000         .10000E-03   10000.    
     4 'norm      '    53.209       1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10151E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .11204E-03   1.0000         .10000E-03   10000.    
     7 'norm      '    .12288E-02   1.0000         .10000E-03   10000.    
     8 'norm      '    4.5204       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .12392E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    .99677E-01   1.0000         .10000E-03   10000.    
    11 'Prefactor '    179.66       1.0000         .10000E-03   10000.    
    12 'norm      '    .10021E-03   1.0000         .10000E-03   10000.    
    13 'Prefactor '    .26163E-01   1.0000         .10000E-03   10000.    
    14 'norm      '    .10306E-01   1.0000         .10000E-03   10000.    
    15 'norm      '    7.4334       1.0000         .10000E-03   10000.    
    16 'Normalizat'    .77651E-01   1.0000         .10000E-01   10.000    
    17 'Prefactor '    1.1871       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5150E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   831.3194     FROM MIGRAD    STATUS=CONVERGED    162 CALLS      400 TOTAL
                     EDM=   .21E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  3.3%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    36.242        .11380E-05** at limit **
   2  Prefactor     .12405E-02    317.42        .27956E-05** at limit **
   3  norm          9.7363        1.0013         .0000         .0000    
   4  norm          54.921        86.406        .29888E-05   -.16048E-02
   5  Prefactor     .10000E-03    57.733        .19299E-06** at limit **
   6  Prefactor     .10000E-03    23.369       -.14850E-05** at limit **
   7  norm          .10536E-03    383.15       -.31417E-05** at limit **
   8  norm          4.5130        3.0146        .19582E-06    .63031E-04
   9  Prefactor     .10020E-03    194.39       -.16133E-05** at limit **
  10  Prefactor     .10000E-03    192.68        .13395E-05** at limit **
  11  Prefactor     178.37        12.669        .16107E-06    .16975E-01
  12  norm          .10000E-03    3.5338        .68138E-07** at limit **
  13  Prefactor     .10000E-03    69.438        .22575E-05** at limit **
  14  norm          .10000E-03    84.795        .20065E-05** at limit **
  15  norm          .80622E-03    344.33        .39157E-05** at limit **
  16  Normalizat    .76066E-01    1.3490       -.35003E-04   -.23066E-05
  17  Prefactor     1.1878        .46888        .64299E-05    .19156E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 0.00124047
  norm       = 9.73628
  norm       = 54.9209
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.000105362
  norm       = 4.51304
  Prefactor  = 0.000100195
  Prefactor  = 0.000100005
  Prefactor  = 178.365
  norm       = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  norm       = 0.00080622
  Normalizat = 0.0760663
  Prefactor  = 1.18776
 **********
 **   18 **HESSE 
 **********
  MNHESS FAILS AND WILL RETURN DIAGONAL MATRIX. 

 FCN=   831.3194     FROM HESSE     STATUS=FAILED        19 CALLS      419 TOTAL
                     EDM=   .21E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=100.0%

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    36.310        .90822E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .12405E-02    668.51        .38596E-02   -1.5715    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          492.52        482.76         .0000       -1.5084    
   4  norm          54.921        1.0159        .29888E-05   -1.4224    
   5  Prefactor     .10000E-03    .20571        .19299E-06   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    .20571       -.14850E-05   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  norm          .10536E-03    .26576       -.31417E-05   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          4.5130        1.0054        .19582E-06   -1.5283    
   9  Prefactor     .10020E-03    .20571       -.16133E-05   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .10000E-03    .22608        .13395E-05   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     178.37        .99646        .16107E-06   -1.3029    
  12  norm          .10000E-03    .20571        .68138E-07   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     .10000E-03    .20945        .22575E-05   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  norm          .10000E-03    .20587        .20065E-05   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          .80622E-03    .33811E-01    .39157E-05   -1.5703    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Normalizat    .76066E-01    .26925       -.35003E-04   -1.4080    
  17  Prefactor     1.1878        1.1076        .64299E-05   -.86709    
                               ERR DEF=  .500    
Minuit fit quality: 1   estimated distance: 2.1383e-10
Minuit parameter uncertainties:
  1  5.18738e-05
  2  1.76639
  3  1.00132
  4  1.01592
  5  2.11383e-06
  6  5.90178e-06
  7  0.0023874
  8  1.00543
  9  0.000400971
  10  6.44436e-05
  11  0.996459
  12  2.75495e-07
  13  5.93431e-06
  14  1.08999e-05
  15  0.00977302
  16  0.268873
  17  1.13051
Done.

MINUIT Return Code (Fixed Index): 101
logL (Fixed Index) = 831.319360127

Extracting fit parameters...

4FGL J0840.8+1317
   Spectrum: PowerLaw
297    Prefactor:  1.784e+02  9.965e-01  1.000e-04  1.000e+04 ( 1.000e-13)
298        Index:  2.494e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
299        Scale:  7.999e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
512    Prefactor:  1.188e+00  1.131e+00  0.000e+00  1.000e+01 ( 1.000e+00)
513        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
514        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
511   Normalization:  7.607e-02  2.689e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 2.33
Ra Dec: 130.222 13.287
Photon Index (Fixed Index): 2.49 +/- 0.00
Photon Flux (Fixed Index): 2.14e-07 +/- 1.19e-09
Energy Flux (Fixed Index): 6.24e-05 +/- 3.49e-07

TS (Fixed Index): 2.33
Ra Dec: 130.222 13.287
Photon Flux Upper Limit: 7.81e-07 ph cm-2 s-1
Energy Flux Upper Limit: 6.07e-02 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/249332/likelihoodResults_544406401_545011201_4FGL_J0840.8+1317_weekly_bin505.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) = 831.319360026
delta logL = 1.01138425634e-07

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 831.319360026
delta logL = 1.01347950476e-07

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    178.37       1.0000         .10000E-03   10000.    
     2 'Index     '    2.4947       1.0000          .0000       10.000    
     3 'Normalizat'    .76066E-01   1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.1877       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5150E+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.

 FCN=   831.3194     FROM MIGRAD    STATUS=CONVERGED     87 CALLS      230 TOTAL
                     EDM=   .82E-11    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     177.74        210.52        .15111E-03   -.67092E-05
   2  Index         2.4962        .83921        .42557E-02    .63673E-05
   3  Normalizat    .76035E-01    1.5631        .79118E-02    .51225E-05
   4  Prefactor     1.1878        .51689        .17189E-03    .17196E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 177.742
  Index      = 2.49617
  Normalizat = 0.0760351
  Prefactor  = 1.18784
 **********
 **   18 **HESSE 
 **********

 FCN=   831.3194     FROM HESSE     STATUS=OK            27 CALLS      257 TOTAL
                     EDM=   .50E-11    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     177.74        207.49        .30221E-04   -1.3034    
   2  Index         2.4962        .82708        .17023E-03   -.52448    
   3  Normalizat    .76035E-01    1.2947        .31647E-03   -1.4080    
   4  Prefactor     1.1878        .46850        .68755E-05   -.86706    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 4.95747e-12
Minuit parameter uncertainties:
  1  208.349
  2  0.832197
  3  0.60042
  4  0.470154
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/249332': 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) = 831.319355554
delta logL = 4.5730129159e-06

Extracting fit parameters...

4FGL J0840.8+1317
   Spectrum: PowerLaw
297    Prefactor:  1.777e+02  2.083e+02  1.000e-04  1.000e+04 ( 1.000e-13)
298        Index:  2.496e+00  8.322e-01  0.000e+00  1.000e+01 (-1.000e+00)
299        Scale:  7.999e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
512    Prefactor:  1.188e+00  4.702e-01  0.000e+00  1.000e+01 ( 1.000e+00)
513        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
514        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
511   Normalization:  7.604e-02  6.004e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 2.31
Ra Dec: 130.222 13.287
Photon Index (Free Index): 2.50 +/- 0.83
Photon Flux (Free Index): 2.13e-07 +/- 2.31e-07
Energy Flux (Free Index): 6.22e-05 +/- 6.53e-05

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/249332/cmap_HighResolution_544406401_545011201_4FGL_J0840.8+1317_weekly_bin505.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='6.07e-02', comment='SUCCESS', photon_flux='2.14e-07', energy_flux2='6.22e-05', photon_flux_error='1.19e-09', dlogl='4.57e-06', energy_flux='6.24e-05', photon_flux2='2.13e-07', job_status='DONE', time_completed='2021-07-14 02:34:39.633737', photon_index_error2='0.83', photon_index2='2.50', ts='2.33', fit_tolerance='1e-08', GAL='1.19', photon_index_error='0.00', photon_flux_upper_limit='7.81e-07', energy_flux_error2='6.53e-05', EG='0.08', time_epoch_completed='1626255279.63', return_code='101', job_id='249332', GAL2='1.19', EG2='0.08', return_code2='0', energy_flux_error='3.49e-07', photon_flux_error2='2.31e-07', ts2='2.31', photon_index='2.49' WHERE bin_id='505' AND source_name='4FGL J0840.8+1317' AND cadence='weekly';

Database successfully updated.


Analysis Complete.


Wed Jul 14 02:34:39 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0274>
Subject: Job 249332: <4FGL_J0840.8+1317_weekly_bin505> in cluster <slac> Done

Job <4FGL_J0840.8+1317_weekly_bin505> was submitted from host <rhel6-64l> by user <kocevski> in cluster <slac> at Wed Jul 14 02:22:34 2021
Job was executed on host(s) <bullet0274>, in queue <medium>, as user <kocevski> in cluster <slac> at Wed Jul 14 02:24:56 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Wed Jul 14 02:24:56 2021
Terminated at Wed Jul 14 02:34:40 2021
Results reported at Wed Jul 14 02:34:40 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J0840.8+1317_weekly_bin505 130.222 13.2871 544406401 545011201 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J0840.8+1317 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   394.25 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             367.55 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   583 sec.
    Turnaround time :                            726 sec.

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

