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


Performing analysis on: 4FGL_J0840.8+1317_daily_bin1300
RA = 130.222, Dec = 13.2871
tmin = 576288001, tmax = 576547201
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='614322', job_status='RUN', time_executed='2021-08-30 03:26:56.990799', time_epoch_executed='1630319216.99' WHERE source_name='4FGL J0840.8+1317' and cadence='daily' and bin_id='1300'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/614322

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

Retrieving the FT1 file...

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

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

Retrieving 41 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/614322/ft1_4FGL_J0840.8+1317_daily_bin1300.fits


Retrieving the FT1 file...

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

Retrieving 41 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/614322/ft2_4FGL_J0840.8+1317_daily_bin1300.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/614322/ft1_4FGL_J0840.8+1317_daily_bin1300.fits outfile=/scratch/kocevski/614322/ft1_filteredMKT_4FGL_J0840.8+1317_daily_bin1300.fits ra=130.222 dec=13.2871 rad=12.0 tmin=576288001.0 tmax=576547201.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.31
user 3.08
sys 0.19

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/614322/ft2_4FGL_J0840.8+1317_daily_bin1300.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/614322/ft1_filteredMKT_4FGL_J0840.8+1317_daily_bin1300.fits evtable="EVENTS" outfile="/scratch/kocevski/614322/ft1_filtered_4FGL_J0840.8+1317_daily_bin1300.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.53
user 0.33
sys 0.15

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/614322/ft1_filtered_4FGL_J0840.8+1317_daily_bin1300.fits" evtable="EVENTS" scfile=/scratch/kocevski/614322/ft2_4FGL_J0840.8+1317_daily_bin1300.fits sctable="SC_DATA" outfile=/scratch/kocevski/614322/ltcube_576288001_576547201_4FGL_J0840.8+1317_daily_bin1300.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/614322/ft2_4FGL_J0840.8+1317_daily_bin1300.fits
.....................!
real 10.35
user 10.01
sys 0.30

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/614322/ft1_filtered_4FGL_J0840.8+1317_daily_bin1300.fits evtable="EVENTS" scfile=/scratch/kocevski/614322/ft2_4FGL_J0840.8+1317_daily_bin1300.fits sctable="SC_DATA" expcube=/scratch/kocevski/614322/ltcube_576288001_576547201_4FGL_J0840.8+1317_daily_bin1300.fits outfile=/scratch/kocevski/614322/expmap_576288001_576547201_4FGL_J0840.8+1317_daily_bin1300.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/614322/ltcube_576288001_576547201_4FGL_J0840.8+1317_daily_bin1300.fits
.....................!
real 190.71
user 185.84
sys 4.44

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/614322/ft1_filtered_4FGL_J0840.8+1317_daily_bin1300.fits scfile=/scratch/kocevski/614322/ft2_4FGL_J0840.8+1317_daily_bin1300.fits outfile=/scratch/kocevski/614322/cmap_576288001_576547201_4FGL_J0840.8+1317_daily_bin1300.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.55
user 0.37
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/614322/ft1_filtered_4FGL_J0840.8+1317_daily_bin1300.fits scfile=/scratch/kocevski/614322/ft2_4FGL_J0840.8+1317_daily_bin1300.fits outfile=/scratch/kocevski/614322/cmap_HighResolution_576288001_576547201_4FGL_J0840.8+1317_daily_bin1300.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.54
user 0.37
sys 0.15

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

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/614322/ft1_filtered_4FGL_J0840.8+1317_daily_bin1300.fits', '/scratch/kocevski/614322/ft2_4FGL_J0840.8+1317_daily_bin1300.fits', expMap='/scratch/kocevski/614322/expmap_576288001_576547201_4FGL_J0840.8+1317_daily_bin1300.fits', expCube='/scratch/kocevski/614322/ltcube_576288001_576547201_4FGL_J0840.8+1317_daily_bin1300.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/614322/Model_4FGL_J0840.8+1317_daily_bin1300.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/614322/ft1_filtered_4FGL_J0840.8+1317_daily_bin1300.fits
Spacecraft file(s): /scratch/kocevski/614322/ft2_4FGL_J0840.8+1317_daily_bin1300.fits
Exposure map: /scratch/kocevski/614322/expmap_576288001_576547201_4FGL_J0840.8+1317_daily_bin1300.fits
Exposure cube: /scratch/kocevski/614322/ltcube_576288001_576547201_4FGL_J0840.8+1317_daily_bin1300.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/614322/Model_4FGL_J0840.8+1317_daily_bin1300.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) = 4414.97570385

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    18.145       1.0000         .10000E-03   10000.    
     2 'Prefactor '    288.28       1.0000         .10000E-03   10000.    
     3 'norm      '    .10009E-03   1.0000         .10000E-03   10000.    
     4 'norm      '    1.6987       1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10197E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10005E-03   1.0000         .10000E-03   10000.    
     7 'norm      '    .10319E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    2.3482       1.0000         .10000E-03   10000.    
     9 'Prefactor '    15.301       1.0000         .10000E-03   10000.    
    10 'Prefactor '    7.1992       1.0000         .10000E-03   10000.    
    11 'Prefactor '    39.744       1.0000         .10000E-03   10000.    
    12 'norm      '    .37248       1.0000         .10000E-03   10000.    
    13 'Prefactor '    .10050E-03   1.0000         .10000E-03   10000.    
    14 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
    15 'norm      '    .10002E-03   1.0000         .10000E-03   10000.    
    16 'Normalizat'    .80502       1.0000         .10000E-01   10.000    
    17 'Prefactor '    1.1073       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.

 FCN=   4414.939     FROM MIGRAD    STATUS=CONVERGED    331 CALLS     1595 TOTAL
                     EDM=   .40E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .1%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     18.145        15.475        .47114E-05    .64271E-04
   2  Prefactor     288.01        184.80       -.15965E-03    .75589E-05
   3  norm          .10000E-03    76.691        .45266E-05** at limit **
   4  norm          1.6686        92.046       -.45229E-04   -.42714E-04
   5  Prefactor     .10000E-03    29.662        .14063E-06** at limit **
   6  Prefactor     .10000E-03    9.7974        .92017E-07** at limit **
   7  norm          .10000E-03    .94856       -.34067E-06** at limit **
   8  norm          2.3481        1.3833       -.22988E-06    .20272E-03
   9  Prefactor     15.297        10.483       -.10833E-05    .14844E-03
  10  Prefactor     7.1985        6.9957       -.73534E-06   -.31806E-04
  11  Prefactor     39.743        37.952       -.25346E-05    .33278E-04
  12  norm          .37292        .61549       -.46214E-06   -.17799E-02
  13  Prefactor     .10000E-03    10.214       -.31390E-06** at limit **
  14  norm          .10000E-03    2.7116       -.32546E-07** at limit **
  15  norm          .10000E-03    14.717        .10860E-06** at limit **
  16  Normalizat    .80490        .20932        .46877E-05    .28050E-03
  17  Prefactor     1.1074        .17813        .47789E-05    .24628E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 18.1448
  Prefactor  = 288.009
  norm       = 0.0001
  norm       = 1.66856
  Prefactor  = 0.000100001
  Prefactor  = 0.0001
  norm       = 0.0001
  norm       = 2.34812
  Prefactor  = 15.2975
  Prefactor  = 7.19847
  Prefactor  = 39.7428
  norm       = 0.372919
  Prefactor  = 0.0001
  norm       = 0.0001
  norm       = 0.0001
  Normalizat = 0.804898
  Prefactor  = 1.10739
 **********
 **   18 **HESSE 
 **********

 FCN=   4414.939     FROM HESSE     STATUS=OK           223 CALLS     1818 TOTAL
                     EDM=   .74E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     18.145        15.474        .94024E-04   -1.4856    
   2  Prefactor     288.01        184.75        .11953E-03   -1.2297    
   3  norm          .10000E-03    76.763        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  norm          1.6686        93.659        .32279E-03   -1.5450    
   5  Prefactor     .10000E-03    29.724        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    9.8355        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  norm          .10000E-03    2.7983        .12461E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          2.3481        1.3813        .57625E-04   -1.5401    
   9  Prefactor     15.297        10.416        .10239E-03   -1.4926    
  10  Prefactor     7.1985        6.9896        .14950E-03   -1.5171    
  11  Prefactor     39.743        37.983        .63581E-04   -1.4446    
  12  norm          .37292        .57530        .63892E-03   -1.5586    
  13  Prefactor     .10000E-03    10.301        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  norm          .10000E-03    2.7127        .10686E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          .10000E-03    14.719        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Normalizat    .80490        .24194        .27626E-03   -.99887    
  17  Prefactor     1.1074        .20669        .20853E-03   -.89231    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 7.43018e-10
