/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).

number of points = 7654
number of fields = 31
RA_SUN column already exists. File will not be modified.
/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)
Done.


Performing analysis on: 4FGL_J1816.9-4942_daily_bin2179
RA = 274.244, Dec = -49.7158
tmin = 804124801, tmax = 804384001
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='31687416', job_status='RUN', time_executed='2026-07-14 17:40:10.254585', time_epoch_executed='1784076010.25' WHERE source_name='4FGL J1816.9-4942' and cadence='daily' and bin_id='2179'

Database successfully updated.
Done.

Creating custom output directory:
/lscratch/kocevski/31687416

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/lscratch/kocevski/31687416/ft1_4FGL_J1816.9-4942_daily_bin2179.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/lscratch/kocevski/31687416/ft2_4FGL_J1816.9-4942_daily_bin2179.fits


Selecting the photons:
time -p gtselect infile=/lscratch/kocevski/31687416/ft1_4FGL_J1816.9-4942_daily_bin2179.fits outfile=/lscratch/kocevski/31687416/ft1_filteredMKT_4FGL_J1816.9-4942_daily_bin2179.fits ra=274.244 dec=-49.7158 rad=12.0 tmin=804124801.0 tmax=804384001.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 2.35
user 1.39
sys 0.16

Adding sun position to ft2 file:
/sdf/group/fermi/g/LCRepository/Repository/bin/sunpos /lscratch/kocevski/31687416/ft2_4FGL_J1816.9-4942_daily_bin2179.fits

Selecting the good time intervals:
time -p gtmktime scfile=/lscratch/kocevski/31687416/ft2_4FGL_J1816.9-4942_daily_bin2179.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/31687416/ft1_filteredMKT_4FGL_J1816.9-4942_daily_bin2179.fits evtable="EVENTS" outfile="/lscratch/kocevski/31687416/ft1_filtered_4FGL_J1816.9-4942_daily_bin2179.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.82
user 0.23
sys 0.12

Number of photons that the gtmktime cut: 30

Generating the livetime cube:
time -p gtltcube evfile="/lscratch/kocevski/31687416/ft1_filtered_4FGL_J1816.9-4942_daily_bin2179.fits" evtable="EVENTS" scfile=/lscratch/kocevski/31687416/ft2_4FGL_J1816.9-4942_daily_bin2179.fits sctable="SC_DATA" o
WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

max=200000.0 ebinfile=NONE tbinalg="LIN" tbinfile=NONE nxpix=500 nypix=500 binsz=0.1 coordsys="CEL" xref=274.244 yref=-49.7158 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.72
user 0.22
sys 0.13

Computing the diffuse response:
time -p gtdiffrsp evfile=/lscratch/kocevski/31686740/ft1_filtered_4FGL_J1816.9-4942_daily_bin2179.fits evtable="EVENTS" scfile=/lscratch/kocevski/31686740/ft2_4FGL_J1816.9-4942_daily_bin2179.fits sctable="SC_DATA" srcmdl=/lscratch/kocevski/31686740/Model_4FGL_J1816.9-4942_daily_bin2179.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 FGES J1631.6-4756
adding source FGES J1633.0-4746
adding source FGES J1652.2-4633
adding source FGES J1655.5-4737
adding source FGES J1745.8-3028
adding source FHES J1642.1-5428
adding source FHES J1741.6-3917
adding source G337.0-0.1
adding source GAL_V02
adding source HESS J1614-518
adding source HESS J1616-508
adding source RX J1713.7-3946
Working on...
/lscratch/kocevski/31686740/ft1_filtered_4FGL_J1816.9-4942_daily_bin2179.fits..............................!
real 9.38
user 7.64
sys 1.24

Creating the likelihood object...
obs = UnbinnedObs('/lscratch/kocevski/31686740/ft1_filtered_4FGL_J1816.9-4942_daily_bin2179.fits', '/lscratch/kocevski/31686740/ft2_4FGL_J1816.9-4942_daily_bin2179.fits', expMap='/lscratch/kocevski/31686740/expmap_804124801_804384001_4FGL_J1816.9-4942_daily_bin2179.fits', expCube='/lscratch/kocevski/31686740/ltcube_804124801_804384001_4FGL_J1816.9-4942_daily_bin2179.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/lscratch/kocevski/31686740/Model_4FGL_J1816.9-4942_daily_bin2179.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1816.9-4942'

4FGL J1816.9-4942
   Spectrum: LogParabola
1266         norm:  1.342e+00  0.000e+00  0.000e+00  1.000e+06 ( 1.000e-12)
1267        alpha:  2.245e+00  0.000e+00  0.000e+00  5.000e+00 ( 1.000e+00) fixed
1268         beta:  1.727e-01  0.000e+00 -5.000e+00  1.000e+01 ( 1.000e+00) fixed
1269           Eb:  9.507e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /lscratch/kocevski/31686740/ft1_filtered_4FGL_J1816.9-4942_daily_bin2179.fits
Spacecraft file(s): /lscratch/kocevski/31686740/ft2_4FGL_J1816.9-4942_daily_bin2179.fits
Exposure map: /lscratch/kocevski/31686740/expmap_804124801_804384001_4FGL_J1816.9-4942_daily_bin2179.fits
Exposure cube: /lscratch/kocevski/31686740/ltcube_804124801_804384001_4FGL_J1816.9-4942_daily_bin2179.fits
IRFs: P8R3_SOURCE_V2
Source model file: /lscratch/kocevski/31686740/Model_4FGL_J1816.9-4942_daily_bin2179.xml
Optimizer: MINUIT
Statistic: UNBINNED

Performing an iterative likelihood fit...

Fit tolerance = 1

Performing likelihood fit...
Done.

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    .10000E+07   1.0000          .0000       .10000E+07
     2 'Prefactor '    31.328       1.0000         .10000E-03   10000.    
     3 'Prefactor '    .71136E-04   1.0000          .0000       .10000E+07
     4 'norm      '    .24808       1.0000          .0000       .10000E+07
     5 'Prefactor '    .46140E-05   1.0000          .0000       .10000E+07
     6 'Prefactor '    7.6098       1.0000          .0000       .10000E+07
     7 'norm      '    .17004E-03   1.0000    utfile=/lscratch/kocevski/31687187/ltcube_804124801_804384001_4FGL_J1816.9-4942_daily_bin2179.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/31687187/ft2_4FGL_J1816.9-4942_daily_bin2179.fits
.....................!
real 9.50
user 8.45
sys 0.24

Generating the exposure map:
time -p gtexpmap evfile=/lscratch/kocevski/31687187/ft1_filtered_4FGL_J1816.9-4942_daily_bin2179.fits evtable="EVENTS" scfile=/lscratch/kocevski/31687187/ft2_4FGL_J1816.9-4942_daily_bin2179.fits sctable="SC_DATA" expcube=/lscratch/kocevski/31687187/ltcube_804124801_804384001_4FGL_J1816.9-4942_daily_bin2179.fits outfile=/lscratch/kocevski/31687187/expmap_804124801_804384001_4FGL_J1816.9-4942_daily_bin2179.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/31687187/ltcube_804124801_804384001_4FGL_J1816.9-4942_daily_bin2179.fits
.....................!
real 71.50
user 66.39
sys 4.05

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
Extended source FHES J1741.6-3917 in ROI with RadialDisk spatial model.
Extended source FGES J1631.6-4756 in ROI with RadialDisk spatial model.
Extended source FGES J1633.0-4746 in ROI with RadialDisk spatial model.
Extended source G337.0-0.1 in ROI with RadialDisk spatial model.
Extended source FHES J1642.1-5428 in ROI with RadialDisk spatial model.
Extended source FGES J1652.2-4633 in ROI with RadialDisk spatial model.
Extended source FGES J1655.5-4737 in ROI with RadialDisk spatial model.
Extended source RX J1713.7-3946 in ROI, make sure /sdf/group/fermi/g/LCRepository/Likelihood/ExtendedSources/Extended_8years/Templates/RXJ1713_2016_250GeV.fits is the correct path to the extended template.
Extended source HESS J1614-518 in ROI with RadialDisk spatial model.
Extended source HESS J1616-508 in ROI with RadialDisk spatial model.
Extended source FGES J1745.8-3028 in ROI with RadialDisk spatial model.
Added 459 point sources and 11 extended sources
If using unbinned likelihood you will need to rerun gtdiffrsp for the extended sources or rerun the makeModel function with optional argument psForce=True

Setting source of interest to:
4FGL J1816.9-4942 @ 274.244 -49.7158

Creating the counts map:
time -p gtbin evfile=/lscratch/kocevski/31687187/ft1_filtered_4FGL_J1816.9-4942_daily_bin2179.fits scfile=/lscratch/kocevski/31687187/ft2_4FGL_J1816.9-4942_daily_bin2179.fits outfile=/lscratch/kocevski/31687187/cmap_804124801_804384001_4FGL_J1816.9-4942_daily_bin2179.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=274.244 yref=-49.7158 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.85
user 0.22
sys 0.13

Creating the high resolution counts map:
time -p gtbin evfile=/lscratch/kocevski/31687187/ft1_filtered_4FGL_J1816.9-4942_daily_bin2179.fits scfile=/lscratch/kocevski/31687187/ft2_4FGL_J1816.9-4942_daily_bin2179.fits outfile=/lscratch/kocevski/31687187/cmap_HighResolution_804124801_804384001_4FGL_J1816.9-4942_daily_bin2179.fits algorithm="CMAP" ebinalg="LOG" emin=30.0 e      .0000       .10000E+07
     8 'norm      '    8.3367       1.0000          .0000       .10000E+07
     9 'Prefactor '    7371.3       1.0000          .0000       .10000E+07
    10 'norm      '    1045.4       1.0000          .0000       .10000E+07
    11 'Prefactor '    .37972E-01   1.0000          .0000       .10000E+07
    12 'norm      '    .10283E-05   1.0000          .0000       .10000E+07
    13 'norm      '    .39968E-08   1.0000          .0000       .10000E+07
    14 'norm      '    .33553       1.0000          .0000       .10000E+07
    15 'norm      '    .17966E-03   1.0000          .0000       .10000E+07
    16 'Prefactor '    .31965E-04   1.0000          .0000       .10000E+07
    17 'Prefactor '    .31510E-04   1.0000          .0000       .10000E+07
    18 'Prefactor '    .20395E-06   1.0000          .0000       .10000E+07
    19 'norm      '    .52286E-02   1.0000          .0000       .10000E+07
    20 'Normalizat'    .90724E-01   1.0000         .10000E-01   10.000    
    21 'Prefactor '    .49200       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .1693E+06   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.
  MNHESS FAILS AND WILL RETURN DIAGONAL MATRIX. 

 FCN=   332.4473     FROM MIGRAD    STATUS=CONVERGED    276 CALLS     1298 TOTAL
                     EDM=   .14E-10  STRATEGY=1  ERROR MATRIX UNCERTAINTY=100.0%

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          .10000E+07    41864.        .42118E-01** at limit **
   2  Prefactor     .14753E-03    7625.4        .17897E-02** at limit **
   3  Prefactor      .0000        93.478        .42118E-03** at limit **
   4  norm           .0000        353.81        .10976E-02** at limit **
   5  Prefactor      .0000        73.903        .42118E-03** at limit **
   6  Prefactor      .0000        551.89        .36329E-03** at limit **
   7  norm          .33307E-09    241.48        .42118E-03** at limit **
   8  norm          8.3367        1.0018         .0000         .0000    
   9  Prefactor     7372.8        1.0001        .78499E-08   -.14725    
  10  norm          1046.1        1.0003        .96416E-08   -.26175E-01
  11  Prefactor      .0000        .64452        .90534E-07** at limit **
  12  norm           .0000        .44347E-01   -.10249E-06** at limit **
  13  norm           .0000        .44347E-01   -.23889E-06** at limit **
  14  norm          .33658        .56491       -.58942E-07    .14522E-04
  15  norm          .22204E-09    .44347E-01    .36420E-06** at limit **
  16  Prefactor      .0000        .44347E-01    .32405E-07** at limit **
  17  Prefactor      .0000        .44347E-01   -.85169E-08** at limit **
  18  Prefactor      .0000        .44347E-01   -.38016E-06** at limit **
  19  norm           .0000        .44347E-01    .90041E-07** at limit **
  20  Normalizat    .91050E-01    .29393       -.10856E-04    .60137E-06
  21  Prefactor     .49187        .83338        .12542E-04    .27237E-04
                               ERR DEF=  .500    
Final values: 
  norm       = 1e+06
  Prefactor  = 0.000147528
  Prefactor  = 0
  norm       = 0
  Prefactor  = 0
  Prefactor  = 0
  norm       = 3.33067e-10
  norm       = 8.33668
  Prefactor  = 7372.79
  norm       = 1046.08
  Prefactor  = 0
  norm       = 0
  norm       = 0
  norm       = 0.336576
  norm       = 2.22045e-10
  Prefactor  = 0
  Prefactor  = 0
  Prefactor  = 0
  norm       = 0
  Normalizat = 0.0910501
  Prefactor  = 0.491868
 **********
 **   18 **HESSE 
 **********
  MNHESS FAILS AND WILL RETURN DIAGONAL MATRIX. 

 FCN=   332.4473     FROM HESSE     STATUS=FAILED        25 CALLS     1323 TOTAL
                     EDM=   .14E-10  STRATEGY=1  ERROR MATRIX UNCERTAINTY=100.0%

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          .10000E+07    41864.        .42118E-01    1.5705    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .14753E-03    7625.4        .17897E-02   -1.5709    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor      .0000        93.478        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  norm           .0000        353.81        .10976E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor      .0000        73.903        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor      .0000        551.89        .36329E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  norm          .33307E-09    241.48        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          28822.        28814.         .0000       -1.5650    
   9  Prefactor     7372.8        1.0001        .78499E-08   -1.3989    
  10  norm          1046.1        1.0003        .96416E-08   -1.5061    
  11  Prefactor      .0000        .64452        .90534E-07   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  norm           .0000        .44347E-01   -.10249E-06   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm           .0000        .44347E-01   -.23889E-06   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  norm          .33658        .56491       -.58942E-07   -1.5696    
  15  norm          .22204E-09    .44347E-01    .36420E-06   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor      .0000        .44347E-01    .32405E-07   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor      .0000        .44347E-01   -.85169E-08   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor      .0000        .44347E-01   -.38016E-06   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  norm           .0000        .44347E-01    .90041E-07   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Normalizat    .91050E-01    .29393       -.10856E-04   -1.3904    
  21  Prefactor     .49187        .83338        .12542E-04   -1.1235    
                               ERR DEF=  .500    
Minuit fit quality: 1   estimated distance: 1.42827e-11
Minuit parameter uncertainties:
  1  54.0551
  2  1.11741
  3  3.34665e-05
  4  1.19012e-06
  5  2.01449e-05
  6  0.000113808
  7  0.000547421
  8  1.00181
  9  1.0001
  10  1.00034
  11  3.70303e-07
  12  5.04561e-07
  13  2.25049e-07
  14  0.564906
  15  6.10762e-06
  16  1.14627e-06
  17  6.73213e-07
  18  5.4722e-07
  19  1.45961e-06
  20  0.299474
  21  0.855517
Done.

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

Extracting fit parameters...

4FGL J1816.9-4942
   Spectrum: LogParabola
1266         norm:  0.000e+00  5.046e-07  0.000e+00  1.000e+06 ( 1.000e-12)
1267        alpha:  2.245e+00  0.000e+00  0.000e+00  5.000e+00 ( 1.000e+00) fixed
1268         beta:  1.727e-01  0.000e+00 -5.000e+00  1.000e+01 ( 1.000e+00) fixed
1269           Eb:  9.507e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
1679    Prefactor:  4.919e-01  8.555e-01  0.000e+00  1.000e+01 ( 1.000e+00)
1680        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
1681        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
1652   Normalization:  9.105e-02  2.995e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 0.00
Ra Dec: 274.244 -49.716
Photon Flux Upper Limit: 1.87312065584e-06 ph cm-2 s-1
Energy Flux Upper Limit: None

Saving results to:
/lscratch/kocevski/31686740/likelihoodResults_804124801_804384001_4FGL_J1816.9-4942_daily_bin2179.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) = 332.448956439
delta logL = -0.00163809734153

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 332.447321881
delta logL = -3.53892750127e-06

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    .13893E-03   1.0000          .0000       .10000E+07
     2 'alpha     '    3.1274       1.0000          .0000       5.0000    
     3 'Normalizat'    .91060E-01   1.0000         .10000E-01   10.000    
     4 'Prefactor '    .49195       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .1693E+06   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   332.4473     FROM MIGRAD    STATUS=CONVERGED     86 CALLS      273 TOTAL
                     EDM=   .56E-10    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          .55511E-08    5.1224        .42118E-03** at limit **
   2  alpha         2.6419        3.2204        .42922        .16554E-09
   3  Normalizat    .91045E-01    .81915E-02    .22899        .55786E-04
   4  Prefactor     .49187        .27828E-02    .29234E-01    .48268E-03
                               ERR DEF=  .500    
