/sdf/group/fermi/u/kocevski/software/conda/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)

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 make4FGLDR3xml version 01r09.
The default diffuse model files and names are for P8R3, 4FGL DRs, and the default fermitools directory locations.

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

/sdf/group/fermi/u/kocevski/software/conda/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 = 17422
number of fields = 31
RA_SUN column already exists. File will not be modified.
Done.


Performing analysis on: 4FGL_J1516.8+3651_weekly_bin802
RA = 229.222, Dec = 36.8505
tmin = 724032001, tmax = 724636801
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='36606829', job_status='RUN', time_executed='2023-12-19 00:55:55.727364', time_epoch_executed='1702976155.73' WHERE source_name='4FGL J1516.8+3651' and cadence='weekly' and bin_id='802'

Database successfully updated.
Done.

Creating custom output directory:
/lscratch/kocevski/36606829

Creating custom pfile directory:
/lscratch/kocevski/36606829/pfiles/

Retrieving the FT1 file...

Issuing command:
datacat find --group FT1 --filter 'nMetStop>=724032001.0 && nMetStart<724636801.0' /Data/Flight/Reprocess/P305

Issuing command:
datacat find --group FT1 --filter 'nMetStart>564945418 && nMetStop>=724032001.0 && nMetStart<724636801.0' /Data/Flight/Level1/LPA

Retrieving 107 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/lscratch/kocevski/36606829/ft1_4FGL_J1516.8+3651_weekly_bin802.fits


Retrieving the FT1 file...

Issuing command:
datacat find --group FT2 --filter 'nMetStop>=724032001.0 && nMetStart<724636801.0' /Data/Flight/Level1/LPA

Retrieving 107 files...
Done.


Merging files...

Merged file saved to:
/lscratch/kocevski/36606829/ft2_4FGL_J1516.8+3651_weekly_bin802.fits


Selecting the photons:
time -p gtselect infile=/lscratch/kocevski/36606829/ft1_4FGL_J1516.8+3651_weekly_bin802.fits outfile=/lscratch/kocevski/36606829/ft1_filteredMKT_4FGL_J1516.8+3651_weekly_bin802.fits ra=229.222 dec=36.8505 rad=12.0 tmin=724032001.0 tmax=724636801.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 4.47
user 4.19
sys 0.20

Adding sun position to ft2 file:
/sdf/group/fermi/g/LCRepository/Repository/bin/sunpos /lscratch/kocevski/36606829/ft2_4FGL_J1516.8+3651_weekly_bin802.fits

Selecting the good time intervals:
time -p gtmktime scfile=/lscratch/kocevski/36606829/ft2_4FGL_J1516.8+3651_weekly_bin802.fits sctable="SC_DATA" filter="IN_SAA!=T && LIVETIME>0 && gtifilter('/sdf/group/fermi/g/LCRepository/Likelihood/GTIs/nogrb.gti',(START+STOP)/2) && (angsep(RA_SUN,DEC_SUN,RA_ZENITH,DEC_ZENITH)>115 || gtifilter('/sdf/group/fermi/g/LCRepository/Likelihood/GTIs/nosolarflares.gti',(START+STOP)/2))" roicut=no evfile=/lscratch/kocevski/36606829/ft1_filteredMKT_4FGL_J1516.8+3651_weekly_bin802.fits evtable="EVENTS" outfile="/lscratch/kocevski/36606829/ft1_filtered_4FGL_J1516.8+3651_weekly_bin802.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('/sdf/group/fermi/g/LCRepository/Likelihood/GTIs/nogrb.gti',(START+STOP)/2) && (angsep(RA_SUN,DEC_SUN,RA_ZENITH,DEC_ZENITH)>115 || gtifilter('/sdf/group/fermi/g/LCRepository/Likelihood/GTIs/nosolarflares.gti',(START+STOP)/2))
real 0.37
user 0.19
sys 0.14

Number of photons that the gtmktime cut: 1412

Generating the livetime cube:
time -p gtltcube evfile="/lscratch/kocevski/36606829/ft1_filtered_4FGL_J1516.8+3651_weekly_bin802.fits" evtable="EVENTS" scfile=/lscratch/kocevski/36606829/ft2_4FGL_J1516.8+3651_weekly_bin802.fits sctable="SC_DATA" outfile=/lscratch/kocevski/36606829/ltcube_724032001_724636801_4FGL_J1516.8+3651_weekly_bin802.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 /lscratch/kocevski/36606829/ft2_4FGL_J1516.8+3651_weekly_bin802.fits
.....................!
real 27.95
user 27.46
sys 0.25