Minuit parameter uncertainties:
  1  15.4773
  2  185.124
  3  9.59113e-05
  4  25.0427
  5  0.000338949
  6  3.29083e-06
  7  5.74115e-05
  8  1.38129
  9  10.4173
  10  6.99044
  11  38.0065
  12  0.575308
  13  5.93208e-05
  14  5.08799e-06
  15  1.40532e-05
  16  0.242267
  17  0.206844
Done.

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

Extracting fit parameters...

4FGL J0840.8+1317
   Spectrum: PowerLaw
297    Prefactor:  3.974e+01  3.801e+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.107e+00  2.068e-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:  8.049e-01  2.423e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 1.57
Ra Dec: 130.222 13.287
Photon Index (Fixed Index): 2.49 +/- 0.00
Photon Flux (Fixed Index): 4.76e-08 +/- 4.55e-08
Energy Flux (Fixed Index): 1.39e-05 +/- 1.33e-05

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

Saving results to:
/scratch/kocevski/614322/likelihoodResults_576288001_576547201_4FGL_J0840.8+1317_daily_bin1300.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) = 4414.88352463
delta logL = 0.0559561044729

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 4414.88130062
delta logL = 0.058180109706

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    49.003       1.0000         .10000E-03   10000.    
     2 'Index     '    2.2385       1.0000          .0000       10.000    
     3 'Normalizat'    .81581       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.1000       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=   4414.881     FROM MIGRAD    STATUS=CONVERGED     81 CALLS      286 TOTAL
                     EDM=   .35E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     49.008        50.179        .57284E-04   -.63876E-03
   2  Index         2.2384        .71299        .84439E-02   -.33212E-03
   3  Normalizat    .81592        .23743        .27429E-03    .19646E-03
   4  Prefactor     1.0999        .20693        .20910E-03    .35162E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 49.0085
  Index      = 2.23836
  Normalizat = 0.815925
  Prefactor  = 1.09993
 **********
 **   18 **HESSE 
 **********

 FCN=   4414.881     FROM HESSE     STATUS=OK            23 CALLS      309 TOTAL
                     EDM=   .37E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     49.008        49.245        .11457E-04   -1.4307    
   2  Index         2.2384        .69939        .33776E-03   -.58515    
   3  Normalizat    .81592        .23750        .10972E-04   -.99481    
   4  Prefactor     1.0999        .20700        .41820E-04   -.89469    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.66396e-09