Final values: 
  norm       = 5.55112e-09
  alpha      = 2.64188
  Normalizat = 0.0910455
  Prefactor  = 0.491874
 **********
 **   18 **HESSE 
 **********

 FCN=   332.4473     FROM HESSE     STATUS=NOT POSDEF    33 CALLS      306 TOTAL
                     EDM=   .24E-09    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          .55511E-08    22.549        .84235E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  alpha         2.6419        3.5977        .50000        .56783E-01
   3  Normalizat    .91045E-01    .19004E-01    .91769E-02   -1.3904    
   4  Prefactor     .49187        .58409E-02    .12918E-03   -1.1235    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 2.42148e-10
Minuit parameter uncertainties:
  1  0.000706306
  2  69061.7
  3  0.0190054
  4  0.00584088
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 332.447318343
delta logL = -7.17818693374e-10

Extracting fit parameters...

4FGL J1816.9-4942
   Spectrum: LogParabola
1266         norm:  5.551e-09  7.063e-04  0.000e+00  1.000e+06 ( 1.000e-12)
1267        alpha:  2.642e+00  6.906e+04  0.000e+00  5.000e+00 ( 1.000e+00)
1268         beta:  1.727e-01  0.000e+00 -5.000e+00  1.000e+01 ( 1.000e+00) fixed
1269           Eb:  9.507e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
1679    Prefactor:  4.919e-01  5.841e-03  0.000e+00  1.000e+01 ( 1.000e+00)
1680        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
1681        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
1652   Normalization:  9.105e-02  1.901e-02  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 0.00
Ra Dec: 274.244 -49.716

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 /lscratch/kocevski/31686740/cmap_HighResolution_804124801_804384001_4FGL_J1816.9-4942_daily_bin2179.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET job_status='DONE', comment='SUCCESS', photon_flux_upper_limit='1.87e-06', time_completed='2026-07-14 17:43:40.966950', job_id='31686740', GAL2='0.49', fit_tolerance='1e-08', EG2='0.09', EG='0.09', time_epoch_completed='1784076220.97', return_code2='102', ts='0.00', return_code='101', GAL='0.49', dlogl='-7.18e-10', ts2='-0.00', photon_index_error='0.00', photon_index='2.24' WHERE bin_id='2179' AND source_name='4FGL J1816.9-4942' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Tue Jul 14 17:43:41 PDT 2026

number of points = 7654
number of fields = 31
RA_SUN column already exists. File will not be modified.
Done.


Performing analysis on: 4FGL_J1816.9-4942_daily_bin2179
RA = 274.244, Dec = -49.7158
tmin = 804124801, tmax = 804384001
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='31687461', job_status='RUN', time_executed='2026-07-14 17:40:45.524004', time_epoch_executed='1784076045.52' WHERE source_name='4FGL J1816.9-4942' and cadence='daily' and bin_id='2179'

Database successfully updated.
Done.

Creating custom output directory:
/lscratch/kocevski/31687461

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/lscratch/kocevski/31687461/ft1_4FGL_J1816.9-4942_daily_bin2179.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/lscratch/kocevski/31687461/ft2_4FGL_J1816.9-4942_daily_bin2179.fits


Selecting the photons:
time -p gtselect infile=/lscratch/kocevski/31687461/ft1_4FGL_J1816.9-4942_daily_bin2179.fits outfile=/lscratch/kocevski/31687461/ft1_filteredMKT_4FGL_J1816.9-4942_daily_bin2179.fits ra=274.244 dec=-49.7158 rad=12.0 tmin=804124801.0 tmax=804384001.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 2.21
user 1.40
sys 0.16

Adding sun position to ft2 file:
/sdf/group/fermi/g/LCRepository/Repository/bin/sunpos /lscratch/kocevski/31687461/ft2_4FGL_J1816.9-4942_daily_bin2179.fits

Selecting the good time intervals:
time -p gtmktime scfile=/lscratch/kocevski/31687461/ft2_4FGL_J1816.9-4942_daily_bin2179.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/31687461/ft1_filteredMKT_4FGL_J1816.9-4942_daily_bin2179.fits evtable="EVENTS" outfile="/lscratch/kocevski/31687461/ft1_filtered_4FGL_J1816.9-4942_daily_bin2179.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.79
user 0.20
sys 0.13

Number of photons that the gtmktime cut: 30

Generating the livetime cube:
time -p gtltcube evfile="/lscratch/kocevski/31687461/ft1_filtered_4FGL_J1816.9-4942_daily_bin2179.fits" evtable="EVENTS" scfile=/lscratch/kocevski/31687461/ft2_4FGL_J1816.9-4942_daily_bin2179.fits sctable="SC_DATA" outfile=/lscratch/kocevski/31687416/ltcube_804124801_804384001_4FGL_J1816.9-4942_daily_bin2179.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/31687416/ft2_4FGL_J1816.9-4942_daily_bin2179.fits
.....................!
real 9.28
user 8.51
sys 0.24

Generating the exposure map:
time -p gtexpmap evfile=/lscratch/kocevski/31687416/ft1_filtered_4FGL_J1816.9-4942_daily_bin2179.fits evtable="EVENTS" scfile=/lscratch/kocevski/31687416/ft2_4FGL_J1816.9-4942_daily_bin2179.fits sctable="SC_DATA" expcube=/lscratch/kocevski/31687416/ltcube_804124801_804384001_4FGL_J1816.9-4942_daily_bin2179.fits outfile=/lscratch/kocevski/31687416/expmap_804124801_804384001_4FGL_J1816.9-4942_daily_bin2179.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/31687416/ltcube_804124801_804384001_4FGL_J1816.9-4942_daily_bin2179.fits
.....................!
real 72.85
user 67.70
sys 4.18

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
Extended source FHES J1741.6-3917 in ROI with RadialDisk spatial model.
Extended source FGES J1631.6-4756 in ROI with RadialDisk spatial model.
Extended source FGES J1633.0-4746 in ROI with RadialDisk spatial model.
Extended source G337.0-0.1 in ROI with RadialDisk spatial model.
Extended source FHES J1642.1-5428 in ROI with RadialDisk spatial model.
Extended source FGES J1652.2-4633 in ROI with RadialDisk spatial model.
Extended source FGES J1655.5-4737 in ROI with RadialDisk spatial model.
Extended source RX J1713.7-3946 in ROI, make sure /sdf/group/fermi/g/LCRepository/Likelihood/ExtendedSources/Extended_8years/Templates/RXJ1713_2016_250GeV.fits is the correct path to the extended template.
Extended source HESS J1614-518 in ROI with RadialDisk spatial model.
Extended source HESS J1616-508 in ROI with RadialDisk spatial model.
Extended source FGES J1745.8-3028 in ROI with RadialDisk spatial model.
Added 459 point sources and 11 extended sources
If using unbinned likelihood you will need to rerun gtdiffrsp for the extended sources or rerun the makeModel function with optional argument psForce=True

Setting source of interest to:
4FGL J1816.9-4942 @ 274.244 -49.7158

Creating the counts map:
time -p gtbin evfile=/lscratch/kocevski/31687416/ft1_filtered_4FGL_J1816.9-4942_daily_bin2179.fits scfile=/lscratch/kocevski/31687416/ft2_4FGL_J1816.9-4942_daily_bin2179.fits outfile=/lscratch/kocevski/31687416/cmap_804124801_804384001_4FGL_J1816.9-4942_daily_bin2179.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=274.244 yref=-49.7158 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.75
user 0.24
sys 0.12

Creating the high resolution counts map:
time -p gtbin evfile=/lscratch/kocevski/31687416/ft1_filtered_4FGL_J1816.9-4942_daily_bin2179.fits scfile=/lscratch/kocevski/31687416/ft2_4FGL_J1816.9-4942_daily_bin2179.fits outfile=/lscratch/kocevski/31687416/cmap_HighResolution_804124801_804384001_4FGL_J1816.9-4942_daily_bin2179.fits algorithm="CMAP" ebinalg="LOG" emin=30.0 enumber of points = 7654
number of fields = 31
RA_SUN column already exists. File will not be modified.
Done.


Performing analysis on: 4FGL_J1816.9-4942_daily_bin2179
RA = 274.244, Dec = -49.7158
tmin = 804124801, tmax = 804384001
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='31687727', job_status='RUN', time_executed='2026-07-14 17:42:05.684606', time_epoch_executed='1784076125.68' WHERE source_name='4FGL J1816.9-4942' and cadence='daily' and bin_id='2179'

Database successfully updated.
Done.

Creating custom output directory:
/lscratch/kocevski/31687727

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/lscratch/kocevski/31687727/ft1_4FGL_J1816.9-4942_daily_bin2179.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/lscratch/kocevski/31687727/ft2_4FGL_J1816.9-4942_daily_bin2179.fits


Selecting the photons:
time -p gtselect infile=/lscratch/kocevski/31687727/ft1_4FGL_J1816.9-4942_daily_bin2179.fits outfile=/lscratch/kocevski/31687727/ft1_filteredMKT_4FGL_J1816.9-4942_daily_bin2179.fits ra=274.244 dec=-49.7158 rad=12.0 tmin=804124801.0 tmax=804384001.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 2.06
user 1.41
sys 0.14

Adding sun position to ft2 file:
/sdf/group/fermi/g/LCRepository/Repository/bin/sunpos /lscratch/kocevski/31687727/ft2_4FGL_J1816.9-4942_daily_bin2179.fits

Selecting the good time intervals:
time -p gtmktime scfile=/lscratch/kocevski/31687727/ft2_4FGL_J1816.9-4942_daily_bin2179.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/31687727/ft1_filteredMKT_4FGL_J1816.9-4942_daily_bin2179.fits evtable="EVENTS" outfile="/lscratch/kocevski/31687727/ft1_filtered_4FGL_J1816.9-4942_daily_bin2179.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.70
user 0.19
sys 0.15

Number of photons that the gtmktime cut: 30

