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


Performing analysis on: 4FGL_J0840.8+1317_daily_bin1018
RA = 130.222, Dec = 13.2871
tmin = 503193601, tmax = 503452801
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='612456', job_status='RUN', time_executed='2021-08-30 03:24:56.225891', time_epoch_executed='1630319096.23' WHERE source_name='4FGL J0840.8+1317' and cadence='daily' and bin_id='1018'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/612456

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/612456/ft1_4FGL_J0840.8+1317_daily_bin1018.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/612456/ft2_4FGL_J0840.8+1317_daily_bin1018.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/612456/ft1_4FGL_J0840.8+1317_daily_bin1018.fits outfile=/scratch/kocevski/612456/ft1_filteredMKT_4FGL_J0840.8+1317_daily_bin1018.fits ra=130.222 dec=13.2871 rad=12.0 tmin=503193601.0 tmax=503452801.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 6.40
user 4.83
sys 1.48

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/612456/ft1_filtered_4FGL_J0840.8+1317_daily_bin1018.fits" evtable="EVENTS" scfile=/scratch/kocevski/612456/ft2_4FGL_J0840.8+1317_daily_bin1018.fits sctable="SC_DATA" outfile=/scratch/kocevski/612456/ltcube_503193601_503452801_4FGL_J0840.8+1317_daily_bin1018.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/612456/ft2_4FGL_J0840.8+1317_daily_bin1018.fits
.....................!
real 13.11
user 11.02
sys 2.00

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/612456/ft1_filtered_4FGL_J0840.8+1317_daily_bin1018.fits evtable="EVENTS" scfile=/scratch/kocevski/612456/ft2_4FGL_J0840.8+1317_daily_bin1018.fits sctable="SC_DATA" expcube=/scratch/kocevski/612456/ltcube_503193601_503452801_4FGL_J0840.8+1317_daily_bin1018.fits outfile=/scratch/kocevski/612456/expmap_503193601_503452801_4FGL_J0840.8+1317_daily_bin1018.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/612456/ltcube_503193601_503452801_4FGL_J0840.8+1317_daily_bin1018.fits
.....................!
real 194.54
user 187.73
sys 6.32

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/612456/ft1_filtered_4FGL_J0840.8+1317_daily_bin1018.fits scfile=/scratch/kocevski/612456/ft2_4FGL_J0840.8+1317_daily_bin1018.fits outfile=/scratch/kocevski/612456/cmap_503193601_503452801_4FGL_J0840.8+1317_daily_bin1018.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 1.97
user 0.38
sys 1.24

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/612456/ft1_filtered_4FGL_J0840.8+1317_daily_bin1018.fits scfile=/scratch/kocevski/612456/ft2_4FGL_J0840.8+1317_daily_bin1018.fits outfile=/scratch/kocevski/612456/cmap_HighResolution_503193601_503452801_4FGL_J0840.8+1317_daily_bin1018.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 2.25
user 0.38
sys 1.28

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    8.0805       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .45033       1.0000         .10000E-03   10000.    
     3 'norm      '    .11947E-03   1.0000         .10000E-03   10000.    
     4 'norm      '    .20310       1.0000         .10000E-03   10000.    
     5 'Prefactor '    .22440E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    15.761       1.0000         .10000E-03   10000.    
     7 'norm      '    .10017E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    1.2326       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10013E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    7.7838       1.0000         .10000E-03   10000.    
    11 'Prefactor '    34.890       1.0000         .10000E-03   10000.    
    12 'norm      '    1.3845       1.0000         .10000E-03   10000.    
    13 'Prefactor '    .19015E-02   1.0000         .10000E-03   10000.    
    14 'norm      '    7.1007       1.0000         .10000E-03   10000.    
    15 'norm      '    12.212       1.0000         .10000E-03   10000.    
    16 'Normalizat'    .84911       1.0000         .10000E-01   10.000    
    17 'Prefactor '    1.1136       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.
 MIGRAD TERMINATED WITHOUT CONVERGENCE.

 FCN=   5939.378     FROM MIGRAD    STATUS=FAILED       632 CALLS     1969 TOTAL
                     EDM=   .82E-07    STRATEGY= 1      ERR MATRIX APPROXIMATE

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     8.0821        8.8547        .14104E-03    .10720E-04
   2  Prefactor     .57078        84.741        .23773        .13890E-02
   3  norm          .10000E-03    30.112        .18142E-02** at limit **
   4  norm          .25351E-03    22.661        .92058E-01** at limit **
   5  Prefactor     .10000E-03    86.836        .18142E-02** at limit **
   6  Prefactor     15.764        15.350        .10089E-03    .20284E-04
   7  norm          .10000E-03    .39972        .93866E-04** at limit **
   8  norm          1.2326        .95486        .64327E-04   -.84302E-04
   9  Prefactor     .10000E-03    5.4265        .17405E-02** at limit **
  10  Prefactor     7.7777        6.3541        .71863E-03   -.35881E-03
  11  Prefactor     34.869        36.719        .67845E-04   -.62001E-05
  12  norm          1.3850        .76373        .47596E-04   -.53838E-03
  13  Prefactor     .10238E-03    131.51        .39180E-02** at limit **
  14  norm          7.1022        5.5141        .15054E-03    .78540E-05
  15  norm          12.277        36.920        .11463E-03    .15670E-04
  16  Normalizat    .84978        .21425        .27229E-03    .61377E-05
  17  Prefactor     1.1132        .17827        .20855E-03    .18653E-03
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   5939.378     FROM SIMPLEX   STATUS=PROGRESS     857 CALLS     2826 TOTAL
                     EDM=   .16E-04    STRATEGY= 1      ERR MATRIX APPROXIMATE

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     8.0820        8.8547        .83643E-06   -1.5139    
   2  Prefactor     .57612        84.741        .47051E-04   -1.5556    
   3  norm          .10000E-03    30.112        .10184E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  norm          .25351E-03    22.661        .14681E-06   -1.5705    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .10000E-03    86.836        .76635E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     15.764        15.350        .32052E-07   -1.4914    
   7  norm          .10000E-03    .39972        .82908E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          1.2326        .95486        .33149E-07   -1.5486    
   9  Prefactor     .10000E-03    5.4265        .26629E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     7.7777        6.3541        .32886E-07   -1.5150    
  11  Prefactor     34.869        36.719        .34559E-07   -1.4526    
  12  norm          1.3850        .76373        .33234E-07   -1.5473    
  13  Prefactor     .10238E-03    131.51        .10632E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  norm          7.1022        5.5141        .33619E-07   -1.5175    
  15  norm          12.277        36.920        .37310E-07   -1.5007    
  16  Normalizat    .84978        .21425        .21965E-07   -.98248    
  17  Prefactor     1.1132        .17827        .18851E-07   -.89044    
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   5939.378     FROM MIGRAD    STATUS=CONVERGED    232 CALLS     3058 TOTAL
                     EDM=   .56E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     8.0821        8.8544        .56418E-05    .22569E-04
   2  Prefactor     .57612        89.483        .22640        .66520E-04
   3  norm          .10000E-03    30.112        .36285E-03** at limit **
   4  norm          .25152E-03    19.412        .10287    ** at limit **
   5  Prefactor     .10000E-03    86.865        .36285E-03** at limit **
   6  Prefactor     15.764        15.349        .40354E-05    .20284E-04
   7  norm          .10000E-03    .39972        .18773E-04** at limit **
   8  norm          1.2326        .95484        .25731E-05    .79530E-04
   9  Prefactor     .10000E-03    5.4293        .34810E-03** at limit **
  10  Prefactor     7.7777        6.3531        .28745E-04   -.12260E-04
  11  Prefactor     34.869        36.706        .27138E-05   -.33514E-05
  12  norm          1.3850        .76212        .19039E-05   -.16672E-02
  13  Prefactor     .10000E-03    136.36        .15672E-02** at limit **
  14  norm          7.1022        5.5141        .60216E-05   -.41536E-05
  15  norm          12.277        36.906        .45852E-05   -.40663E-04
  16  Normalizat    .84978        .21440        .10891E-04   -.76616E-04
  17  Prefactor     1.1132        .17843        .41711E-04   -.11317E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 8.08213
  Prefactor  = 0.57612
  norm       = 0.0001
  norm       = 0.000251517
  Prefactor  = 0.0001
  Prefactor  = 15.7637
  norm       = 0.0001
  norm       = 1.23264
  Prefactor  = 0.0001
  Prefactor  = 7.77772
  Prefactor  = 34.8688
  norm       = 1.38501
  Prefactor  = 0.0001
  norm       = 7.10222
  norm       = 12.2767
  Normalizat = 0.849782
  Prefactor  = 1.11324
 **********
 **   18 **HESSE 
 **********

 FCN=   5939.378     FROM HESSE     STATUS=OK           225 CALLS     3283 TOTAL
                     EDM=   .55E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     8.0821        8.8531        .11284E-05   -1.5139    
   2  Prefactor     .57612        84.744        .23770       -1.5556    
   3  norm          .10000E-03    30.112        .72569E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  norm          .25152E-03    20.176        .10000       -1.5706    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .10000E-03    86.866        .72569E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     15.764        15.338        .80708E-06   -1.4914    
   7  norm          .10000E-03    .39971        .37547E-05   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          1.2326        .95480        .51462E-06   -1.5486    
   9  Prefactor     .10000E-03    5.4294        .69619E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     7.7777        6.3524        .11498E-05   -1.5150    
  11  Prefactor     34.869        36.452        .54276E-06   -1.4526    
  12  norm          1.3850        .76165        .38077E-06   -1.5473    
  13  Prefactor     .10000E-03    137.28        .31344E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  norm          7.1022        5.5125        .12043E-05   -1.5175    
  15  norm          12.277        36.592        .91704E-06   -1.5007    
  16  Normalizat    .84978        .21446        .21783E-05   -.98248    
  17  Prefactor     1.1132        .17847        .83422E-05   -.89044    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 5.4511e-10
