/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: Dan/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 48 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 = 17363
number of fields = 31
RA_SUN column already exists. File will not be modified.
Done.


Performing analysis on: 4FGL_J0816.3+5739_weekly_bin703
RA = 124.1, Dec = 57.6616
tmin = 664156801, tmax = 664761601
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='619857', job_status='RUN', time_executed='2022-01-25 06:12:21.863270', time_epoch_executed='1643119941.86' WHERE source_name='4FGL J0816.3+5739' and cadence='weekly' and bin_id='703'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/619857

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

Retrieving the FT1 file...

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

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

Retrieving 107 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/619857/ft1_4FGL_J0816.3+5739_weekly_bin703.fits


Retrieving the FT1 file...

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

Retrieving 107 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/619857/ft2_4FGL_J0816.3+5739_weekly_bin703.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/619857/ft1_4FGL_J0816.3+5739_weekly_bin703.fits outfile=/scratch/kocevski/619857/ft1_filteredMKT_4FGL_J0816.3+5739_weekly_bin703.fits ra=124.1 dec=57.6616 rad=12.0 tmin=664156801.0 tmax=664761601.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 8.09
user 7.76
sys 0.31

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/619857/ft2_4FGL_J0816.3+5739_weekly_bin703.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/619857/ft2_4FGL_J0816.3+5739_weekly_bin703.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/619857/ft1_filteredMKT_4FGL_J0816.3+5739_weekly_bin703.fits evtable="EVENTS" outfile="/scratch/kocevski/619857/ft1_filtered_4FGL_J0816.3+5739_weekly_bin703.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.55
user 0.38
sys 0.15

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/619857/ft1_filtered_4FGL_J0816.3+5739_weekly_bin703.fits" evtable="EVENTS" scfile=/scratch/kocevski/619857/ft2_4FGL_J0816.3+5739_weekly_bin703.fits sctable="SC_DATA" outfile=/scratch/kocevski/619857/ltcube_664156801_664761601_4FGL_J0816.3+5739_weekly_bin703.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/619857/ft2_4FGL_J0816.3+5739_weekly_bin703.fits
.....................!
real 25.96
user 25.58
sys 0.32

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/619857/ft1_filtered_4FGL_J0816.3+5739_weekly_bin703.fits evtable="EVENTS" scfile=/scratch/kocevski/619857/ft2_4FGL_J0816.3+5739_weekly_bin703.fits sctable="SC_DATA" expcube=/scratch/kocevski/619857/ltcube_664156801_664761601_4FGL_J0816.3+5739_weekly_bin703.fits outfile=/scratch/kocevski/619857/expmap_664156801_664761601_4FGL_J0816.3+5739_weekly_bin703.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/619857/ltcube_664156801_664761601_4FGL_J0816.3+5739_weekly_bin703.fits
.....................!
real 190.36
user 185.25
sys 4.75

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

Setting source of interest to:
4FGL J0816.3+5739 @ 124.1 57.6616

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/619857/ft1_filtered_4FGL_J0816.3+5739_weekly_bin703.fits scfile=/scratch/kocevski/619857/ft2_4FGL_J0816.3+5739_weekly_bin703.fits outfile=/scratch/kocevski/619857/cmap_664156801_664761601_4FGL_J0816.3+5739_weekly_bin703.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=124.1 yref=57.6616 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.41
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/619857/ft1_filtered_4FGL_J0816.3+5739_weekly_bin703.fits scfile=/scratch/kocevski/619857/ft2_4FGL_J0816.3+5739_weekly_bin703.fits outfile=/scratch/kocevski/619857/cmap_HighResolution_664156801_664761601_4FGL_J0816.3+5739_weekly_bin703.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=124.1 yref=57.6616 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.42
sys 0.15

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/619857/ft1_filtered_4FGL_J0816.3+5739_weekly_bin703.fits evtable="EVENTS" scfile=/scratch/kocevski/619857/ft2_4FGL_J0816.3+5739_weekly_bin703.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/619857/Model_4FGL_J0816.3+5739_weekly_bin703.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/619857/ft1_filtered_4FGL_J0816.3+5739_weekly_bin703.fits.....................!
real 185.91
user 183.42
sys 1.26

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/619857/ft1_filtered_4FGL_J0816.3+5739_weekly_bin703.fits', '/scratch/kocevski/619857/ft2_4FGL_J0816.3+5739_weekly_bin703.fits', expMap='/scratch/kocevski/619857/expmap_664156801_664761601_4FGL_J0816.3+5739_weekly_bin703.fits', expCube='/scratch/kocevski/619857/ltcube_664156801_664761601_4FGL_J0816.3+5739_weekly_bin703.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/619857/Model_4FGL_J0816.3+5739_weekly_bin703.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J0816.3+5739'