Generating the livetime cube:
time -p gtltcube evfile="/lscratch/kocevski/31687727/ft1_filtered_4FGL_J1816.9-4942_daily_bin2179.fits" evtable="EVENTS" scfile=/lscratch/kocevski/31687727/ft2_4FGL_J1816.9-4942_daily_bin2179.fits sctable="SC_DATA" omax=200000.0 ebinfile=NONE tbinalg="LIN" tbinfile=NONE nxpix=500 nypix=500 binsz=0.1 coordsys="CEL" xref=274.244 yref=-49.7158 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.80
user 0.23
sys 0.13

Computing the diffuse response:
time -p gtdiffrsp evfile=/lscratch/kocevski/31687187/ft1_filtered_4FGL_J1816.9-4942_daily_bin2179.fits evtable="EVENTS" scfile=/lscratch/kocevski/31687187/ft2_4FGL_J1816.9-4942_daily_bin2179.fits sctable="SC_DATA" srcmdl=/lscratch/kocevski/31687187/Model_4FGL_J1816.9-4942_daily_bin2179.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 FGES J1631.6-4756
adding source FGES J1633.0-4746
adding source FGES J1652.2-4633
adding source FGES J1655.5-4737
adding source FGES J1745.8-3028
adding source FHES J1642.1-5428
adding source FHES J1741.6-3917
adding source G337.0-0.1
adding source GAL_V02
adding source HESS J1614-518
adding source HESS J1616-508
adding source RX J1713.7-3946
Working on...
/lscratch/kocevski/31687187/ft1_filtered_4FGL_J1816.9-4942_daily_bin2179.fits..............................!
real 9.36
user 7.87
sys 1.02

Creating the likelihood object...
obs = UnbinnedObs('/lscratch/kocevski/31687187/ft1_filtered_4FGL_J1816.9-4942_daily_bin2179.fits', '/lscratch/kocevski/31687187/ft2_4FGL_J1816.9-4942_daily_bin2179.fits', expMap='/lscratch/kocevski/31687187/expmap_804124801_804384001_4FGL_J1816.9-4942_daily_bin2179.fits', expCube='/lscratch/kocevski/31687187/ltcube_804124801_804384001_4FGL_J1816.9-4942_daily_bin2179.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/lscratch/kocevski/31687187/Model_4FGL_J1816.9-4942_daily_bin2179.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1816.9-4942'

4FGL J1816.9-4942
   Spectrum: LogParabola
1266         norm:  1.342e+00  0.000e+00  0.000e+00  1.000e+06 ( 1.000e-12)
1267        alpha:  2.245e+00  0.000e+00  0.000e+00  5.000e+00 ( 1.000e+00) fixed
1268         beta:  1.727e-01  0.000e+00 -5.000e+00  1.000e+01 ( 1.000e+00) fixed
1269           Eb:  9.507e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /lscratch/kocevski/31687187/ft1_filtered_4FGL_J1816.9-4942_daily_bin2179.fits
Spacecraft file(s): /lscratch/kocevski/31687187/ft2_4FGL_J1816.9-4942_daily_bin2179.fits
Exposure map: /lscratch/kocevski/31687187/expmap_804124801_804384001_4FGL_J1816.9-4942_daily_bin2179.fits
Exposure cube: /lscratch/kocevski/31687187/ltcube_804124801_804384001_4FGL_J1816.9-4942_daily_bin2179.fits
IRFs: P8R3_SOURCE_V2
Source model file: /lscratch/kocevski/31687187/Model_4FGL_J1816.9-4942_daily_bin2179.xml
Optimizer: MINUIT
Statistic: UNBINNED

Performing an iterative likelihood fit...

Fit tolerance = 1

Performing likelihood fit...
Done.

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    .10000E+07   1.0000          .0000       .10000E+07
     2 'Prefactor '    31.328       1.0000         .10000E-03   10000.    
     3 'Prefactor '    .71136E-04   1.0000          .0000       .10000E+07
     4 'norm      '    .24808       1.0000          .0000       .10000E+07
     5 'Prefactor '    .46140E-05   1.0000          .0000       .10000E+07
     6 'Prefactor '    7.6098       1.0000          .0000       .10000E+07
     7 'norm      '    .17004E-03   1.0000          .0000       .10000E+07
     8 'norm      '    8.3367       1.0000          .0000       .10000E+07
     9 'Prefactor '    7371.3       1.0000          .0000       .10000E+07
    10 'norm      '    1045.4       1.0000          .0000       .10000E+07
    11 'Prefactor '    .37972E-01   1.0000          .0000       .10000E+07
    12 'norm      '    .10283E-05   1.0000          .0000       .10000E+07
    13 'norm      '    .39968E-08   1.0000          .0000       .10000E+07
    14 'norm      '    .33553       1.0000          .0000       .10000E+07
    15 'norm      '    .17966E-03   1.0000          .0000       .10000E+07
    16 'Prefactor '    .31965E-04   1.0000          .0000       .10000E+07
    17 'Prefactor '    .31510E-04   1.0000          .0000       .10000E+07
    18 'Prefactor '    .20395E-06   1.0000          .0000       .10000E+07
    19 'norm      '    .52286E-02   1.0000          .0000       .10000E+07
    20 'Normalizat'    .90724E-01   1.0000         .10000E-01   10.000    
    21 'Prefactor '    .49200       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .1693E+06   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.
  MNHESS FAILS AND WILL RETURN DIAGONAL MATRIX. 

 FCN=   332.4473     FROM MIGRAD    STATUS=CONVERGED    276 CALLS     1298 TOTAL
                     EDM=   .14E-10  STRATEGY=1  ERROR MATRIX UNCERTAINTY=100.0%

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          .10000E+07    41864.        .42118E-01** at limit **
   2  Prefactor     .14753E-03    7625.4        .17897E-02** at limit **
   3  Prefactor      .0000        93.478        .42118E-03** at limit **
   4  norm           .0000        353.81        .10976E-02** at limit **
   5  Prefactor      .0000        73.903        .42118E-03** at limit **
   6  Prefactor      .0000        551.89        .36329E-03** at limit **
   7  norm          .33307E-09    241.48        .42118E-03** at limit **
   8  norm          8.3367        1.0018         .0000         .0000    
   9  Prefactor     7372.8        1.0001        .78499E-08   -.14725    
  10  norm          1046.1        1.0003        .96416E-08   -.26175E-01
  11  Prefactor      .0000        .64452        .90534E-07** at limit **
  12  norm           .0000        .44347E-01   -.10249E-06** at limit **
  13  norm           .0000        .44347E-01   -.23889E-06** at limit **
  14  norm          .33658        .56491       -.58942E-07    .14522E-04
  15  norm          .22204E-09    .44347E-01    .36420E-06** at limit **
  16  Prefactor      .0000        .44347E-01    .32405E-07** at limit **
  17  Prefactor      .0000        .44347E-01   -.85169E-08** at limit **
  18  Prefactor      .0000        .44347E-01   -.38016E-06** at limit **
  19  norm           .0000        .44347E-01    .90041E-07** at limit **
  20  Normalizat    .91050E-01    .29393       -.10856E-04    .60137E-06
  21  Prefactor     .49187        .83338        .12542E-04    .27237E-04
                               ERR DEF=  .500    
Final values: 
  norm       = 1e+06
  Prefactor  = 0.000147528
  Prefactor  = 0
  norm       = 0
  Prefactor  = 0
  Prefactor  = 0
  norm       = 3.33067e-10
  norm       = 8.33668
  Prefactor  = 7372.79
  norm       = 1046.08
  Prefactor  = 0
  norm       = 0
  norm       = 0
  norm       = 0.336576
  norm       = 2.22045e-10
  Prefactor  = 0
  Prefactor  = 0
  Prefactor  = 0
  norm       = 0
  Normalizat = 0.0910501
  Prefactor  = 0.491868
 **********
 **   18 **HESSE 
 **********
  MNHESS FAILS AND WILL RETURN DIAGONAL MATRIX. 

 FCN=   332.4473     FROM HESSE     STATUS=FAILED        25 CALLS     1323 TOTAL
                     EDM=   .14E-10  STRATEGY=1  ERROR MATRIX UNCERTAINTY=100.0%

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          .10000E+07    41864.        .42118E-01    1.5705    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .14753E-03    7625.4        .17897E-02   -1.5709    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor      .0000        93.478        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  norm           .0000        353.81        .10976E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor      .0000        73.903        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor      .0000        551.89        .36329E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  norm          .33307E-09    241.48        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          28822.        28814.         .0000       -1.5650    
   9  Prefactor     7372.8        1.0001        .78499E-08   -1.3989    
  10  norm          1046.1        1.0003        .96416E-08   -1.5061    
  11  Prefactor      .0000        .64452        .90534E-07   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  norm           .0000        .44347E-01   -.10249E-06   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm           .0000        .44347E-01   -.23889E-06   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  norm          .33658        .56491       -.58942E-07   -1.5696    
  15  norm          .22204E-09    .44347E-01    .36420E-06   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor      .0000        .44347E-01    .32405E-07   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor      .0000        .44347E-01   -.85169E-08   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor      .0000        .44347E-01   -.38016E-06   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  norm           .0000        .44347E-01    .90041E-07   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Normalizat    .91050E-01    .29393       -.10856E-04   -1.3904    
  21  Prefactor     .49187        .83338        .12542E-04   -1.1235    
                               ERR DEF=  .500    
Minuit fit quality: 1   estimated distance: 1.42827e-11
Minuit parameter uncertainties:
  1  54.0551
  2  1.11741
  3  3.34665e-05
  4  1.19012e-06
  5  2.01449e-05
  6  0.000113808
  7  0.000547421
  8  1.00181
  9  1.0001
  10  1.00034
  11  3.70303e-07
  12  5.04561e-07
  13  2.25049e-07
  14  0.564906
  15  6.10762e-06
  16  1.14627e-06
  17  6.73213e-07
  18  5.4722e-07
  19  1.45961e-06
  20  0.299474
  21  0.855517
Done.

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

Extracting fit parameters...

4FGL J1816.9-4942
   Spectrum: LogParabola
1266         norm:  0.000e+00  5.046e-07  0.000e+00  1.000e+06 ( 1.000e-12)
1267        alpha:  2.245e+00  0.000e+00  0.000e+00  5.000e+00 ( 1.000e+00) fixed
1268         beta:  1.727e-01  0.000e+00 -5.000e+00  1.000e+01 ( 1.000e+00) fixed
1269           Eb:  9.507e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
1679    Prefactor:  4.919e-01  8.555e-01  0.000e+00  1.000e+01 ( 1.000e+00)
1680        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
1681        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
1652   Normalization:  9.105e-02  2.995e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 0.00
Ra Dec: 274.244 -49.716
Photon Flux Upper Limit: 1.87312065584e-06 ph cm-2 s-1
Energy Flux Upper Limit: None

Saving results to:
/lscratch/kocevski/31687187/likelihoodResults_804124801_804384001_4FGL_J1816.9-4942_daily_bin2179.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) = 332.448956439
delta logL = -0.00163809734153

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 332.447321881
delta logL = -3.53892750127e-06

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    .13893E-03   1.0000          .0000       .10000E+07
     2 'alpha     '    3.1274       1.0000          .0000       5.0000    
     3 'Normalizat'    .91060E-01   1.0000         .10000E-01   10.000    
     4 'Prefactor '    .49195       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .1693E+06   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   332.4473     FROM MIGRAD    STATUS=CONVERGED     86 CALLS      273 TOTAL
                     EDM=   .56E-10    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          .55511E-08    5.1224        .42118E-03** at limit **
   2  alpha         2.6419        3.2204        .42922        .16554E-09
   3  Normalizat    .91045E-01    .81915E-02    .22899        .55786E-04
   4  Prefactor     .49187        .27828E-02    .29234E-01    .48268E-03
                               ERR DEF=  .500    
Final values: 
  norm       = 5.55112e-09
  alpha      = 2.64188
  Normalizat = 0.0910455
  Prefactor  = 0.491874
 **********
 **   18 **HESSE 
 **********

 FCN=   332.4473     FROM HESSE     STATUS=NOT POSDEF    33 CALLS      306 TOTAL
                     EDM=   .24E-09    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          .55511E-08    22.549        .84235E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  alpha         2.6419        3.5977        .50000        .56783E-01
   3  Normalizat    .91045E-01    .19004E-01    .91769E-02   -1.3904    
   4  Prefactor     .49187        .58409E-02    .12918E-03   -1.1235    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 2.42148e-10
Minuit parameter uncertainties:
  1  0.000706306
  2  69061.7
  3  0.0190054
  4  0.00584088
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 332.447318343
delta logL = -7.17818693374e-10

Extracting fit parameters...

4FGL J1816.9-4942
   Spectrum: LogParabola
1266         norm:  5.551e-09  7.063e-04  0.000e+00  1.000e+06 ( 1.000e-12)
1267        alpha:  2.642e+00  6.906e+04  0.000e+00  5.000e+00 ( 1.000e+00)
1268         beta:  1.727e-01  0.000e+00 -5.000e+00  1.000e+01 ( 1.000e+00) fixed
1269           Eb:  9.507e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
1679    Prefactor:  4.919e-01  5.841e-03  0.000e+00  1.000e+01 ( 1.000e+00)
1680        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
1681        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
1652   Normalization:  9.105e-02  1.901e-02  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 0.00
Ra Dec: 274.244 -49.716

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 /lscratch/kocevski/31687187/cmap_HighResolution_804124801_804384001_4FGL_J1816.9-4942_daily_bin2179.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET job_status='DONE', comment='SUCCESS', photon_flux_upper_limit='1.87e-06', time_completed='2026-07-14 17:44:54.310752', job_id='31687187', GAL2='0.49', fit_tolerance='1e-08', EG2='0.09', EG='0.09', time_epoch_completed='1784076294.31', return_code2='102', ts='0.00', return_code='101', GAL='0.49', dlogl='-7.18e-10', ts2='-0.00', photon_index_error='0.00', photon_index='2.24' WHERE bin_id='2179' AND source_name='4FGL J1816.9-4942' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Tue Jul 14 17:44:54 PDT 2026