Minuit parameter uncertainties:
  1  8.85456
  2  13.9936
  3  4.23411e-07
  4  0.110617
  5  4.51505e-05
  6  15.3413
  7  9.10107e-08
  8  0.954815
  9  9.75268e-07
  10  6.35292
  11  36.4755
  12  0.761653
  13  0.000317584
  14  5.51289
  15  36.6586
  16  0.214673
  17  0.178568
Done.

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

Extracting fit parameters...

4FGL J0840.8+1317
   Spectrum: PowerLaw
297    Prefactor:  3.487e+01  3.648e+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.113e+00  1.786e-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.498e-01  2.147e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 1.12
Ra Dec: 130.222 13.287
Photon Index (Fixed Index): 2.49 +/- 0.00
Photon Flux (Fixed Index): 4.18e-08 +/- 4.37e-08
Energy Flux (Fixed Index): 1.22e-05 +/- 1.28e-05

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

Saving results to:
/scratch/kocevski/612456/likelihoodResults_503193601_503452801_4FGL_J0840.8+1317_daily_bin1018.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) = 5939.2705513
delta logL = 0.107619175064

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 5939.26724756
delta logL = 0.110922916398

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    24.741       1.0000         .10000E-03   10000.    
     2 'Index     '    2.8922       1.0000          .0000       10.000    
     3 'Normalizat'    .83241       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.1234       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=   5939.267     FROM MIGRAD    STATUS=CONVERGED     82 CALLS      259 TOTAL
                     EDM=   .62E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     24.757        42.656        .80534E-04   -.39831E-03
   2  Index         2.8923        1.0552        .76485E-02   -.17691E-03
   3  Normalizat    .83289        .21065        .27475E-03    .17340E-02
   4  Prefactor     1.1229        .17963        .20776E-03    .24538E-02
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 24.7573
  Index      = 2.89234
  Normalizat = 0.83289
  Prefactor  = 1.12294
 **********
 **   18 **HESSE 
 **********

 FCN=   5939.267     FROM HESSE     STATUS=OK            25 CALLS      284 TOTAL
                     EDM=   .64E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     24.757        36.767        .16107E-04   -1.4712    
   2  Index         2.8923        .90992        .30594E-03   -.43513    
   3  Normalizat    .83289        .21053        .54950E-04   -.98860    
   4  Prefactor     1.1229        .17936        .41553E-04   -.88737    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 6.39496e-09