Generating the exposure map:
time -p gtexpmap evfile=/lscratch/kocevski/36606829/ft1_filtered_4FGL_J1516.8+3651_weekly_bin802.fits evtable="EVENTS" scfile=/lscratch/kocevski/36606829/ft2_4FGL_J1516.8+3651_weekly_bin802.fits sctable="SC_DATA" expcube=/lscratch/kocevski/36606829/ltcube_724032001_724636801_4FGL_J1516.8+3651_weekly_bin802.fits outfile=/lscratch/kocevski/36606829/expmap_724032001_724636801_4FGL_J1516.8+3651_weekly_bin802.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 /lscratch/kocevski/36606829/ltcube_724032001_724636801_4FGL_J1516.8+3651_weekly_bin802.fits
.....................!
real 66.06
user 62.18
sys 3.61

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

Setting source of interest to:
4FGL J1516.8+3651 @ 229.222 36.8505

Creating the counts map:
time -p gtbin evfile=/lscratch/kocevski/36606829/ft1_filtered_4FGL_J1516.8+3651_weekly_bin802.fits scfile=/lscratch/kocevski/36606829/ft2_4FGL_J1516.8+3651_weekly_bin802.fits outfile=/lscratch/kocevski/36606829/cmap_724032001_724636801_4FGL_J1516.8+3651_weekly_bin802.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=229.222 yref=36.8505 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.38
user 0.21
sys 0.13

Creating the high resolution counts map:
time -p gtbin evfile=/lscratch/kocevski/36606829/ft1_filtered_4FGL_J1516.8+3651_weekly_bin802.fits scfile=/lscratch/kocevski/36606829/ft2_4FGL_J1516.8+3651_weekly_bin802.fits outfile=/lscratch/kocevski/36606829/cmap_HighResolution_724032001_724636801_4FGL_J1516.8+3651_weekly_bin802.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=229.222 yref=36.8505 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.39
user 0.22
sys 0.14

Computing the diffuse response:
time -p gtdiffrsp evfile=/lscratch/kocevski/36606829/ft1_filtered_4FGL_J1516.8+3651_weekly_bin802.fits evtable="EVENTS" scfile=/lscratch/kocevski/36606829/ft2_4FGL_J1516.8+3651_weekly_bin802.fits sctable="SC_DATA" srcmdl=/lscratch/kocevski/36606829/Model_4FGL_J1516.8+3651_weekly_bin802.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...
/lscratch/kocevski/36606829/ft1_filtered_4FGL_J1516.8+3651_weekly_bin802.fits.....................!
real 39.82
user 38.95
sys 0.68