utfile=/lscratch/kocevski/31687461/ltcube_804124801_804384001_4FGL_J1816.9-4942_daily_bin2179.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/31687461/ft2_4FGL_J1816.9-4942_daily_bin2179.fits
.....................!
real 9.28
user 8.56
sys 0.23

Generating the exposure map:
time -p gtexpmap evfile=/lscratch/kocevski/31687461/ft1_filtered_4FGL_J1816.9-4942_daily_bin2179.fits evtable="EVENTS" scfile=/lscratch/kocevski/31687461/ft2_4FGL_J1816.9-4942_daily_bin2179.fits sctable="SC_DATA" expcube=/lscratch/kocevski/31687461/ltcube_804124801_804384001_4FGL_J1816.9-4942_daily_bin2179.fits outfile=/lscratch/kocevski/31687461/expmap_804124801_804384001_4FGL_J1816.9-4942_daily_bin2179.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/31687461/ltcube_804124801_804384001_4FGL_J1816.9-4942_daily_bin2179.fits
.....................!
real 72.58
user 67.44
sys 4.22

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
Extended source FHES J1741.6-3917 in ROI with RadialDisk spatial model.
Extended source FGES J1631.6-4756 in ROI with RadialDisk spatial model.
Extended source FGES J1633.0-4746 in ROI with RadialDisk spatial model.
Extended source G337.0-0.1 in ROI with RadialDisk spatial model.
Extended source FHES J1642.1-5428 in ROI with RadialDisk spatial model.
Extended source FGES J1652.2-4633 in ROI with RadialDisk spatial model.
Extended source FGES J1655.5-4737 in ROI with RadialDisk spatial model.
Extended source RX J1713.7-3946 in ROI, make sure /sdf/group/fermi/g/LCRepository/Likelihood/ExtendedSources/Extended_8years/Templates/RXJ1713_2016_250GeV.fits is the correct path to the extended template.
Extended source HESS J1614-518 in ROI with RadialDisk spatial model.
Extended source HESS J1616-508 in ROI with RadialDisk spatial model.
Extended source FGES J1745.8-3028 in ROI with RadialDisk spatial model.
Added 459 point sources and 11 extended sources
If using unbinned likelihood you will need to rerun gtdiffrsp for the extended sources or rerun the makeModel function with optional argument psForce=True

Setting source of interest to:
4FGL J1816.9-4942 @ 274.244 -49.7158

Creating the counts map:
time -p gtbin evfile=/lscratch/kocevski/31687461/ft1_filtered_4FGL_J1816.9-4942_daily_bin2179.fits scfile=/lscratch/kocevski/31687461/ft2_4FGL_J1816.9-4942_daily_bin2179.fits outfile=/lscratch/kocevski/31687461/cmap_804124801_804384001_4FGL_J1816.9-4942_daily_bin2179.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=274.244 yref=-49.7158 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.72
user 0.23
sys 0.12

Creating the high resolution counts map:
time -p gtbin evfile=/lscratch/kocevski/31687461/ft1_filtered_4FGL_J1816.9-4942_daily_bin2179.fits scfile=/lscratch/kocevski/31687461/ft2_4FGL_J1816.9-4942_daily_bin2179.fits outfile=/lscratch/kocevski/31687461/cmap_HighResolution_804124801_804384001_4FGL_J1816.9-4942_daily_bin2179.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=274.244 yref=-49.7158 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.84
user 0.24
sys 0.13

Computing the diffuse response:
time -p gtdiffrsp evfile=/lscratch/kocevski/31687416/ft1_filtered_4FGL_J1816.9-4942_daily_bin2179.fits evtable="EVENTS" scfile=/lscratch/kocevski/31687416/ft2_4FGL_J1816.9-4942_daily_bin2179.fits sctable="SC_DATA" srcmdl=/lscratch/kocevski/31687416/Model_4FGL_J1816.9-4942_daily_bin2179.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 FGES J1631.6-4756
adding source FGES J1633.0-4746
adding source FGES J1652.2-4633
adding source FGES J1655.5-4737
adding source FGES J1745.8-3028
adding source FHES J1642.1-5428
adding source FHES J1741.6-3917
adding source G337.0-0.1
adding source GAL_V02
adding source HESS J1614-518
adding source HESS J1616-508
adding source RX J1713.7-3946
Working on...
/lscratch/kocevski/31687416/ft1_filtered_4FGL_J1816.9-4942_daily_bin2179.fits..............................!
real 9.78
user 8.15
sys 1.02

Creating the likelihood object...
obs = UnbinnedObs('/lscratch/kocevski/31687416/ft1_filtered_4FGL_J1816.9-4942_daily_bin2179.fits', '/lscratch/kocevski/31687416/ft2_4FGL_J1816.9-4942_daily_bin2179.fits', expMap='/lscratch/kocevski/31687416/expmap_804124801_804384001_4FGL_J1816.9-4942_daily_bin2179.fits', expCube='/lscratch/kocevski/31687416/ltcube_804124801_804384001_4FGL_J1816.9-4942_daily_bin2179.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/lscratch/kocevski/31687416/Model_4FGL_J1816.9-4942_daily_bin2179.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1816.9-4942'

4FGL J1816.9-4942
   Spectrum: LogParabola
1266         norm:  1.342e+00  0.000e+00  0.000e+00  1.000e+06 ( 1.000e-12)
1267        alpha:  2.245e+00  0.000e+00  0.000e+00  5.000e+00 ( 1.000e+00) fixed
1268         beta:  1.727e-01  0.000e+00 -5.000e+00  1.000e+01 ( 1.000e+00) fixed
1269           Eb:  9.507e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /lscratch/kocevski/31687416/ft1_filtered_4FGL_J1816.9-4942_daily_bin2179.fits
Spacecraft file(s): /lscratch/kocevski/31687416/ft2_4FGL_J1816.9-4942_daily_bin2179.fits
Exposure map: /lscratch/kocevski/31687416/expmap_804124801_804384001_4FGL_J1816.9-4942_daily_bin2179.fits
Exposure cube: /lscratch/kocevski/31687416/ltcube_804124801_804384001_4FGL_J1816.9-4942_daily_bin2179.fits
IRFs: P8R3_SOURCE_V2
Source model file: /lscratch/kocevski/31687416/Model_4FGL_J1816.9-4942_daily_bin2179.xml
Optimizer: MINUIT
Statistic: UNBINNED

Performing an iterative likelihood fit...

Fit tolerance = 1

Performing likelihood fit...
Done.

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    .10000E+07   1.0000          .0000       .10000E+07
     2 'Prefactor '    31.328       1.0000         .10000E-03   10000.    
     3 'Prefactor '    .71136E-04   1.0000          .0000       .10000E+07
     4 'norm      '    .24808       1.0000          .0000       .10000E+07
     5 'Prefactor '    .46140E-05   1.0000          .0000       .10000E+07
     6 'Prefactor '    7.6098       1.0000          .0000       .10000E+07
     7 'norm      '    .17004E-03   1.0000          .0000       .10000E+07
     8 'norm      '    8.3367       1.0000          .0000       .10000E+07
     9 'Prefactor '    7371.3       1.0000          .0000       .10000E+07
    10 'norm      '    1045.4       1.0000          .0000       .10000E+07
    11 'Prefactor '    .37972E-01   1.0000          .0000       .10000E+07
    12 'norm      '    .10283E-05   1.0000          .0000       .10000E+07
    13 'norm      '    .39968E-08   1.0000          .0000       .10000E+07
    14 'norm      '    .33553       1.0000          .0000       .10000E+07
    15 'norm      '    .17966E-03   1.0000          .0000       .10000E+07
    16 'Prefactor '    .31965E-04   1.0000          .0000       .10000E+07
    17 'Prefactor '    .31510E-04   1.0000          .0000       .10000E+07
    18 'Prefactor '    .20395E-06   1.0000          .0000       .10000E+07
    19 'norm      '    .52286E-02   1.0000          .0000       .10000E+07
    20 'Normalizat'    .90724E-01   1.0000         .10000E-01   10.000    
    21 'Prefactor '    .49200       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .1693E+06   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.
  MNHESS FAILS AND WILL RETURN DIAGONAL MATRIX. 

 FCN=   332.4473     FROM MIGRAD    STATUS=CONVERGED    276 CALLS     1298 TOTAL
                     EDM=   .14E-10  STRATEGY=1  ERROR MATRIX UNCERTAINTY=100.0%

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          .10000E+07    41864.        .42118E-01** at limit **
   2  Prefactor     .14753E-03    7625.4        .17897E-02** at limit **
   3  Prefactor      .0000        93.478        .42118E-03** at limit **
   4  norm           .0000        353.81        .10976E-02** at limit **
   5  Prefactor      .0000        73.903        .42118E-03** at limit **
   6  Prefactor      .0000        551.89        .36329E-03** at limit **
   7  norm          .33307E-09    241.48        .42118E-03** at limit **
   8  norm          8.3367        1.0018         .0000         .0000    
   9  Prefactor     7372.8        1.0001        .78499E-08   -.14725    
  10  norm          1046.1        1.0003        .96416E-08   -.26175E-01
  11  Prefactor      .0000        .64452        .90534E-07** at limit **
  12  norm           .0000        .44347E-01   -.10249E-06** at limit **
  13  norm           .0000        .44347E-01   -.23889E-06** at limit **
  14  norm          .33658        .56491       -.58942E-07    .14522E-04
  15  norm          .22204E-09    .44347E-01    .36420E-06** at limit **
  16  Prefactor      .0000        .44347E-01    .32405E-07** at limit **
  17  Prefactor      .0000        .44347E-01   -.85169E-08** at limit **
  18  Prefactor      .0000        .44347E-01   -.38016E-06** at limit **
  19  norm           .0000        .44347E-01    .90041E-07** at limit **
  20  Normalizat    .91050E-01    .29393       -.10856E-04    .60137E-06
  21  Prefactor     .49187        .83338        .12542E-04    .27237E-04
                               ERR DEF=  .500    
Final values: 
  norm       = 1e+06
  Prefactor  = 0.000147528
  Prefactor  = 0
  norm       = 0
  Prefactor  = 0
  Prefactor  = 0
  norm       = 3.33067e-10
  norm       = 8.33668
  Prefactor  = 7372.79
  norm       = 1046.08
  Prefactor  = 0
  norm       = 0
  norm       = 0
  norm       = 0.336576
  norm       = 2.22045e-10
  Prefactor  = 0
  Prefactor  = 0
  Prefactor  = 0
  norm       = 0
  Normalizat = 0.0910501
  Prefactor  = 0.491868
 **********
 **   18 **HESSE 
 **********
  MNHESS FAILS AND WILL RETURN DIAGONAL MATRIX. 

 FCN=   332.4473     FROM HESSE     STATUS=FAILED        25 CALLS     1323 TOTAL
                     EDM=   .14E-10  STRATEGY=1  ERROR MATRIX UNCERTAINTY=100.0%

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          .10000E+07    41864.        .42118E-01    1.5705    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .14753E-03    7625.4        .17897E-02   -1.5709    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor      .0000        93.478        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  norm           .0000        353.81        .10976E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor      .0000        73.903        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor      .0000        551.89        .36329E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  norm          .33307E-09    241.48        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          28822.        28814.         .0000       -1.5650    
   9  Prefactor     7372.8        1.0001        .78499E-08   -1.3989    
  10  norm          1046.1        1.0003        .96416E-08   -1.5061    
  11  Prefactor      .0000        .64452        .90534E-07   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  norm           .0000        .44347E-01   -.10249E-06   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm           .0000        .44347E-01   -.23889E-06   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  norm          .33658        .56491       -.58942E-07   -1.5696    
  15  norm          .22204E-09    .44347E-01    .36420E-06   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor      .0000        .44347E-01    .32405E-07   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor      .0000        .44347E-01   -.85169E-08   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor      .0000        .44347E-01   -.38016E-06   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  norm           .0000        .44347E-01    .90041E-07   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Normalizat    .91050E-01    .29393       -.10856E-04   -1.3904    
  21  Prefactor     .49187        .83338        .12542E-04   -1.1235    
                               ERR DEF=  .500    
Minuit fit quality: 1   estimated distance: 1.42827e-11
Minuit parameter uncertainties:
  1  54.0551
  2  1.11741
  3  3.34665e-05
  4  1.19012e-06
  5  2.01449e-05
  6  0.000113808
  7  0.000547421
  8  1.00181
  9  1.0001
  10  1.00034
  11  3.70303e-07
  12  5.04561e-07
  13  2.25049e-07
  14  0.564906
  15  6.10762e-06
  16  1.14627e-06
  17  6.73213e-07
  18  5.4722e-07
  19  1.45961e-06
  20  0.299474
  21  0.855517
Done.

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

Extracting fit parameters...

4FGL J1816.9-4942
   Spectrum: LogParabola
1266         norm:  0.000e+00  5.046e-07  0.000e+00  1.000e+06 ( 1.000e-12)
1267        alpha:  2.245e+00  0.000e+00  0.000e+00  5.000e+00 ( 1.000e+00) fixed
1268         beta:  1.727e-01  0.000e+00 -5.000e+00  1.000e+01 ( 1.000e+00) fixed
1269           Eb:  9.507e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
1679    Prefactor:  4.919e-01  8.555e-01  0.000e+00  1.000e+01 ( 1.000e+00)
1680        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
1681        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
1652   Normalization:  9.105e-02  2.995e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 0.00
Ra Dec: 274.244 -49.716
Photon Flux Upper Limit: 1.87312065584e-06 ph cm-2 s-1
Energy Flux Upper Limit: None

Saving results to:
/lscratch/kocevski/31687416/likelihoodResults_804124801_804384001_4FGL_J1816.9-4942_daily_bin2179.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) = 332.448956439
delta logL = -0.00163809734153

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 332.447321881
delta logL = -3.53892750127e-06

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    .13893E-03   1.0000          .0000       .10000E+07
     2 'alpha     '    3.1274       1.0000          .0000       5.0000    
     3 'Normalizat'    .91060E-01   1.0000         .10000E-01   10.000    
     4 'Prefactor '    .49195       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .1693E+06   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   332.4473     FROM MIGRAD    STATUS=CONVERGED     86 CALLS      273 TOTAL
                     EDM=   .56E-10    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          .55511E-08    5.1224        .42118E-03** at limit **
   2  alpha         2.6419        3.2204        .42922        .16554E-09
   3  Normalizat    .91045E-01    .81915E-02    .22899        .55786E-04
   4  Prefactor     .49187        .27828E-02    .29234E-01    .48268E-03
                               ERR DEF=  .500    