4FGL J0816.3+5739
   Spectrum: PowerLaw
339    Prefactor:  5.498e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-13)
340        Index:  2.085e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
341        Scale:  1.529e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/619857/ft1_filtered_4FGL_J0816.3+5739_weekly_bin703.fits
Spacecraft file(s): /scratch/kocevski/619857/ft2_4FGL_J0816.3+5739_weekly_bin703.fits
Exposure map: /scratch/kocevski/619857/expmap_664156801_664761601_4FGL_J0816.3+5739_weekly_bin703.fits
Exposure cube: /scratch/kocevski/619857/ltcube_664156801_664761601_4FGL_J0816.3+5739_weekly_bin703.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/619857/Model_4FGL_J0816.3+5739_weekly_bin703.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) = 19388.9490536

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    10.850       1.0000         .10000E-03   10000.    
     2 'Prefactor '    16.066       1.0000         .10000E-03   10000.    
     3 'Prefactor '    5.3046       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10017E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     7 'norm      '    .10094E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    1.1512       1.0000         .10000E-03   10000.    
     9 'norm      '    2.5228       1.0000         .10000E-03   10000.    
    10 'Prefactor '    .95112       1.0000         .10000E-03   10000.    
    11 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    9.6499       1.0000         .10000E-03   10000.    
    13 'norm      '    2.1898       1.0000         .10000E-03   10000.    
    14 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
    15 'Prefactor '    .69972       1.0000         .10000E-03   10000.    
    16 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    17 'Prefactor '    .57611       1.0000         .10000E-03   10000.    
    18 'Prefactor '    9.5027       1.0000         .10000E-03   10000.    
    19 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    20 'norm      '    6.0445       1.0000         .10000E-03   10000.    
    21 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    22 'Prefactor '    20.769       1.0000         .10000E-03   10000.    
    23 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    24 'Prefactor '    .10023E-03   1.0000         .10000E-03   10000.    
    25 'Prefactor '    17.442       1.0000         .10000E-03   10000.    
    26 'norm      '    .59911       1.0000         .10000E-03   10000.    
    27 'Prefactor '    1.9425       1.0000         .10000E-03   10000.    
    28 'Prefactor '    .76992E-01   1.0000         .10000E-03   10000.    
    29 'Prefactor '    .10010E-03   1.0000         .10000E-03   10000.    
    30 'norm      '    1.5045       1.0000         .10000E-03   10000.    
    31 'Normalizat'    1.2725       1.0000         .10000E-01   10.000    
    32 'Prefactor '    .89781       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .7440E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   19388.95     FROM MIGRAD    STATUS=CONVERGED    850 CALLS     4440 TOTAL
                     EDM=   .13E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.0%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     10.851        8.1885       -.13313E-06    .38658E-05
   2  Prefactor     16.066        11.676        .18937E-06    .56625E-05
   3  Prefactor     5.3055        7.6149       -.20046E-06   -.16063E-05
   4  Prefactor     .10000E-03    4.0417       -.43852E-06** at limit **
   5  Prefactor     .10000E-03    9.6266        .17801E-05** at limit **
   6  Prefactor     .10000E-03    29.230        .11685E-04** at limit **
   7  norm          .10000E-03    .13241       -.48192E-07** at limit **
   8  Prefactor     1.1517        4.4131       -.21801E-06   -.28349E-03
   9  norm          2.5229        1.4268       -.19874E-07   -.41929E-04
  10  Prefactor     .95239        14.135       -.45875E-06   -.13988E-03
  11  norm          .10000E-03    .40642       -.76231E-07** at limit **
  12  Prefactor     9.6505        8.7867       -.44133E-07    .20261E-04
  13  norm          2.1899        1.7162       -.34621E-07   -.41260E-04
  14  norm          .10000E-03    .26000       -.26668E-08** at limit **
  15  Prefactor     .69979        .56135       -.53868E-07   -.20488E-03
  16  Prefactor     .10000E-03    2.1066       -.54271E-07** at limit **
  17  Prefactor     .57654        1.5859       -.13595E-06   -.10548E-03
  18  Prefactor     9.5023        5.0685        .17957E-06    .60571E-04
  19  Prefactor     .10000E-03    9.7634       -.19973E-05** at limit **
  20  norm          6.0446        3.7325        .32374E-06    .46577E-04
  21  norm          .10000E-03    3.7199        .51716E-06** at limit **
  22  Prefactor     20.768        9.5237       -.44892E-07    .82864E-04
  23  Prefactor     .10000E-03    1.7877        .31651E-07** at limit **
  24  Prefactor     .10000E-03    21.793       -.31336E-05** at limit **
  25  Prefactor     17.423        37.561       -.28837E-04   -.41881E-04
  26  norm          .59901        .38747       -.29261E-07   -.69740E-03
  27  Prefactor     1.9423        2.6714       -.84556E-07   -.17676E-03
  28  Prefactor     .12186        2.5670        .67900E-06   -.79362E-03
  29  Prefactor     .10000E-03    3.2749       -.20446E-06** at limit **
  30  norm          1.5042        1.1889        .45099E-06   -.45753E-02
  31  Normalizat    1.2724        .11333        .13548E-05   -.57747E-04
  32  Prefactor     .89779        .81702E-01   -.45185E-06    .31528E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 10.8509
  Prefactor  = 16.0662
  Prefactor  = 5.30547
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 1.15167
  norm       = 2.52287
  Prefactor  = 0.952388
  norm       = 0.0001
  Prefactor  = 9.65052
  norm       = 2.18994
  norm       = 0.0001
  Prefactor  = 0.699788
  Prefactor  = 0.0001
  Prefactor  = 0.576535
  Prefactor  = 9.50233
  Prefactor  = 0.0001
  norm       = 6.04461
  norm       = 0.0001
  Prefactor  = 20.7676
  Prefactor  = 0.0001
  Prefactor  = 0.000100003
  Prefactor  = 17.4226
  norm       = 0.599013
  Prefactor  = 1.94231
  Prefactor  = 0.121864
  Prefactor  = 0.0001
  norm       = 1.5042
  Normalizat = 1.27243
  Prefactor  = 0.897786
 **********
 **   18 **HESSE 
 **********

 FCN=   19388.95     FROM HESSE     STATUS=OK           681 CALLS     5121 TOTAL
                     EDM=   .68E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     10.851        8.1866        .12163E-03   -1.5049    
   2  Prefactor     16.066        11.675        .99925E-04   -1.4906    
   3  Prefactor     5.3055        7.6037        .17450E-03   -1.5247    
   4  Prefactor     .10000E-03    4.0522        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .10000E-03    9.6897        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    29.262        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  norm          .10000E-03    .94458        .97569E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     1.1517        4.3897        .43120E-03   -1.5493    
   9  norm          2.5229        1.4172        .11991E-03   -1.5390    
  10  Prefactor     .95239        14.593        .51967E-03   -1.5513    
  11  norm          .10000E-03    .41478        .86591E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     9.6505        8.7834        .12900E-03   -1.5087    
  13  norm          2.1899        1.6922        .15476E-03   -1.5412    
  14  norm          .10000E-03    .45064        .13712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     .69979        .54546        .89898E-04   -1.5541    
  16  Prefactor     .10000E-03    2.1207        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor     .57654        3.8636        .27126E-02   -1.5556    
  18  Prefactor     9.5023        5.0599        .13000E-03   -1.5091    
  19  Prefactor     .10000E-03    9.7827        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  norm          6.0446        3.7293        .16331E-03   -1.5216    
  21  norm          .10000E-03    3.8723        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     20.768        9.5124        .87889E-04   -1.4796    
  23  Prefactor     .10000E-03    1.8081        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Prefactor     .10000E-03    22.011        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  Prefactor     17.423        37.620        .95901E-04   -1.4873    
  26  norm          .59901        .37063        .66932E-03   -1.5553    
  27  Prefactor     1.9423        2.6676        .25657E-03   -1.5429    
  28  Prefactor     .12186        2.7536        .85076E-01   -1.5638    
  29  Prefactor     .10000E-03    3.3127        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  30  norm          1.5042        3.2076        .17448E-02   -1.5463    
  31  Normalizat    1.2724        .13064        .25955E-03   -.84393    
  32  Prefactor     .89779        .95019E-01    .22694E-03   -.96219    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 6.77707e-08