Creating the likelihood object...
obs = UnbinnedObs('/lscratch/kocevski/36606829/ft1_filtered_4FGL_J1516.8+3651_weekly_bin802.fits', '/lscratch/kocevski/36606829/ft2_4FGL_J1516.8+3651_weekly_bin802.fits', expMap='/lscratch/kocevski/36606829/expmap_724032001_724636801_4FGL_J1516.8+3651_weekly_bin802.fits', expCube='/lscratch/kocevski/36606829/ltcube_724032001_724636801_4FGL_J1516.8+3651_weekly_bin802.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/lscratch/kocevski/36606829/Model_4FGL_J1516.8+3651_weekly_bin802.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1516.8+3651'

4FGL J1516.8+3651
   Spectrum: PowerLaw
279    Prefactor:  6.183e+00  0.000e+00  0.000e+00  1.000e+06 ( 1.000e-14)
280        Index:  2.190e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
281        Scale:  1.677e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /lscratch/kocevski/36606829/ft1_filtered_4FGL_J1516.8+3651_weekly_bin802.fits
Spacecraft file(s): /lscratch/kocevski/36606829/ft2_4FGL_J1516.8+3651_weekly_bin802.fits
Exposure map: /lscratch/kocevski/36606829/expmap_724032001_724636801_4FGL_J1516.8+3651_weekly_bin802.fits
Exposure cube: /lscratch/kocevski/36606829/ltcube_724032001_724636801_4FGL_J1516.8+3651_weekly_bin802.fits
IRFs: P8R3_SOURCE_V2
Source model file: /lscratch/kocevski/36606829/Model_4FGL_J1516.8+3651_weekly_bin802.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) = 15510.3908191

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    2.2839       1.0000          .0000       .10000E+07
     2 'Prefactor '    15.853       1.0000          .0000       .10000E+07
     3 'Prefactor '    .62613       1.0000          .0000       .10000E+07
     4 'norm      '    .14622E-02   1.0000          .0000       .10000E+07
     5 'norm      '    3.4161       1.0000          .0000       .10000E+07
     6 'Prefactor '    15.728       1.0000          .0000       .10000E+07
     7 'norm      '    .19007E-06   1.0000          .0000       .10000E+07
     8 'Prefactor '    2.3055       1.0000          .0000       .10000E+07
     9 'Prefactor '    .35830E-05   1.0000          .0000       .10000E+07
    10 'Prefactor '    .12667E-03   1.0000          .0000       .10000E+07
    11 'norm      '    .18247E-06   1.0000          .0000       .10000E+07
    12 'norm      '    .14225E-05   1.0000          .0000       .10000E+07
    13 'Prefactor '    .42268E-04   1.0000          .0000       .10000E+07
    14 'Prefactor '    42.695       1.0000          .0000       .10000E+07
    15 'Prefactor '    9.7255       1.0000          .0000       .10000E+07
    16 'Prefactor '    .10182E-05   1.0000          .0000       .10000E+07
    17 'norm      '    .74124       1.0000          .0000       .10000E+07
    18 'Prefactor '    .50174       1.0000          .0000       .10000E+07
    19 'Prefactor '    .82146E-01   1.0000          .0000       .10000E+07
    20 'norm      '    .95788E-03   1.0000          .0000       .10000E+07
    21 'Prefactor '    .28572       1.0000          .0000       .10000E+07
    22 'Prefactor '    .17872E-03   1.0000          .0000       .10000E+07
    23 'Prefactor '    .62676       1.0000          .0000       .10000E+07
    24 'Normalizat'    .91733       1.0000         .10000E-01   10.000    
    25 'Prefactor '    1.0706       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5940E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   15510.38     FROM MIGRAD    STATUS=CONVERGED    138 CALLS     2177 TOTAL
                     EDM=   .64E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  5.1%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          2.2843        2.3656       -.29166E-07    .16381E-02
   2  Prefactor     15.924        9.7455        .12111E-05    .49478E-01
   3  Prefactor     .49916        39.940       -.34461E-05    .17979E-01
   4  norm          .27200E-08    6.8921       -.18517E-06** at limit **
   5  norm          3.3957        3.0064       -.14616E-06   -.13108E-02
   6  Prefactor     15.728        5.7219       -.31892E-06   -.16627E-01
   7  norm           .0000        .91949        .24769E-06** at limit **
   8  Prefactor     2.3076        7.2172        .39316E-07    .11501E-02
   9  Prefactor      .0000        1.1927       -.20388E-06** at limit **
  10  Prefactor     .21649E-07    1.4125       -.50914E-06** at limit **
  11  norm           .0000        .22519        .36274E-07** at limit **
  12  norm          .11102E-09    .75146       -.11591E-06** at limit **
  13  Prefactor     .12712E-07    1.6020        .42834E-06** at limit **
  14  Prefactor     42.694        1.3300        .45854E-07   -.66050E-02
  15  Prefactor     9.6789        2.9552       -.39981E-06    .23698E-02
  16  Prefactor     .49960E-08    16.390        .16642E-05** at limit **
  17  norm          .73910        .56947        .17878E-06    .35276E-02
  18  Prefactor     .53752        7.6195       -.25944E-05    .80654E-02
  19  Prefactor     .71089E-05    17.169        .74899E-07** at limit **
  20  norm          .33307E-09    5.1081        .30336E-06** at limit **
  21  Prefactor     .28494        1.1797        .31875E-06   -.29891E-02
  22  Prefactor      .0000        2.7664        .49356E-06** at limit **
  23  Prefactor     .63740        1.6543        .10770E-06    .33030E-03
  24  Normalizat    .91760        .12044        .83628E-05    .14324E-03
  25  Prefactor     1.0705        .11958       -.46658E-05    .15699E-03
                               ERR DEF=  .500    