Minuit parameter uncertainties:
  1  49.2858
  2  0.702719
  3  0.237802
  4  0.207155
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/614322': 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) = 4414.88130049
delta logL = 0.0581802441156

Extracting fit parameters...

4FGL J0840.8+1317
   Spectrum: PowerLaw
297    Prefactor:  4.901e+01  4.929e+01  1.000e-04  1.000e+04 ( 1.000e-13)
298        Index:  2.238e+00  7.027e-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.100e+00  2.072e-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:  8.159e-01  2.378e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 1.68
Ra Dec: 130.222 13.287
Photon Index (Free Index): 2.24 +/- 0.70
Photon Flux (Free Index): 4.16e-08 +/- 4.43e-08
Energy Flux (Free Index): 1.74e-05 +/- 2.04e-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/614322/cmap_HighResolution_576288001_576547201_4FGL_J0840.8+1317_daily_bin1300.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.15e-02', comment='SUCCESS', photon_flux='4.76e-08', energy_flux2='1.74e-05', photon_flux_error='4.55e-08', dlogl='5.82e-02', energy_flux='1.39e-05', photon_flux2='4.16e-08', job_status='DONE', time_completed='2021-08-30 03:34:50.880623', photon_index_error2='0.70', photon_index2='2.24', ts='1.57', fit_tolerance='1e-08', GAL='1.11', photon_index_error='0.00', photon_flux_upper_limit='1.48e-07', energy_flux_error2='2.04e-05', EG='0.80', time_epoch_completed='1630319690.88', return_code='0', job_id='614322', GAL2='1.10', EG2='0.82', return_code2='0', energy_flux_error='1.33e-05', photon_flux_error2='4.43e-08', ts2='1.68', photon_index='2.49' WHERE bin_id='1300' AND source_name='4FGL J0840.8+1317' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Aug 30 03:34:50 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0104>
Subject: Job 614322: <4FGL_J0840.8+1317_daily_bin1300> in cluster <slac> Done

Job <4FGL_J0840.8+1317_daily_bin1300> was submitted from host <rhel6-64e> by user <kocevski> in cluster <slac> at Mon Aug 30 03:26:13 2021
Job was executed on host(s) <bullet0104>, in queue <medium>, as user <kocevski> in cluster <slac> at Mon Aug 30 03:26:15 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Mon Aug 30 03:26:15 2021
Terminated at Mon Aug 30 03:34:51 2021
Results reported at Mon Aug 30 03:34:51 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J0840.8+1317_daily_bin1300 130.222 13.2871 576288001 576547201 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 :                                   458.47 sec.
    Max Memory :                                 1255 MB
    Average Memory :                             342.38 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   516 sec.
    Turnaround time :                            518 sec.

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