Final values: 
  norm       = 5.55112e-09
  alpha      = 2.64188
  Normalizat = 0.0910455
  Prefactor  = 0.491874
 **********
 **   18 **HESSE 
 **********

 FCN=   332.4473     FROM HESSE     STATUS=NOT POSDEF    33 CALLS      306 TOTAL
                     EDM=   .24E-09    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          .55511E-08    22.549        .84235E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  alpha         2.6419        3.5977        .50000        .56783E-01
   3  Normalizat    .91045E-01    .19004E-01    .91769E-02   -1.3904    
   4  Prefactor     .49187        .58409E-02    .12918E-03   -1.1235    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 2.42148e-10
Minuit parameter uncertainties:
  1  0.000706306
  2  69061.7
  3  0.0190054
  4  0.00584088
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 332.447318343
delta logL = -7.17818693374e-10

Extracting fit parameters...

4FGL J1816.9-4942
   Spectrum: LogParabola
1266         norm:  5.551e-09  7.063e-04  0.000e+00  1.000e+06 ( 1.000e-12)
1267        alpha:  2.642e+00  6.906e+04  0.000e+00  5.000e+00 ( 1.000e+00)
1268         beta:  1.727e-01  0.000e+00 -5.000e+00  1.000e+01 ( 1.000e+00) fixed
1269           Eb:  9.507e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
1679    Prefactor:  4.919e-01  5.841e-03  0.000e+00  1.000e+01 ( 1.000e+00)
1680        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
1681        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
1652   Normalization:  9.105e-02  1.901e-02  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 0.00
Ra Dec: 274.244 -49.716

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 /lscratch/kocevski/31687416/cmap_HighResolution_804124801_804384001_4FGL_J1816.9-4942_daily_bin2179.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET job_status='DONE', comment='SUCCESS', photon_flux_upper_limit='1.87e-06', time_completed='2026-07-14 17:45:49.428417', job_id='31687416', GAL2='0.49', fit_tolerance='1e-08', EG2='0.09', EG='0.09', time_epoch_completed='1784076349.43', return_code2='102', ts='0.00', return_code='101', GAL='0.49', dlogl='-7.18e-10', ts2='-0.00', photon_index_error='0.00', photon_index='2.24' WHERE bin_id='2179' AND source_name='4FGL J1816.9-4942' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Tue Jul 14 17:45:49 PDT 2026

number of points = 7654
number of fields = 31
RA_SUN column already exists. File will not be modified.
Done.


Performing analysis on: 4FGL_J1816.9-4942_daily_bin2179
RA = 274.244, Dec = -49.7158
tmin = 804124801, tmax = 804384001
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='31687815', job_status='RUN', time_executed='2026-07-14 17:43:09.870224', time_epoch_executed='1784076189.87' WHERE source_name='4FGL J1816.9-4942' and cadence='daily' and bin_id='2179'

Database successfully updated.
Done.

Creating custom output directory:
/lscratch/kocevski/31687815

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/lscratch/kocevski/31687815/ft1_4FGL_J1816.9-4942_daily_bin2179.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/lscratch/kocevski/31687815/ft2_4FGL_J1816.9-4942_daily_bin2179.fits


Selecting the photons:
time -p gtselect infile=/lscratch/kocevski/31687815/ft1_4FGL_J1816.9-4942_daily_bin2179.fits outfile=/lscratch/kocevski/31687815/ft1_filteredMKT_4FGL_J1816.9-4942_daily_bin2179.fits ra=274.244 dec=-49.7158 rad=12.0 tmin=804124801.0 tmax=804384001.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 2.58
user 1.50
sys 0.21

Adding sun position to ft2 file:
/sdf/group/fermi/g/LCRepository/Repository/bin/sunpos /lscratch/kocevski/31687815/ft2_4FGL_J1816.9-4942_daily_bin2179.fits

Selecting the good time intervals:
time -p gtmktime scfile=/lscratch/kocevski/31687815/ft2_4FGL_J1816.9-4942_daily_bin2179.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/31687815/ft1_filteredMKT_4FGL_J1816.9-4942_daily_bin2179.fits evtable="EVENTS" outfile="/lscratch/kocevski/31687815/ft1_filtered_4FGL_J1816.9-4942_daily_bin2179.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 1.08
user 0.23
sys 0.13

Number of photons that the gtmktime cut: 30

Generating the livetime cube:
time -p gtltcube evfile="/lscratch/kocevski/31687815/ft1_filtered_4FGL_J1816.9-4942_daily_bin2179.fits" evtable="EVENTS" scfile=/lscratch/kocevski/31687815/ft2_4FGL_J1816.9-4942_daily_bin2179.fits sctable="SC_DATA" outfile=/lscratch/kocevski/31687727/ltcube_804124801_804384001_4FGL_J1816.9-4942_daily_bin2179.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/31687727/ft2_4FGL_J1816.9-4942_daily_bin2179.fits
.....................!
real 9.46
user 8.59
sys 0.24

Generating the exposure map:
time -p gtexpmap evfile=/lscratch/kocevski/31687727/ft1_filtered_4FGL_J1816.9-4942_daily_bin2179.fits evtable="EVENTS" scfile=/lscratch/kocevski/31687727/ft2_4FGL_J1816.9-4942_daily_bin2179.fits sctable="SC_DATA" expcube=/lscratch/kocevski/31687727/ltcube_804124801_804384001_4FGL_J1816.9-4942_daily_bin2179.fits outfile=/lscratch/kocevski/31687727/expmap_804124801_804384001_4FGL_J1816.9-4942_daily_bin2179.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/31687727/ltcube_804124801_804384001_4FGL_J1816.9-4942_daily_bin2179.fits
.....................!
real 73.88
user 68.29
sys 4.30

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
Extended source FHES J1741.6-3917 in ROI with RadialDisk spatial model.
Extended source FGES J1631.6-4756 in ROI with RadialDisk spatial model.
Extended source FGES J1633.0-4746 in ROI with RadialDisk spatial model.
Extended source G337.0-0.1 in ROI with RadialDisk spatial model.
Extended source FHES J1642.1-5428 in ROI with RadialDisk spatial model.
Extended source FGES J1652.2-4633 in ROI with RadialDisk spatial model.
Extended source FGES J1655.5-4737 in ROI with RadialDisk spatial model.
Extended source RX J1713.7-3946 in ROI, make sure /sdf/group/fermi/g/LCRepository/Likelihood/ExtendedSources/Extended_8years/Templates/RXJ1713_2016_250GeV.fits is the correct path to the extended template.
Extended source HESS J1614-518 in ROI with RadialDisk spatial model.
Extended source HESS J1616-508 in ROI with RadialDisk spatial model.
Extended source FGES J1745.8-3028 in ROI with RadialDisk spatial model.
Added 459 point sources and 11 extended sources
If using unbinned likelihood you will need to rerun gtdiffrsp for the extended sources or rerun the makeModel function with optional argument psForce=True

Setting source of interest to:
4FGL J1816.9-4942 @ 274.244 -49.7158

Creating the counts map:
time -p gtbin evfile=/lscratch/kocevski/31687727/ft1_filtered_4FGL_J1816.9-4942_daily_bin2179.fits scfile=/lscratch/kocevski/31687727/ft2_4FGL_J1816.9-4942_daily_bin2179.fits outfile=/lscratch/kocevski/31687727/cmap_804124801_804384001_4FGL_J1816.9-4942_daily_bin2179.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=274.244 yref=-49.7158 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.85
user 0.25
sys 0.12

Creating the high resolution counts map:
time -p gtbin evfile=/lscratch/kocevski/31687727/ft1_filtered_4FGL_J1816.9-4942_daily_bin2179.fits scfile=/lscratch/kocevski/31687727/ft2_4FGL_J1816.9-4942_daily_bin2179.fits outfile=/lscratch/kocevski/31687727/cmap_HighResolution_804124801_804384001_4FGL_J1816.9-4942_daily_bin2179.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=274.244 yref=-49.7158 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.68
user 0.23
sys 0.13

Computing the diffuse response:
time -p gtdiffrsp evfile=/lscratch/kocevski/31687461/ft1_filtered_4FGL_J1816.9-4942_daily_bin2179.fits evtable="EVENTS" scfile=/lscratch/kocevski/31687461/ft2_4FGL_J1816.9-4942_daily_bin2179.fits sctable="SC_DATA" srcmdl=/lscratch/kocevski/31687461/Model_4FGL_J1816.9-4942_daily_bin2179.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 FGES J1631.6-4756
adding source FGES J1633.0-4746
adding source FGES J1652.2-4633
adding source FGES J1655.5-4737
adding source FGES J1745.8-3028
adding source FHES J1642.1-5428
adding source FHES J1741.6-3917
adding source G337.0-0.1
adding source GAL_V02
adding source HESS J1614-518
adding source HESS J1616-508
adding source RX J1713.7-3946
Working on...
/lscratch/kocevski/31687461/ft1_filtered_4FGL_J1816.9-4942_daily_bin2179.fits..............................!
real 10.19
user 8.25
sys 1.47