Minuit parameter uncertainties:
  1  36.8003
  2  0.916143
  3  0.210732
  4  0.179453
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/612456': 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) = 5939.26724371
delta logL = 0.110926765029

Extracting fit parameters...

4FGL J0840.8+1317
   Spectrum: PowerLaw
297    Prefactor:  2.476e+01  3.680e+01  1.000e-04  1.000e+04 ( 1.000e-13)
298        Index:  2.892e+00  9.161e-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.123e+00  1.795e-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.329e-01  2.107e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 1.35
Ra Dec: 130.222 13.287
Photon Index (Free Index): 2.89 +/- 0.92
Photon Flux (Free Index): 5.36e-08 +/- 5.33e-08
Energy Flux (Free Index): 1.13e-05 +/- 1.12e-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/612456/cmap_HighResolution_503193601_503452801_4FGL_J0840.8+1317_daily_bin1018.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.02e-02', comment='SUCCESS', photon_flux='4.18e-08', energy_flux2='1.13e-05', photon_flux_error='4.37e-08', dlogl='1.11e-01', energy_flux='1.22e-05', photon_flux2='5.36e-08', job_status='DONE', time_completed='2021-08-30 03:36:19.900410', photon_index_error2='0.92', photon_index2='2.89', ts='1.12', fit_tolerance='1e-08', GAL='1.11', photon_index_error='0.00', photon_flux_upper_limit='1.32e-07', energy_flux_error2='1.12e-05', EG='0.85', time_epoch_completed='1630319779.9', return_code='0', job_id='612456', GAL2='1.12', EG2='0.83', return_code2='0', energy_flux_error='1.28e-05', photon_flux_error2='5.33e-08', ts2='1.35', photon_index='2.49' WHERE bin_id='1018' AND source_name='4FGL J0840.8+1317' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Aug 30 03:36:19 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0091>
Subject: Job 612456: <4FGL_J0840.8+1317_daily_bin1018> in cluster <slac> Done

Job <4FGL_J0840.8+1317_daily_bin1018> was submitted from host <rhel6-64h> by user <kocevski> in cluster <slac> at Mon Aug 30 03:21:14 2021
Job was executed on host(s) <bullet0091>, in queue <medium>, as user <kocevski> in cluster <slac> at Mon Aug 30 03:21:16 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:21:16 2021
Terminated at Mon Aug 30 03:36:21 2021
Results reported at Mon Aug 30 03:36:21 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J0840.8+1317_daily_bin1018 130.222 13.2871 503193601 503452801 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 :                                   641.00 sec.
    Max Memory :                                 1257 MB
    Average Memory :                             256.48 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   904 sec.
    Turnaround time :                            907 sec.

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