Minuit parameter uncertainties:
  1  8.18749
  2  11.6765
  3  7.60509
  4  4.76415e-06
  5  6.47145e-06
  6  9.23425e-05
  7  6.22156e-07
  8  4.39091
  9  1.41721
  10  7.45793
  11  1.20827e-06
  12  8.7846
  13  1.69226
  14  1.42363e-06
  15  0.54546
  16  1.66889e-06
  17  2.98497
  18  5.06017
  19  1.59646e-05
  20  3.72946
  21  4.68893e-05
  22  9.5131
  23  2.80956e-06
  24  0.000522635
  25  37.6709
  26  0.370632
  27  2.66777
  28  1.15814
  29  1.29589e-05
  30  3.20798
  31  0.130678
  32  0.0950363
Done.

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

Extracting fit parameters...

4FGL J0816.3+5739
   Spectrum: PowerLaw
339    Prefactor:  1.000e-04  1.669e-06  1.000e-04  1.000e+04 ( 1.000e-13)
340        Index:  2.085e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
341        Scale:  1.529e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
741    Prefactor:  8.978e-01  9.504e-02  0.000e+00  1.000e+01 ( 1.000e+00)
742        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
743        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
740   Normalization:  1.272e+00  1.307e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): -0.00
Ra Dec: 124.100 57.662
Photon Flux Upper Limit: 2.42e-08 ph cm-2 s-1
Energy Flux Upper Limit: 1.83e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/619857/likelihoodResults_664156801_664761601_4FGL_J0816.3+5739_weekly_bin703.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) = 19388.9495535
delta logL = -0.00224660088134

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 19388.9473069
delta logL = 1.99506757781e-08

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10147E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.0645       1.0000          .0000       10.000    
     3 'Normalizat'    1.2725       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .89778       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .7440E+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=   19388.95     FROM MIGRAD    STATUS=CONVERGED     98 CALLS      241 TOTAL
                     EDM=   .52E-11    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    64.070        .18142E-01** at limit **
   2  Index         1.6449        7.4436        .10172        .29058E-07
   3  Normalizat    1.2724        .14514E-01    .25955E-03    .47131E-04
   4  Prefactor     .89778        .10935E-01    .22694E-03    .46688E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Index      = 1.64486
  Normalizat = 1.27243
  Prefactor  = 0.897784
 **********
 **   18 **HESSE 
 **********

 FCN=   19388.95     FROM HESSE     STATUS=OK            23 CALLS      264 TOTAL
                     EDM=   .46E-11    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    2.6616        .43617E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         1.6449        8.2556        .40689E-02   -.73559    
   3  Normalizat    1.2724        .12416        .10382E-04   -.84393    
   4  Prefactor     .89778        .93527E-01    .90778E-05   -.96219    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 4.57189e-12