Creating the likelihood object...
obs = UnbinnedObs('/lscratch/kocevski/31687461/ft1_filtered_4FGL_J1816.9-4942_daily_bin2179.fits', '/lscratch/kocevski/31687461/ft2_4FGL_J1816.9-4942_daily_bin2179.fits', expMap='/lscratch/kocevski/31687461/expmap_804124801_804384001_4FGL_J1816.9-4942_daily_bin2179.fits', expCube='/lscratch/kocevski/31687461/ltcube_804124801_804384001_4FGL_J1816.9-4942_daily_bin2179.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/lscratch/kocevski/31687461/Model_4FGL_J1816.9-4942_daily_bin2179.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1816.9-4942'

4FGL J1816.9-4942
   Spectrum: LogParabola
1266         norm:  1.342e+00  0.000e+00  0.000e+00  1.000e+06 ( 1.000e-12)
1267        alpha:  2.245e+00  0.000e+00  0.000e+00  5.000e+00 ( 1.000e+00) fixed
1268         beta:  1.727e-01  0.000e+00 -5.000e+00  1.000e+01 ( 1.000e+00) fixed
1269           Eb:  9.507e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /lscratch/kocevski/31687461/ft1_filtered_4FGL_J1816.9-4942_daily_bin2179.fits
Spacecraft file(s): /lscratch/kocevski/31687461/ft2_4FGL_J1816.9-4942_daily_bin2179.fits
Exposure map: /lscratch/kocevski/31687461/expmap_804124801_804384001_4FGL_J1816.9-4942_daily_bin2179.fits
Exposure cube: /lscratch/kocevski/31687461/ltcube_804124801_804384001_4FGL_J1816.9-4942_daily_bin2179.fits
IRFs: P8R3_SOURCE_V2
Source model file: /lscratch/kocevski/31687461/Model_4FGL_J1816.9-4942_daily_bin2179.xml
Optimizer: MINUIT
Statistic: UNBINNED

Performing an iterative likelihood fit...

Fit tolerance = 1

Performing likelihood fit...
Done.

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    .10000E+07   1.0000          .0000       .10000E+07
     2 'Prefactor '    31.328       1.0000         .10000E-03   10000.    
     3 'Prefactor '    .71136E-04   1.0000          .0000       .10000E+07
     4 'norm      '    .24808       1.0000          .0000       .10000E+07
     5 'Prefactor '    .46140E-05   1.0000          .0000       .10000E+07
     6 'Prefactor '    7.6098       1.0000          .0000       .10000E+07
     7 'norm      '    .17004E-03   1.0000          .0000       .10000E+07
     8 'norm      '    8.3367       1.0000          .0000       .10000E+07
     9 'Prefactor '    7371.3       1.0000          .0000       .10000E+07
    10 'norm      '    1045.4       1.0000          .0000       .10000E+07
    11 'Prefactor '    .37972E-01   1.0000          .0000       .10000E+07
    12 'norm      '    .10283E-05   1.0000          .0000       .10000E+07
    13 'norm      '    .39968E-08   1.0000          .0000       .10000E+07
    14 'norm      '    .33553       1.0000          .0000       .10000E+07
    15 'norm      '    .17966E-03   1.0000          .0000       .10000E+07
    16 'Prefactor '    .31965E-04   1.0000          .0000       .10000E+07
    17 'Prefactor '    .31510E-04   1.0000          .0000       .10000E+07
    18 'Prefactor '    .20395E-06   1.0000          .0000       .10000E+07
    19 'norm      '    .52286E-02   1.0000          .0000       .10000E+07
    20 'Normalizat'    .90724E-01   1.0000         .10000E-01   10.000    
    21 'Prefactor '    .49200       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .1693E+06   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.
  MNHESS FAILS AND WILL RETURN DIAGONAL MATRIX. 

 FCN=   332.4473     FROM MIGRAD    STATUS=CONVERGED    276 CALLS     1298 TOTAL
                     EDM=   .14E-10  STRATEGY=1  ERROR MATRIX UNCERTAINTY=100.0%

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          .10000E+07    41864.        .42118E-01** at limit **
   2  Prefactor     .14753E-03    7625.4        .17897E-02** at limit **
   3  Prefactor      .0000        93.478        .42118E-03** at limit **
   4  norm           .0000        353.81        .10976E-02** at limit **
   5  Prefactor      .0000        73.903        .42118E-03** at limit **
   6  Prefactor      .0000        551.89        .36329E-03** at limit **
   7  norm          .33307E-09    241.48        .42118E-03** at limit **
   8  norm          8.3367        1.0018         .0000         .0000    
   9  Prefactor     7372.8        1.0001        .78499E-08   -.14725    
  10  norm          1046.1        1.0003        .96416E-08   -.26175E-01
  11  Prefactor      .0000        .64452        .90534E-07** at limit **
  12  norm           .0000        .44347E-01   -.10249E-06** at limit **
  13  norm           .0000        .44347E-01   -.23889E-06** at limit **
  14  norm          .33658        .56491       -.58942E-07    .14522E-04
  15  norm          .22204E-09    .44347E-01    .36420E-06** at limit **
  16  Prefactor      .0000        .44347E-01    .32405E-07** at limit **
  17  Prefactor      .0000        .44347E-01   -.85169E-08** at limit **
  18  Prefactor      .0000        .44347E-01   -.38016E-06** at limit **
  19  norm           .0000        .44347E-01    .90041E-07** at limit **
  20  Normalizat    .91050E-01    .29393       -.10856E-04    .60137E-06
  21  Prefactor     .49187        .83338        .12542E-04    .27237E-04
                               ERR DEF=  .500    
Final values: 
  norm       = 1e+06
  Prefactor  = 0.000147528
  Prefactor  = 0
  norm       = 0
  Prefactor  = 0
  Prefactor  = 0
  norm       = 3.33067e-10
  norm       = 8.33668
  Prefactor  = 7372.79
  norm       = 1046.08
  Prefactor  = 0
  norm       = 0
  norm       = 0
  norm       = 0.336576
  norm       = 2.22045e-10
  Prefactor  = 0
  Prefactor  = 0
  Prefactor  = 0
  norm       = 0
  Normalizat = 0.0910501
  Prefactor  = 0.491868
 **********
 **   18 **HESSE 
 **********
  MNHESS FAILS AND WILL RETURN DIAGONAL MATRIX. 

 FCN=   332.4473     FROM HESSE     STATUS=FAILED        25 CALLS     1323 TOTAL
                     EDM=   .14E-10  STRATEGY=1  ERROR MATRIX UNCERTAINTY=100.0%

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          .10000E+07    41864.        .42118E-01    1.5705    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .14753E-03    7625.4        .17897E-02   -1.5709    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor      .0000        93.478        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  norm           .0000        353.81        .10976E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor      .0000        73.903        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor      .0000        551.89        .36329E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  norm          .33307E-09    241.48        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          28822.        28814.         .0000       -1.5650    
   9  Prefactor     7372.8        1.0001        .78499E-08   -1.3989    
  10  norm          1046.1        1.0003        .96416E-08   -1.5061    
  11  Prefactor      .0000        .64452        .90534E-07   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  norm           .0000        .44347E-01   -.10249E-06   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm           .0000        .44347E-01   -.23889E-06   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  norm          .33658        .56491       -.58942E-07   -1.5696    
  15  norm          .22204E-09    .44347E-01    .36420E-06   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor      .0000        .44347E-01    .32405E-07   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor      .0000        .44347E-01   -.85169E-08   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor      .0000        .44347E-01   -.38016E-06   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  norm           .0000        .44347E-01    .90041E-07   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Normalizat    .91050E-01    .29393       -.10856E-04   -1.3904    
  21  Prefactor     .49187        .83338        .12542E-04   -1.1235    
                               ERR DEF=  .500    
Minuit fit quality: 1   estimated distance: 1.42827e-11
Minuit parameter uncertainties:
  1  54.0551
  2  1.11741
  3  3.34665e-05
  4  1.19012e-06
  5  2.01449e-05
  6  0.000113808
  7  0.000547421
  8  1.00181
  9  1.0001
  10  1.00034
  11  3.70303e-07
  12  5.04561e-07
  13  2.25049e-07
  14  0.564906
  15  6.10762e-06
  16  1.14627e-06
  17  6.73213e-07
  18  5.4722e-07
  19  1.45961e-06
  20  0.299474
  21  0.855517
Done.

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

Extracting fit parameters...

4FGL J1816.9-4942
   Spectrum: LogParabola
1266         norm:  0.000e+00  5.046e-07  0.000e+00  1.000e+06 ( 1.000e-12)
1267        alpha:  2.245e+00  0.000e+00  0.000e+00  5.000e+00 ( 1.000e+00) fixed
1268         beta:  1.727e-01  0.000e+00 -5.000e+00  1.000e+01 ( 1.000e+00) fixed
1269           Eb:  9.507e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
1679    Prefactor:  4.919e-01  8.555e-01  0.000e+00  1.000e+01 ( 1.000e+00)
1680        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
1681        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
1652   Normalization:  9.105e-02  2.995e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 0.00
Ra Dec: 274.244 -49.716
Photon Flux Upper Limit: 1.87312065584e-06 ph cm-2 s-1
Energy Flux Upper Limit: None

Saving results to:
/lscratch/kocevski/31687461/likelihoodResults_804124801_804384001_4FGL_J1816.9-4942_daily_bin2179.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) = 332.448956439
delta logL = -0.00163809734153

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 332.447321881
delta logL = -3.53892750127e-06

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    .13893E-03   1.0000          .0000       .10000E+07
     2 'alpha     '    3.1274       1.0000          .0000       5.0000    
     3 'Normalizat'    .91060E-01   1.0000         .10000E-01   10.000    
     4 'Prefactor '    .49195       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .1693E+06   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   332.4473     FROM MIGRAD    STATUS=CONVERGED     86 CALLS      273 TOTAL
                     EDM=   .56E-10    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          .55511E-08    5.1224        .42118E-03** at limit **
   2  alpha         2.6419        3.2204        .42922        .16554E-09
   3  Normalizat    .91045E-01    .81915E-02    .22899        .55786E-04
   4  Prefactor     .49187        .27828E-02    .29234E-01    .48268E-03
                               ERR DEF=  .500    
Final values: 
  norm       = 5.55112e-09
  alpha      = 2.64188
  Normalizat = 0.0910455
  Prefactor  = 0.491874
 **********
 **   18 **HESSE 
 **********

 FCN=   332.4473     FROM HESSE     STATUS=NOT POSDEF    33 CALLS      306 TOTAL
                     EDM=   .24E-09    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          .55511E-08    22.549        .84235E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  alpha         2.6419        3.5977        .50000        .56783E-01
   3  Normalizat    .91045E-01    .19004E-01    .91769E-02   -1.3904    
   4  Prefactor     .49187        .58409E-02    .12918E-03   -1.1235    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 2.42148e-10
Minuit parameter uncertainties:
  1  0.000706306
  2  69061.7
  3  0.0190054
  4  0.00584088
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 332.447318343
delta logL = -7.17818693374e-10

Extracting fit parameters...

4FGL J1816.9-4942
   Spectrum: LogParabola
1266         norm:  5.551e-09  7.063e-04  0.000e+00  1.000e+06 ( 1.000e-12)
1267        alpha:  2.642e+00  6.906e+04  0.000e+00  5.000e+00 ( 1.000e+00)
1268         beta:  1.727e-01  0.000e+00 -5.000e+00  1.000e+01 ( 1.000e+00) fixed
1269           Eb:  9.507e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
1679    Prefactor:  4.919e-01  5.841e-03  0.000e+00  1.000e+01 ( 1.000e+00)
1680        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
1681        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
1652   Normalization:  9.105e-02  1.901e-02  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 0.00
Ra Dec: 274.244 -49.716

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 /lscratch/kocevski/31687461/cmap_HighResolution_804124801_804384001_4FGL_J1816.9-4942_daily_bin2179.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET job_status='DONE', comment='SUCCESS', photon_flux_upper_limit='1.87e-06', time_completed='2026-07-14 17:46:34.163922', job_id='31687461', GAL2='0.49', fit_tolerance='1e-08', EG2='0.09', EG='0.09', time_epoch_completed='1784076394.16', return_code2='102', ts='0.00', return_code='101', GAL='0.49', dlogl='-7.18e-10', ts2='-0.00', photon_index_error='0.00', photon_index='2.24' WHERE bin_id='2179' AND source_name='4FGL J1816.9-4942' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Tue Jul 14 17:46:34 PDT 2026

max=200000.0 ebinfile=NONE tbinalg="LIN" tbinfile=NONE nxpix=500 nypix=500 binsz=0.1 coordsys="CEL" xref=274.244 yref=-49.7158 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.78
user 0.24
sys 0.12

Computing the diffuse response:
time -p gtdiffrsp evfile=/lscratch/kocevski/31687727/ft1_filtered_4FGL_J1816.9-4942_daily_bin2179.fits evtable="EVENTS" scfile=/lscratch/kocevski/31687727/ft2_4FGL_J1816.9-4942_daily_bin2179.fits sctable="SC_DATA" srcmdl=/lscratch/kocevski/31687727/Model_4FGL_J1816.9-4942_daily_bin2179.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 FGES J1631.6-4756
adding source FGES J1633.0-4746
adding source FGES J1652.2-4633
adding source FGES J1655.5-4737
adding source FGES J1745.8-3028
adding source FHES J1642.1-5428
adding source FHES J1741.6-3917
adding source G337.0-0.1
adding source GAL_V02
adding source HESS J1614-518
adding source HESS J1616-508
adding source RX J1713.7-3946
Working on...
/lscratch/kocevski/31687727/ft1_filtered_4FGL_J1816.9-4942_daily_bin2179.fits..............................!
real 9.41
user 8.17
sys 0.70