Final values: 
  norm       = 2.28425
  Prefactor  = 15.9239
  Prefactor  = 0.49916
  norm       = 2.72005e-09
  norm       = 3.39566
  Prefactor  = 15.7276
  norm       = 0
  Prefactor  = 2.30759
  Prefactor  = 0
  Prefactor  = 2.16493e-08
  norm       = 0
  norm       = 1.11022e-10
  Prefactor  = 1.27121e-08
  Prefactor  = 42.6942
  Prefactor  = 9.67895
  Prefactor  = 4.996e-09
  norm       = 0.739095
  Prefactor  = 0.537517
  Prefactor  = 7.10892e-06
  norm       = 3.33067e-10
  Prefactor  = 0.284938
  Prefactor  = 0
  Prefactor  = 0.637398
  Normalizat = 0.917603
  Prefactor  = 1.07045
 **********
 **   18 **HESSE 
 **********

 FCN=   15510.38     FROM HESSE     STATUS=OK           489 CALLS     2666 TOTAL
                     EDM=   .90E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          2.2843        2.3848        .67906E-03   -1.5678    
   2  Prefactor     15.924        13.864        .25128E-03   -1.5628    
   3  Prefactor     .49916        71.925        .66919E-03   -1.5694    
   4  norm          .27200E-08    7.0620        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  norm          3.3957        3.0168        .54707E-03   -1.5671    
   6  Prefactor     15.728        19.457        .25228E-03   -1.5629    
   7  norm           .0000        .92632        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     2.3076        7.3026        .67551E-03   -1.5678    
   9  Prefactor      .0000        1.2062        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .21649E-07    2.8011        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  norm           .0000        .22505        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  norm          .11102E-09    .88293        .42118E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     .12712E-07    2.8725        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     42.694        33.538        .15306E-03   -1.5577    
  15  Prefactor     9.6789        9.3911        .32109E-03   -1.5646    
  16  Prefactor     .49960E-08    16.336        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          .73910        .62243        .57421E-03   -1.5691    
  18  Prefactor     .53752        3.1322        .78534E-02   -1.5693    
  19  Prefactor     .71089E-05    9.2489        .14436E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  norm          .33307E-09    5.2846        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Prefactor     .28494        .86217        .33483E-02   -1.5697    
  22  Prefactor      .0000        2.8636        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     .63740        1.6804        .66865E-03   -1.5692    
  24  Normalizat    .91760        .10788        .45123E-01   -.95844    
  25  Prefactor     1.0705        .10250        .38828E-01   -.90417    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 9.00196e-08
Minuit parameter uncertainties:
  1  2.38476
  2  13.8636
  3  11.9838
  4  0.000277459
  5  3.01679
  6  19.4567
  7  2.49006e-06
  8  7.30264
  9  2.4583e-06
  10  0.000492809
  11  2.44673e-06
  12  1.8992e-05
  13  0.000382506
  14  33.5385
  15  9.39109
  16  0.00057286
  17  0.622429
  18  2.59507
  19  0.0162173
  20  8.60182e-05
  21  0.862166
  22  9.60419e-06
  23  1.68042
  24  0.107903
  25  0.102521
Done.

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

Extracting fit parameters...

4FGL J1516.8+3651
   Spectrum: PowerLaw
279    Prefactor:  4.269e+01  3.354e+01  0.000e+00  1.000e+06 ( 1.000e-14)
280        Index:  2.190e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
281        Scale:  1.677e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
591    Prefactor:  1.070e+00  1.025e-01  0.000e+00  1.000e+01 ( 1.000e+00)
592        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
593        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
590   Normalization:  9.176e-01  1.079e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 2.68
Ra Dec: 229.222 36.850
Photon Index (Fixed Index): 2.19 +/- 0.00
Photon Flux (Fixed Index): 1.73e-08 +/- 1.36e-08
Energy Flux (Fixed Index): 7.90e-06 +/- 6.20e-06

TS (Fixed Index): 2.68
Ra Dec: 229.222 36.850
Photon Flux Upper Limit: 4.77538738873e-08 ph cm-2 s-1
Energy Flux Upper Limit: 0.00363580462483 MeV cm-2 s-1