Minuit parameter uncertainties:
  1  7.74991e-06
  2  127.916
  3  0.124186
  4  0.0935438
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/619857': 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) = 19388.9473021
delta logL = 4.77678986499e-06

Extracting fit parameters...

4FGL J0816.3+5739
   Spectrum: PowerLaw
339    Prefactor:  1.000e-04  7.750e-06  1.000e-04  1.000e+04 ( 1.000e-13)
340        Index:  1.645e+00  1.279e+02  0.000e+00  1.000e+01 (-1.000e+00)
341        Scale:  1.529e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
741    Prefactor:  8.978e-01  9.354e-02  0.000e+00  1.000e+01 ( 1.000e+00)
742        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
743        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
740   Normalization:  1.272e+00  1.242e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): -0.00
Ra Dec: 124.100 57.662

Creating a high resolution counts map...
INFO: Auto-setting vmin to -1.000e-01 [aplpy.core]
INFO: Auto-setting vmax to  1.110e+00 [aplpy.core]
Saving /scratch/kocevski/619857/cmap_HighResolution_664156801_664761601_4FGL_J0816.3+5739_weekly_bin703.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.83e-03', job_status='DONE', photon_flux_upper_limit='2.42e-08', time_completed='2022-01-25 07:02:23.674826', job_id='619857', GAL2='0.90', fit_tolerance='1e-08', EG2='1.27', EG='1.27', time_epoch_completed='1643122943.67', return_code2='0', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.90', dlogl='4.78e-06', ts2='-0.00', photon_index_error='0.00', photon_index='2.09' WHERE bin_id='703' AND source_name='4FGL J0816.3+5739' AND cadence='weekly';