Creating the likelihood object...
obs = UnbinnedObs('/lscratch/kocevski/31687727/ft1_filtered_4FGL_J1816.9-4942_daily_bin2179.fits', '/lscratch/kocevski/31687727/ft2_4FGL_J1816.9-4942_daily_bin2179.fits', expMap='/lscratch/kocevski/31687727/expmap_804124801_804384001_4FGL_J1816.9-4942_daily_bin2179.fits', expCube='/lscratch/kocevski/31687727/ltcube_804124801_804384001_4FGL_J1816.9-4942_daily_bin2179.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/lscratch/kocevski/31687727/Model_4FGL_J1816.9-4942_daily_bin2179.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1816.9-4942'

4FGL J1816.9-4942
   Spectrum: LogParabola
1266         norm:  1.342e+00  0.000e+00  0.000e+00  1.000e+06 ( 1.000e-12)
1267        alpha:  2.245e+00  0.000e+00  0.000e+00  5.000e+00 ( 1.000e+00) fixed
1268         beta:  1.727e-01  0.000e+00 -5.000e+00  1.000e+01 ( 1.000e+00) fixed
1269           Eb:  9.507e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /lscratch/kocevski/31687727/ft1_filtered_4FGL_J1816.9-4942_daily_bin2179.fits
Spacecraft file(s): /lscratch/kocevski/31687727/ft2_4FGL_J1816.9-4942_daily_bin2179.fits
Exposure map: /lscratch/kocevski/31687727/expmap_804124801_804384001_4FGL_J1816.9-4942_daily_bin2179.fits
Exposure cube: /lscratch/kocevski/31687727/ltcube_804124801_804384001_4FGL_J1816.9-4942_daily_bin2179.fits
IRFs: P8R3_SOURCE_V2
Source model file: /lscratch/kocevski/31687727/Model_4FGL_J1816.9-4942_daily_bin2179.xml
Optimizer: MINUIT
Statistic: UNBINNED

Performing an iterative likelihood fit...

Fit tolerance = 1

Performing likelihood fit...
Done.

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    .10000E+07   1.0000          .0000       .10000E+07
     2 'Prefactor '    31.328       1.0000         .10000E-03   10000.    
     3 'Prefactor '    .71136E-04   1.0000          .0000       .10000E+07
     4 'norm      '    .24808       1.0000          .0000       .10000E+07
     5 'Prefactor '    .46140E-05   1.0000          .0000       .10000E+07
     6 'Prefactor '    7.6098       1.0000          .0000       .10000E+07
     7 'norm      '    .17004E-03   1.0000          .0000       .10000E+07
     8 'norm      '    8.3367       1.0000          .0000       .10000E+07
     9 'Prefactor '    7371.3       1.0000          .0000       .10000E+07
    10 'norm      '    1045.4       1.0000          .0000       .10000E+07
    11 'Prefactor '    .37972E-01   1.0000          .0000       .10000E+07
    12 'norm      '    .10283E-05   1.0000          .0000       .10000E+07
    13 'norm      '    .39968E-08   1.0000          .0000       .10000E+07
    14 'norm      '    .33553       1.0000          .0000       .10000E+07
    15 'norm      '    .17966E-03   1.0000          .0000       .10000E+07
    16 'Prefactor '    .31965E-04   1.0000          .0000       .10000E+07
    17 'Prefactor '    .31510E-04   1.0000          .0000       .10000E+07
    18 'Prefactor '    .20395E-06   1.0000          .0000       .10000E+07
    19 'norm      '    .52286E-02   1.0000          .0000       .10000E+07
    20 'Normalizat'    .90724E-01   1.0000         .10000E-01   10.000    
    21 'Prefactor '    .49200       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .1693E+06   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.
  MNHESS FAILS AND WILL RETURN DIAGONAL MATRIX. 

 FCN=   332.4473     FROM MIGRAD    STATUS=CONVERGED    276 CALLS     1298 TOTAL
                     EDM=   .14E-10  STRATEGY=1  ERROR MATRIX UNCERTAINTY=100.0%

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          .10000E+07    41864.        .42118E-01** at limit **
   2  Prefactor     .14753E-03    7625.4        .17897E-02** at limit **
   3  Prefactor      .0000        93.478        .42118E-03** at limit **
   4  norm           .0000        353.81        .10976E-02** at limit **
   5  Prefactor      .0000        73.903        .42118E-03** at limit **
   6  Prefactor      .0000        551.89        .36329E-03** at limit **
   7  norm          .33307E-09    241.48        .42118E-03** at limit **
   8  norm          8.3367        1.0018         .0000         .0000    
   9  Prefactor     7372.8        1.0001        .78499E-08   -.14725    
  10  norm          1046.1        1.0003        .96416E-08   -.26175E-01
  11  Prefactor      .0000        .64452        .90534E-07** at limit **
  12  norm           .0000        .44347E-01   -.10249E-06** at limit **
  13  norm           .0000        .44347E-01   -.23889E-06** at limit **
  14  norm          .33658        .56491       -.58942E-07    .14522E-04
  15  norm          .22204E-09    .44347E-01    .36420E-06** at limit **
  16  Prefactor      .0000        .44347E-01    .32405E-07** at limit **
  17  Prefactor      .0000        .44347E-01   -.85169E-08** at limit **
  18  Prefactor      .0000        .44347E-01   -.38016E-06** at limit **
  19  norm           .0000        .44347E-01    .90041E-07** at limit **
  20  Normalizat    .91050E-01    .29393       -.10856E-04    .60137E-06
  21  Prefactor     .49187        .83338        .12542E-04    .27237E-04
                               ERR DEF=  .500    
Final values: 
  norm       = 1e+06
  Prefactor  = 0.000147528
  Prefactor  = 0
  norm       = 0
  Prefactor  = 0
  Prefactor  = 0
  norm       = 3.33067e-10
  norm       = 8.33668
  Prefactor  = 7372.79
  norm       = 1046.08
  Prefactor  = 0
  norm       = 0
  norm       = 0
  norm       = 0.336576
  norm       = 2.22045e-10
  Prefactor  = 0
  Prefactor  = 0
  Prefactor  = 0
  norm       = 0
  Normalizat = 0.0910501
  Prefactor  = 0.491868
 **********
 **   18 **HESSE 
 **********
  MNHESS FAILS AND WILL RETURN DIAGONAL MATRIX. 

 FCN=   332.4473     FROM HESSE     STATUS=FAILED        25 CALLS     1323 TOTAL
                     EDM=   .14E-10  STRATEGY=1  ERROR MATRIX UNCERTAINTY=100.0%

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          .10000E+07    41864.        .42118E-01    1.5705    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .14753E-03    7625.4        .17897E-02   -1.5709    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor      .0000        93.478        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  norm           .0000        353.81        .10976E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor      .0000        73.903        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor      .0000        551.89        .36329E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  norm          .33307E-09    241.48        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          28822.        28814.         .0000       -1.5650    
   9  Prefactor     7372.8        1.0001        .78499E-08   -1.3989    
  10  norm          1046.1        1.0003        .96416E-08   -1.5061    
  11  Prefactor      .0000        .64452        .90534E-07   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  norm           .0000        .44347E-01   -.10249E-06   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm           .0000        .44347E-01   -.23889E-06   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  norm          .33658        .56491       -.58942E-07   -1.5696    
  15  norm          .22204E-09    .44347E-01    .36420E-06   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor      .0000        .44347E-01    .32405E-07   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor      .0000        .44347E-01   -.85169E-08   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor      .0000        .44347E-01   -.38016E-06   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  norm           .0000        .44347E-01    .90041E-07   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Normalizat    .91050E-01    .29393       -.10856E-04   -1.3904    
  21  Prefactor     .49187        .83338        .12542E-04   -1.1235    
                               ERR DEF=  .500    
Minuit fit quality: 1   estimated distance: 1.42827e-11
Minuit parameter uncertainties:
  1  54.0551
  2  1.11741
  3  3.34665e-05
  4  1.19012e-06
  5  2.01449e-05
  6  0.000113808
  7  0.000547421
  8  1.00181
  9  1.0001
  10  1.00034
  11  3.70303e-07
  12  5.04561e-07
  13  2.25049e-07
  14  0.564906
  15  6.10762e-06
  16  1.14627e-06
  17  6.73213e-07
  18  5.4722e-07
  19  1.45961e-06
  20  0.299474
  21  0.855517
Done.

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

Extracting fit parameters...

4FGL J1816.9-4942
   Spectrum: LogParabola
1266         norm:  0.000e+00  5.046e-07  0.000e+00  1.000e+06 ( 1.000e-12)
1267        alpha:  2.245e+00  0.000e+00  0.000e+00  5.000e+00 ( 1.000e+00) fixed
1268         beta:  1.727e-01  0.000e+00 -5.000e+00  1.000e+01 ( 1.000e+00) fixed
1269           Eb:  9.507e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
1679    Prefactor:  4.919e-01  8.555e-01  0.000e+00  1.000e+01 ( 1.000e+00)
1680        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
1681        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
1652   Normalization:  9.105e-02  2.995e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 0.00
Ra Dec: 274.244 -49.716
Photon Flux Upper Limit: 1.87312065584e-06 ph cm-2 s-1
Energy Flux Upper Limit: None

Saving results to:
/lscratch/kocevski/31687727/likelihoodResults_804124801_804384001_4FGL_J1816.9-4942_daily_bin2179.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) = 332.448956439
delta logL = -0.00163809734153

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 332.447321881
delta logL = -3.53892750127e-06

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    .13893E-03   1.0000          .0000       .10000E+07
     2 'alpha     '    3.1274       1.0000          .0000       5.0000    
     3 'Normalizat'    .91060E-01   1.0000         .10000E-01   10.000    
     4 'Prefactor '    .49195       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .1693E+06   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   332.4473     FROM MIGRAD    STATUS=CONVERGED     86 CALLS      273 TOTAL
                     EDM=   .56E-10    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          .55511E-08    5.1224        .42118E-03** at limit **
   2  alpha         2.6419        3.2204        .42922        .16554E-09
   3  Normalizat    .91045E-01    .81915E-02    .22899        .55786E-04
   4  Prefactor     .49187        .27828E-02    .29234E-01    .48268E-03
                               ERR DEF=  .500    
Final values: 
  norm       = 5.55112e-09
  alpha      = 2.64188
  Normalizat = 0.0910455
  Prefactor  = 0.491874
 **********
 **   18 **HESSE 
 **********

 FCN=   332.4473     FROM HESSE     STATUS=NOT POSDEF    33 CALLS      306 TOTAL
                     EDM=   .24E-09    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          .55511E-08    22.549        .84235E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  alpha         2.6419        3.5977        .50000        .56783E-01
   3  Normalizat    .91045E-01    .19004E-01    .91769E-02   -1.3904    
   4  Prefactor     .49187        .58409E-02    .12918E-03   -1.1235    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 2.42148e-10
Minuit parameter uncertainties:
  1  0.000706306
  2  69061.7
  3  0.0190054
  4  0.00584088
utfile=/lscratch/kocevski/31687815/ltcube_804124801_804384001_4FGL_J1816.9-4942_daily_bin2179.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/31687815/ft2_4FGL_J1816.9-4942_daily_bin2179.fits
.....................!
real 10.21
user 9.22
sys 0.33

Generating the exposure map:
time -p gtexpmap evfile=/lscratch/kocevski/31687815/ft1_filtered_4FGL_J1816.9-4942_daily_bin2179.fits evtable="EVENTS" scfile=/lscratch/kocevski/31687815/ft2_4FGL_J1816.9-4942_daily_bin2179.fits sctable="SC_DATA" expcube=/lscratch/kocevski/31687815/ltcube_804124801_804384001_4FGL_J1816.9-4942_daily_bin2179.fits outfile=/lscratch/kocevski/31687815/expmap_804124801_804384001_4FGL_J1816.9-4942_daily_bin2179.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/31687815/ltcube_804124801_804384001_4FGL_J1816.9-4942_daily_bin2179.fits
.....................!
real 74.79
user 69.39
sys 4.22

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
Extended source FHES J1741.6-3917 in ROI with RadialDisk spatial model.
Extended source FGES J1631.6-4756 in ROI with RadialDisk spatial model.
Extended source FGES J1633.0-4746 in ROI with RadialDisk spatial model.
Extended source G337.0-0.1 in ROI with RadialDisk spatial model.
Extended source FHES J1642.1-5428 in ROI with RadialDisk spatial model.
Extended source FGES J1652.2-4633 in ROI with RadialDisk spatial model.
Extended source FGES J1655.5-4737 in ROI with RadialDisk spatial model.
Extended source RX J1713.7-3946 in ROI, make sure /sdf/group/fermi/g/LCRepository/Likelihood/ExtendedSources/Extended_8years/Templates/RXJ1713_2016_250GeV.fits is the correct path to the extended template.
Extended source HESS J1614-518 in ROI with RadialDisk spatial model.
Extended source HESS J1616-508 in ROI with RadialDisk spatial model.
Extended source FGES J1745.8-3028 in ROI with RadialDisk spatial model.
Added 459 point sources and 11 extended sources
If using unbinned likelihood you will need to rerun gtdiffrsp for the extended sources or rerun the makeModel function with optional argument psForce=True

Setting source of interest to:
4FGL J1816.9-4942 @ 274.244 -49.7158

Creating the counts map:
time -p gtbin evfile=/lscratch/kocevski/31687815/ft1_filtered_4FGL_J1816.9-4942_daily_bin2179.fits scfile=/lscratch/kocevski/31687815/ft2_4FGL_J1816.9-4942_daily_bin2179.fits outfile=/lscratch/kocevski/31687815/cmap_804124801_804384001_4FGL_J1816.9-4942_daily_bin2179.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=274.244 yref=-49.7158 axisrot=0.0 rafield="RA" decfield="DEC" proj="AIT" hpx_ordering_scheme="RING" hpx_order=3 hpx_ebin=yes hpx_region="" evtable="EVENTS" sctable="SC_DATA" efield="ENERGY" tfield="TIME" chatter=2 clobber=yes debug=no gui=no mode="ql"

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

This is gtbin version HEAD
real 0.65
user 0.24
sys 0.16

Creating the high resolution counts map:
time -p gtbin evfile=/lscratch/kocevski/31687815/ft1_filtered_4FGL_J1816.9-4942_daily_bin2179.fits scfile=/lscratch/kocevski/31687815/ft2_4FGL_J1816.9-4942_daily_bin2179.fits outfile=/lscratch/kocevski/31687815/cmap_HighResolution_804124801_804384001_4FGL_J1816.9-4942_daily_bin2179.fits algorithm="CMAP" ebinalg="LOG" emin=30.0 shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 332.447318343
delta logL = -7.17818693374e-10

Extracting fit parameters...

4FGL J1816.9-4942
   Spectrum: LogParabola
1266         norm:  5.551e-09  7.063e-04  0.000e+00  1.000e+06 ( 1.000e-12)
1267        alpha:  2.642e+00  6.906e+04  0.000e+00  5.000e+00 ( 1.000e+00)
1268         beta:  1.727e-01  0.000e+00 -5.000e+00  1.000e+01 ( 1.000e+00) fixed
1269           Eb:  9.507e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
1679    Prefactor:  4.919e-01  5.841e-03  0.000e+00  1.000e+01 ( 1.000e+00)
1680        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
1681        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
1652   Normalization:  9.105e-02  1.901e-02  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 0.00
Ra Dec: 274.244 -49.716

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 /lscratch/kocevski/31687727/cmap_HighResolution_804124801_804384001_4FGL_J1816.9-4942_daily_bin2179.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET job_status='DONE', comment='SUCCESS', photon_flux_upper_limit='1.87e-06', time_completed='2026-07-14 17:47:22.969168', job_id='31687727', GAL2='0.49', fit_tolerance='1e-08', EG2='0.09', EG='0.09', time_epoch_completed='1784076442.97', return_code2='102', ts='0.00', return_code='101', GAL='0.49', dlogl='-7.18e-10', ts2='-0.00', photon_index_error='0.00', photon_index='2.24' WHERE bin_id='2179' AND source_name='4FGL J1816.9-4942' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Tue Jul 14 17:47:23 PDT 2026

emax=200000.0 ebinfile=NONE tbinalg="LIN" tbinfile=NONE nxpix=500 nypix=500 binsz=0.1 coordsys="CEL" xref=274.244 yref=-49.7158 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.81
user 0.24
sys 0.19