Saving results to:
/lscratch/kocevski/36606829/likelihoodResults_724032001_724636801_4FGL_J1516.8+3651_weekly_bin802.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) = 15509.8955874
delta logL = 0.485348102449

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 15509.8840486
delta logL = 0.496886932937

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    17.557       1.0000          .0000       .10000E+07
     2 'Index     '    2.9361       1.0000          .0000       10.000    
     3 'Normalizat'    .89094       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.0868       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5940E+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=   15509.88     FROM MIGRAD    STATUS=FAILED        93 CALLS      302 TOTAL
                     EDM=   .19E-05    STRATEGY= 1      ERR MATRIX APPROXIMATE

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     17.568        239.67        .95503E-05   -.87613E-03
   2  Index         2.9361        3.3679        .65471E-02    .16096E-02
   3  Normalizat    .89104        .15962        .24189E-03   -.24290E-03
   4  Prefactor     1.0866        .14342        .22126E-03    .42991E-03
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   15509.88     FROM SIMPLEX   STATUS=UNCHANGED     93 CALLS      395 TOTAL
                     EDM=   .15E-04    STRATEGY= 1      ERR MATRIX APPROXIMATE

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     17.568        239.67        .25431E-04   -1.5624    
   2  Index         2.9361        3.3679        .66419E-03   -.42551    
   3  Normalizat    .89104        .15962        .15077E-03   -.96776    
   4  Prefactor     1.0866        .14342        .11330E-03   -.89895    
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   15509.88     FROM MIGRAD    STATUS=CONVERGED     29 CALLS      424 TOTAL
                     EDM=   .50E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     17.569        29.884        .38201E-06    .22462E-03
   2  Index         2.9360        .86628        .13094E-02   -.64422E-04
   3  Normalizat    .89105        .12296        .96754E-05   -.17625E-03
   4  Prefactor     1.0866        .12058        .44253E-04    .34107E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 17.5688
  Index      = 2.93605
  Normalizat = 0.891046
  Prefactor  = 1.08663
 **********
 **   18 **HESSE 
 **********

 FCN=   15509.88     FROM HESSE     STATUS=OK            23 CALLS      447 TOTAL
                     EDM=   .49E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     17.569        27.243        .37251E-06   -1.5624    
   2  Index         2.9360        .79008        .52377E-04   -.42552    
   3  Normalizat    .89105        .12250        .19351E-05   -.96775    
   4  Prefactor     1.0866        .12029        .88505E-05   -.89895    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 4.92271e-10
Minuit parameter uncertainties:
  1  27.2433
  2  0.794093
  3  0.122536
  4  0.120322
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) = 15509.8840463
delta logL = 0.496889166758

Extracting fit parameters...

4FGL J1516.8+3651
   Spectrum: PowerLaw
279    Prefactor:  1.757e+01  2.724e+01  0.000e+00  1.000e+06 ( 1.000e-14)
280        Index:  2.936e+00  7.941e-01  0.000e+00  1.000e+01 (-1.000e+00)
281        Scale:  1.677e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
591    Prefactor:  1.087e+00  1.203e-01  0.000e+00  1.000e+01 ( 1.000e+00)
592        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
593        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
590   Normalization:  8.910e-01  1.225e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 3.73
Ra Dec: 229.222 36.850
Photon Index (Free Index): 2.94 +/- 0.79
Photon Flux (Free Index): 3.58e-08 +/- 2.69e-08
Energy Flux (Free Index): 7.39e-06 +/- 4.64e-06

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 /lscratch/kocevski/36606829/cmap_HighResolution_724032001_724636801_4FGL_J1516.8+3651_weekly_bin802.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='3.64e-03', comment='SUCCESS', photon_flux='1.73e-08', energy_flux2='7.39e-06', photon_flux_error='1.36e-08', dlogl='4.97e-01', energy_flux='7.90e-06', photon_flux2='3.58e-08', job_status='DONE', time_completed='2023-12-19 01:05:23.314421', photon_index_error2='0.79', photon_index2='2.94', ts='2.68', fit_tolerance='1e-08', GAL='1.07', photon_index_error='0.00', photon_flux_upper_limit='4.78e-08', energy_flux_error2='4.64e-06', EG='0.92', time_epoch_completed='1702976723.31', return_code='0', job_id='36606829', GAL2='1.09', EG2='0.89', return_code2='0', energy_flux_error='6.20e-06', photon_flux_error2='2.69e-08', ts2='3.73', photon_index='2.19' WHERE bin_id='802' AND source_name='4FGL J1516.8+3651' AND cadence='weekly';

Database successfully updated.


Analysis Complete.


Tue Dec 19 01:05:23 PST 2023