Database successfully updated.


Analysis Complete.


Tue Jan 25 07:02:23 PST 2022

r <slac> at Tue Jan 25 00:55:28 2022
Job was executed on host(s) <bullet0065>, in queue <medium>, as user <kocevski> in cluster <slac> at Tue Jan 25 00:55:30 2022
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Tue Jan 25 00:55:30 2022
Terminated at Tue Jan 25 01:47:22 2022
Results reported at Tue Jan 25 01:47:22 2022

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J0816.3+5739_weekly_bin703 124.1 57.6616 664156801 664761601 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J0816.3+5739 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   3036.00 sec.
    Max Memory :                                 621 MB
    Average Memory :                             335.21 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              7
    Max Threads :                                21
    Run time :                                   3112 sec.
    Turnaround time :                            3114 sec.

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


------------------------------------------------------------
Sender: LSF System <scs@bullet0131>
Subject: Job 619857: <4FGL_J0816.3+5739_weekly_bin703> in cluster <slac> Done

Job <4FGL_J0816.3+5739_weekly_bin703> was submitted from host <rhel6-64e> by user <kocevski> in cluster <slac> at Tue Jan 25 00:08:50 2022
Job was executed on host(s) <bullet0131>, in queue <medium>, as user <kocevski> in cluster <slac> at Tue Jan 25 00:09:00 2022
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Tue Jan 25 00:09:00 2022
Terminated at Tue Jan 25 07:02:24 2022
Results reported at Tue Jan 25 07:02:24 2022

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J0816.3+5739_weekly_bin703 124.1 57.6616 664156801 664761601 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J0816.3+5739 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   3007.00 sec.
    Max Memory :                                 1257 MB
    Average Memory :                             87.49 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   24804 sec.
    Turnaround time :                            24814 sec.

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