Computing the diffuse response:
time -p gtdiffrsp evfile=/lscratch/kocevski/31687815/ft1_filtered_4FGL_J1816.9-4942_daily_bin2179.fits evtable="EVENTS" scfile=/lscratch/kocevski/31687815/ft2_4FGL_J1816.9-4942_daily_bin2179.fits sctable="SC_DATA" srcmdl=/lscratch/kocevski/31687815/Model_4FGL_J1816.9-4942_daily_bin2179.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 FGES J1631.6-4756
adding source FGES J1633.0-4746
adding source FGES J1652.2-4633
adding source FGES J1655.5-4737
adding source FGES J1745.8-3028
adding source FHES J1642.1-5428
adding source FHES J1741.6-3917
adding source G337.0-0.1
adding source GAL_V02
adding source HESS J1614-518
adding source HESS J1616-508
adding source RX J1713.7-3946
Working on...
/lscratch/kocevski/31687815/ft1_filtered_4FGL_J1816.9-4942_daily_bin2179.fits..............................!
real 11.39
user 8.73
sys 1.86

Creating the likelihood object...
obs = UnbinnedObs('/lscratch/kocevski/31687815/ft1_filtered_4FGL_J1816.9-4942_daily_bin2179.fits', '/lscratch/kocevski/31687815/ft2_4FGL_J1816.9-4942_daily_bin2179.fits', expMap='/lscratch/kocevski/31687815/expmap_804124801_804384001_4FGL_J1816.9-4942_daily_bin2179.fits', expCube='/lscratch/kocevski/31687815/ltcube_804124801_804384001_4FGL_J1816.9-4942_daily_bin2179.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/lscratch/kocevski/31687815/Model_4FGL_J1816.9-4942_daily_bin2179.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1816.9-4942'

4FGL J1816.9-4942
   Spectrum: LogParabola
1266         norm:  1.342e+00  0.000e+00  0.000e+00  1.000e+06 ( 1.000e-12)
1267        alpha:  2.245e+00  0.000e+00  0.000e+00  5.000e+00 ( 1.000e+00) fixed
1268         beta:  1.727e-01  0.000e+00 -5.000e+00  1.000e+01 ( 1.000e+00) fixed
1269           Eb:  9.507e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /lscratch/kocevski/31687815/ft1_filtered_4FGL_J1816.9-4942_daily_bin2179.fits
Spacecraft file(s): /lscratch/kocevski/31687815/ft2_4FGL_J1816.9-4942_daily_bin2179.fits
Exposure map: /lscratch/kocevski/31687815/expmap_804124801_804384001_4FGL_J1816.9-4942_daily_bin2179.fits
Exposure cube: /lscratch/kocevski/31687815/ltcube_804124801_804384001_4FGL_J1816.9-4942_daily_bin2179.fits
IRFs: P8R3_SOURCE_V2
Source model file: /lscratch/kocevski/31687815/Model_4FGL_J1816.9-4942_daily_bin2179.xml
Optimizer: MINUIT
Statistic: UNBINNED

Performing an iterative likelihood fit...

Fit tolerance = 1

Performing likelihood fit...
Done.

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    .10000E+07   1.0000          .0000       .10000E+07
     2 'Prefactor '    31.328       1.0000         .10000E-03   10000.    
     3 'Prefactor '    .71136E-04   1.0000          .0000       .10000E+07
     4 'norm      '    .24808       1.0000          .0000       .10000E+07
     5 'Prefactor '    .46140E-05   1.0000          .0000       .10000E+07
     6 'Prefactor '    7.6098       1.0000          .0000       .10000E+07
     7 'norm      '    .17004E-03   1.0000          .0000       .10000E+07
     8 'norm      '    8.3367       1.0000          .0000       .10000E+07
     9 'Prefactor '    7371.3       1.0000          .0000       .10000E+07
    10 'norm      '    1045.4       1.0000          .0000       .10000E+07
    11 'Prefactor '    .37972E-01   1.0000          .0000       .10000E+07
    12 'norm      '    .10283E-05   1.0000          .0000       .10000E+07
    13 'norm      '    .39968E-08   1.0000          .0000       .10000E+07
    14 'norm      '    .33553       1.0000          .0000       .10000E+07
    15 'norm      '    .17966E-03   1.0000          .0000       .10000E+07
    16 'Prefactor '    .31965E-04   1.0000          .0000       .10000E+07
    17 'Prefactor '    .31510E-04   1.0000          .0000       .10000E+07
    18 'Prefactor '    .20395E-06   1.0000          .0000       .10000E+07
    19 'norm      '    .52286E-02   1.0000          .0000       .10000E+07
    20 'Normalizat'    .90724E-01   1.0000         .10000E-01   10.000    
    21 'Prefactor '    .49200       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .1693E+06   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.
  MNHESS FAILS AND WILL RETURN DIAGONAL MATRIX. 

 FCN=   332.4473     FROM MIGRAD    STATUS=CONVERGED    276 CALLS     1298 TOTAL
                     EDM=   .14E-10  STRATEGY=1  ERROR MATRIX UNCERTAINTY=100.0%

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          .10000E+07    41864.        .42118E-01** at limit **
   2  Prefactor     .14753E-03    7625.4        .17897E-02** at limit **
   3  Prefactor      .0000        93.478        .42118E-03** at limit **
   4  norm           .0000        353.81        .10976E-02** at limit **
   5  Prefactor      .0000        73.903        .42118E-03** at limit **
   6  Prefactor      .0000        551.89        .36329E-03** at limit **
   7  norm          .33307E-09    241.48        .42118E-03** at limit **
   8  norm          8.3367        1.0018         .0000         .0000    
   9  Prefactor     7372.8        1.0001        .78499E-08   -.14725    
  10  norm          1046.1        1.0003        .96416E-08   -.26175E-01
  11  Prefactor      .0000        .64452        .90534E-07** at limit **
  12  norm           .0000        .44347E-01   -.10249E-06** at limit **
  13  norm           .0000        .44347E-01   -.23889E-06** at limit **
  14  norm          .33658        .56491       -.58942E-07    .14522E-04
  15  norm          .22204E-09    .44347E-01    .36420E-06** at limit **
  16  Prefactor      .0000        .44347E-01    .32405E-07** at limit **
  17  Prefactor      .0000        .44347E-01   -.85169E-08** at limit **
  18  Prefactor      .0000        .44347E-01   -.38016E-06** at limit **
  19  norm           .0000        .44347E-01    .90041E-07** at limit **
  20  Normalizat    .91050E-01    .29393       -.10856E-04    .60137E-06
  21  Prefactor     .49187        .83338        .12542E-04    .27237E-04
                               ERR DEF=  .500    
Final values: 
  norm       = 1e+06
  Prefactor  = 0.000147528
  Prefactor  = 0
  norm       = 0
  Prefactor  = 0
  Prefactor  = 0
  norm       = 3.33067e-10
  norm       = 8.33668
  Prefactor  = 7372.79
  norm       = 1046.08
  Prefactor  = 0
  norm       = 0
  norm       = 0
  norm       = 0.336576
  norm       = 2.22045e-10
  Prefactor  = 0
  Prefactor  = 0
  Prefactor  = 0
  norm       = 0
  Normalizat = 0.0910501
  Prefactor  = 0.491868
 **********
 **   18 **HESSE 
 **********
  MNHESS FAILS AND WILL RETURN DIAGONAL MATRIX. 

 FCN=   332.4473     FROM HESSE     STATUS=FAILED        25 CALLS     1323 TOTAL
                     EDM=   .14E-10  STRATEGY=1  ERROR MATRIX UNCERTAINTY=100.0%

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          .10000E+07    41864.        .42118E-01    1.5705    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .14753E-03    7625.4        .17897E-02   -1.5709    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor      .0000        93.478        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  norm           .0000        353.81        .10976E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor      .0000        73.903        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor      .0000        551.89        .36329E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  norm          .33307E-09    241.48        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          28822.        28814.         .0000       -1.5650    
   9  Prefactor     7372.8        1.0001        .78499E-08   -1.3989    
  10  norm          1046.1        1.0003        .96416E-08   -1.5061    
  11  Prefactor      .0000        .64452        .90534E-07   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  norm           .0000        .44347E-01   -.10249E-06   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm           .0000        .44347E-01   -.23889E-06   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  norm          .33658        .56491       -.58942E-07   -1.5696    
  15  norm          .22204E-09    .44347E-01    .36420E-06   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor      .0000        .44347E-01    .32405E-07   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor      .0000        .44347E-01   -.85169E-08   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor      .0000        .44347E-01   -.38016E-06   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  norm           .0000        .44347E-01    .90041E-07   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Normalizat    .91050E-01    .29393       -.10856E-04   -1.3904    
  21  Prefactor     .49187        .83338        .12542E-04   -1.1235    
                               ERR DEF=  .500    
Minuit fit quality: 1   estimated distance: 1.42827e-11
Minuit parameter uncertainties:
  1  54.0551
  2  1.11741
  3  3.34665e-05
  4  1.19012e-06
  5  2.01449e-05
  6  0.000113808
  7  0.000547421
  8  1.00181
  9  1.0001
  10  1.00034
  11  3.70303e-07
  12  5.04561e-07
  13  2.25049e-07
  14  0.564906
  15  6.10762e-06
  16  1.14627e-06
  17  6.73213e-07
  18  5.4722e-07
  19  1.45961e-06
  20  0.299474
  21  0.855517
Done.

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

Extracting fit parameters...

4FGL J1816.9-4942
   Spectrum: LogParabola
1266         norm:  0.000e+00  5.046e-07  0.000e+00  1.000e+06 ( 1.000e-12)
1267        alpha:  2.245e+00  0.000e+00  0.000e+00  5.000e+00 ( 1.000e+00) fixed
1268         beta:  1.727e-01  0.000e+00 -5.000e+00  1.000e+01 ( 1.000e+00) fixed
1269           Eb:  9.507e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
1679    Prefactor:  4.919e-01  8.555e-01  0.000e+00  1.000e+01 ( 1.000e+00)
1680        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
1681        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
1652   Normalization:  9.105e-02  2.995e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 0.00
Ra Dec: 274.244 -49.716
Photon Flux Upper Limit: 1.87312065584e-06 ph cm-2 s-1
Energy Flux Upper Limit: None

Saving results to:
/lscratch/kocevski/31687815/likelihoodResults_804124801_804384001_4FGL_J1816.9-4942_daily_bin2179.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) = 332.448956439
delta logL = -0.00163809734153

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 332.447321881
delta logL = -3.53892750127e-06

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    .13893E-03   1.0000          .0000       .10000E+07
     2 'alpha     '    3.1274       1.0000          .0000       5.0000    
     3 'Normalizat'    .91060E-01   1.0000         .10000E-01   10.000    
     4 'Prefactor '    .49195       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .1693E+06   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   332.4473     FROM MIGRAD    STATUS=CONVERGED     86 CALLS      273 TOTAL
                     EDM=   .56E-10    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          .55511E-08    5.1224        .42118E-03** at limit **
   2  alpha         2.6419        3.2204        .42922        .16554E-09
   3  Normalizat    .91045E-01    .81915E-02    .22899        .55786E-04
   4  Prefactor     .49187        .27828E-02    .29234E-01    .48268E-03
                               ERR DEF=  .500    
Final values: 
  norm       = 5.55112e-09
  alpha      = 2.64188
  Normalizat = 0.0910455
  Prefactor  = 0.491874
 **********
 **   18 **HESSE 
 **********

 FCN=   332.4473     FROM HESSE     STATUS=NOT POSDEF    33 CALLS      306 TOTAL
                     EDM=   .24E-09    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          .55511E-08    22.549        .84235E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  alpha         2.6419        3.5977        .50000        .56783E-01
   3  Normalizat    .91045E-01    .19004E-01    .91769E-02   -1.3904    
   4  Prefactor     .49187        .58409E-02    .12918E-03   -1.1235    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 2.42148e-10
Minuit parameter uncertainties:
  1  0.000706306
  2  69061.7
  3  0.0190054
  4  0.00584088
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 332.447318343
delta logL = -7.17818693374e-10

Extracting fit parameters...

4FGL J1816.9-4942
   Spectrum: LogParabola
1266         norm:  5.551e-09  7.063e-04  0.000e+00  1.000e+06 ( 1.000e-12)
1267        alpha:  2.642e+00  6.906e+04  0.000e+00  5.000e+00 ( 1.000e+00)
1268         beta:  1.727e-01  0.000e+00 -5.000e+00  1.000e+01 ( 1.000e+00) fixed
1269           Eb:  9.507e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
1679    Prefactor:  4.919e-01  5.841e-03  0.000e+00  1.000e+01 ( 1.000e+00)
1680        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
1681        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
1652   Normalization:  9.105e-02  1.901e-02  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 0.00
Ra Dec: 274.244 -49.716

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 /lscratch/kocevski/31687815/cmap_HighResolution_804124801_804384001_4FGL_J1816.9-4942_daily_bin2179.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET job_status='DONE', comment='SUCCESS', photon_flux_upper_limit='1.87e-06', time_completed='2026-07-14 17:48:46.463362', job_id='31687815', GAL2='0.49', fit_tolerance='1e-08', EG2='0.09', EG='0.09', time_epoch_completed='1784076526.46', return_code2='102', ts='0.00', return_code='101', GAL='0.49', dlogl='-7.18e-10', ts2='-0.00', photon_index_error='0.00', photon_index='2.24' WHERE bin_id='2179' AND source_name='4FGL J1816.9-4942' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Tue Jul 14 17:48:46 PDT 2026

