/sdf/group/fermi/u/kocevski/software/conda/envs/fermitools_v1.0.5/lib/python2.7/site-packages/pyfits/__init__.py:22: PyFITSDeprecationWarning: PyFITS is deprecated, please use astropy.io.fits
  PyFITSDeprecationWarning)  # noqa

Likelihood Analysis Tool
Support Contact: Daniel Kocevski (daniel.kocevski@nasa.gov)

Importing modules...
This is make3FGLxml version 01r0.
The default diffuse model files and names are for pass 8 and assume you have v10r00p05 of the Fermi Science Tools or higher.
This is make4FGLDR3xml version 01r09.
The default diffuse model files and names are for P8R3, 4FGL DRs, and the default fermitools directory locations.

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

/sdf/group/fermi/u/kocevski/software/conda/envs/fermitools_v1.0.5/lib/python2.7/site-packages/matplotlib/cbook/deprecation.py:106: MatplotlibDeprecationWarning: The mpl_toolkits.axes_grid module was deprecated in version 2.1. Use mpl_toolkits.axes_grid1 and mpl_toolkits.axisartist provies the same functionality instead.
  warnings.warn(message, mplDeprecation, stacklevel=1)

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

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


Performing analysis on: 4FGL_J1659.7-3131_daily_bin2063
RA = 254.945, Dec = -31.5209
tmin = 774057601, tmax = 774316801
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='14094395', job_status='RUN', time_executed='2025-10-20 12:46:15.645756', time_epoch_executed='1760989575.65' WHERE source_name='4FGL J1659.7-3131' and cadence='daily' and bin_id='2063'

Database successfully updated.
Done.

Creating custom output directory:
/lscratch/kocevski/14094395

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/lscratch/kocevski/14094395/ft1_4FGL_J1659.7-3131_daily_bin2063.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/lscratch/kocevski/14094395/ft2_4FGL_J1659.7-3131_daily_bin2063.fits


Selecting the photons:
time -p gtselect infile=/lscratch/kocevski/14094395/ft1_4FGL_J1659.7-3131_daily_bin2063.fits outfile=/lscratch/kocevski/14094395/ft1_filteredMKT_4FGL_J1659.7-3131_daily_bin2063.fits ra=254.945 dec=-31.5209 rad=12.0 tmin=774057601.0 tmax=774316801.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.40
user 1.79
sys 0.23

Adding sun position to ft2 file:
/sdf/group/fermi/g/LCRepository/Repository/bin/sunpos /lscratch/kocevski/14094395/ft2_4FGL_J1659.7-3131_daily_bin2063.fits

Selecting the good time intervals:
time -p gtmktime scfile=/lscratch/kocevski/14094395/ft2_4FGL_J1659.7-3131_daily_bin2063.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/14094395/ft1_filteredMKT_4FGL_J1659.7-3131_daily_bin2063.fits evtable="EVENTS" outfile="/lscratch/kocevski/14094395/ft1_filtered_4FGL_J1659.7-3131_daily_bin2063.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.69
user 0.19
sys 0.14

Number of photons that the gtmktime cut: 5041

Generating the livetime cube:
time -p gtltcube evfile="/lscratch/kocevski/14094395/ft1_filtered_4FGL_J1659.7-3131_daily_bin2063.fits" evtable="EVENTS" scfile=/lscratch/kocevski/14094395/ft2_4FGL_J1659.7-3131_daily_bin2063.fits sctable="SC_DATA" outfile=/lscratch/kocevski/14094395/ltcube_774057601_774316801_4FGL_J1659.7-3131_daily_bin2063.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/14094395/ft2_4FGL_J1659.7-3131_daily_bin2063.fits
.....................!
real 8.34
user 7.73
sys 0.31

Generating the exposure map:
time -p gtexpmap evfile=/lscratch/kocevski/14094395/ft1_filtered_4FGL_J1659.7-3131_daily_bin2063.fits evtable="EVENTS" scfile=/lscratch/kocevski/14094395/ft2_4FGL_J1659.7-3131_daily_bin2063.fits sctable="SC_DATA" expcube=/lscratch/kocevski/14094395/ltcube_774057601_774316801_4FGL_J1659.7-3131_daily_bin2063.fits outfile=/lscratch/kocevski/14094395/expmap_774057601_774316801_4FGL_J1659.7-3131_daily_bin2063.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/14094395/ltcube_774057601_774316801_4FGL_J1659.7-3131_daily_bin2063.fits
.....................!
real 64.71
user 60.34
sys 3.69

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 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 FHES J1626.9-2431 in ROI with RadialGaussian spatial model.
Extended source FHES J1741.6-3917 in ROI with RadialDisk spatial model.
Extended source FGES J1745.8-3028 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 FGES J1652.2-4633 in ROI with RadialDisk spatial model.
Extended source FGES J1655.5-4737 in ROI with RadialDisk spatial model.
Extended source W 28 in ROI with RadialDisk spatial model.
Extended source HESS J1804-216 in ROI with RadialDisk spatial model.
Extended source HESS J1614-518 in ROI with RadialDisk spatial model.
Extended source HESS J1616-508 in ROI with RadialDisk spatial model.
Extended source W 30 in ROI with RadialDisk spatial model.
Extended source HESS J1808-204 in ROI with RadialDisk spatial model.
Extended source HESS J1809-193 in ROI with RadialDisk spatial model.
Extended source HESS J1813-178 in ROI with RadialDisk spatial model.
Added 554 point sources and 17 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 J1659.7-3131 @ 254.945 -31.5209

Creating the counts map:
time -p gtbin evfile=/lscratch/kocevski/14094395/ft1_filtered_4FGL_J1659.7-3131_daily_bin2063.fits scfile=/lscratch/kocevski/14094395/ft2_4FGL_J1659.7-3131_daily_bin2063.fits outfile=/lscratch/kocevski/14094395/cmap_774057601_774316801_4FGL_J1659.7-3131_daily_bin2063.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=254.945 yref=-31.5209 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
r
real 0.57
user 0.22
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/lscratch/kocevski/14093922/ft1_filtered_4FGL_J1659.7-3131_daily_bin2063.fits scfile=/lscratch/kocevski/14093922/ft2_4FGL_J1659.7-3131_daily_bin2063.fits outfile=/lscratch/kocevski/14093922/cmap_HighResolution_774057601_774316801_4FGL_J1659.7-3131_daily_bin2063.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=254.945 yref=-31.5209 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.62
user 0.26
sys 0.16

Computing the diffuse response:
time -p gtdiffrsp evfile=/lscratch/kocevski/14093922/ft1_filtered_4FGL_J1659.7-3131_daily_bin2063.fits evtable="EVENTS" scfile=/lscratch/kocevski/14093922/ft2_4FGL_J1659.7-3131_daily_bin2063.fits sctable="SC_DATA" srcmdl=/lscratch/kocevski/14093922/Model_4FGL_J1659.7-3131_daily_bin2063.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 J1626.9-2431
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 HESS J1804-216
adding source HESS J1808-204
adding source HESS J1809-193
adding source HESS J1813-178
adding source RX J1713.7-3946
adding source W 28
adding source W 30
Working on...
/lscratch/kocevski/14093922/ft1_filtered_4FGL_J1659.7-3131_daily_bin2063.fits.....................!
real 560.74
user 556.31
sys 1.30

Creating the likelihood object...
obs = UnbinnedObs('/lscratch/kocevski/14093922/ft1_filtered_4FGL_J1659.7-3131_daily_bin2063.fits', '/lscratch/kocevski/14093922/ft2_4FGL_J1659.7-3131_daily_bin2063.fits', expMap='/lscratch/kocevski/14093922/expmap_774057601_774316801_4FGL_J1659.7-3131_daily_bin2063.fits', expCube='/lscratch/kocevski/14093922/ltcube_774057601_774316801_4FGL_J1659.7-3131_daily_bin2063.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/lscratch/kocevski/14093922/Model_4FGL_J1659.7-3131_daily_bin2063.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1659.7-3131'

4FGL J1659.7-3131
   Spectrum: PowerLaw
605    Prefactor:  3.151e+00  0.000e+00  0.000e+00  1.000e+06 ( 1.000e-13)
606        Index:  2.293e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
607        Scale:  1.906e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /lscratch/kocevski/14093922/ft1_filtered_4FGL_J1659.7-3131_daily_bin2063.fits
Spacecraft file(s): /lscratch/kocevski/14093922/ft2_4FGL_J1659.7-3131_daily_bin2063.fits
Exposure map: /lscratch/kocevski/14093922/expmap_774057601_774316801_4FGL_J1659.7-3131_daily_bin2063.fits
Exposure cube: /lscratch/kocevski/14093922/ltcube_774057601_774316801_4FGL_J1659.7-3131_daily_bin2063.fits
IRFs: P8R3_SOURCE_V2
Source model file: /lscratch/kocevski/14093922/Model_4FGL_J1659.7-3131_daily_bin2063.xml
Optimizer: MINUIT
Statistic: UNBINNED

Performing an iterative likelihood fit...

Fit tolerance = 1

Performing likelihood fit...
Done.

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    1.7831       1.0000          .0000       .10000E+07
     2 'norm      '    .22254E-06   1.0000          .0000       .10000E+07
     3 'norm      '    .14433E-08   1.0000          .0000       .10000E+07
     4 'norm      '    5.7590       1.0000          .0000       .10000E+07
     5 'Prefactor '    .30619E-04   1.0000          .0000       .10000E+07
     6 'Prefactor '    .70090E-02   1.0000          .0000       .10000E+07
     7 'norm      '    11.094       1.0000          .0000       .10000E+07
     8 'Normalizat'    1.9779       1.0000         .10000E-01   10.000    
     9 'Prefactor '    .94787       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .2072E+06   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   44902.93     FROM MIGRAD    STATUS=CONVERGED     80 CALLS      436 TOTAL
                     EDM=   .17E-10  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .9%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          1.1529        65.568       -.56608E-06   -.70039E-04
   2  norm           .0000        3.4094       -.29827E-07** at limit **
   3  norm           .0000        .97910        .25171E-07** at limit **
   4  norm          5.7517        8.2514        .74216E-06    .14570E-02
   5  Prefactor      .0000        10.782        .66021E-06** at limit **
   6  Prefactor     .55511E-10    34.647       -.35887E-06** at limit **
   7  norm          10.900        12.650        .57168E-07   -.39125E-04
   8  Normalizat    1.9793        .44583       -.10722E-04   -.81466E-05
   9  Prefactor     .94788        .22256E-01    .57942E-06   -.21826E-03
                               ERR DEF=  .500    
Final values: 
  norm       = 1.15287
  norm       = 0
  norm       = 0
  norm       = 5.75174
  Prefactor  = 0
  Prefactor  = 5.55112e-11
  norm       = 10.8998
  Normalizat = 1.97931
  Prefactor  = 0.947882
 **********
 **   18 **HESSE 
 **********

 FCN=   44902.93     FROM HESSE     STATUS=OK           101 CALLS      537 TOTAL
                     EDM=   .12E-06    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          1.1529        61.989        .78332E-03   -1.5686    
   2  norm           .0000        3.3889        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm           .0000        .97123        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  norm          5.7517        8.2581        .41830E-03   -1.5660    
   5  Prefactor      .0000        10.674        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .55511E-10    34.651        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  norm          10.900        12.619        .30053E-03   -1.5642    
   8  Normalizat    1.9793        .44962        .25993       -.65070    
   9  Prefactor     .94788        .22068E-01    .26052E-01   -.94487    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.15257e-07
Minuit parameter uncertainties:
  1  16.9077
  2  4.44696e-06
  3  2.08457e-06
  4  8.25811
  5  1.08914e-05
  6  6.64383e-05
  7  12.6189
  8  0.450583
  9  0.0220682
Done.

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

Extracting fit parameters...

4FGL J1659.7-3131
   Spectrum: PowerLaw
605    Prefactor:  0.000e+00  1.089e-05  0.000e+00  1.000e+06 ( 1.000e-13)
606        Index:  2.293e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
607        Scale:  1.906e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
2035    Prefactor:  9.479e-01  2.207e-02  0.000e+00  1.000e+01 ( 1.000e+00)
2036        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
2037        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
2007   Normalization:  1.979e+00  4.506e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 0.00
Ra Dec: 254.945 -31.521
Photon Flux Upper Limit: 1.64313512753e-07 ph cm-2 s-1
Energy Flux Upper Limit: 0.0126038225262 MeV cm-2 s-1

Saving results to:
/lscratch/kocevski/14093922/likelihoodResults_774057601_774316801_4FGL_J1659.7-3131_daily_bin2063.txt

Performing a free index iterative likelihood fit...

Freezing all point sources, except source of interest...

Done.

Freeing candidate source...
Done.

Fit tolerance = 1

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 44902.9815395
delta logL = -0.0473131093022

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 44902.9342267
delta logL = -3.7053541746e-07

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .90306E-06   1.0000          .0000       .10000E+07
     2 'Index     '    1.4000       1.0000          .0000       10.000    
     3 'Normalizat'    1.9796       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .94788       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .2072E+06   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

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

 FCN=   44902.93     FROM MIGRAD    STATUS=CONVERGED     50 CALLS      220 TOTAL
                     EDM=   .21E-11  STRATEGY=1  ERROR MATRIX UNCERTAINTY=100.0%

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor      .0000        5.0544        .42118E-03** at limit **
   2  Index         1.3629        1.0486       -.66360E-04     .0000    
   3  Normalizat    1.9793        1.0211        .48631E-05    .30738E-05
   4  Prefactor     .94788        1.2902       -.64966E-06    .23098E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0
  Index      = 1.3629
  Normalizat = 1.97931
  Prefactor  = 0.947882
 **********
 **   18 **HESSE 
 **********
  MNHESS FAILS AND WILL RETURN DIAGONAL MATRIX. 

 FCN=   44902.93     FROM HESSE     STATUS=FAILED         9 CALLS      229 TOTAL
                     EDM=   .21E-11  STRATEGY=1  ERROR MATRIX UNCERTAINTY=100.0%

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor      .0000        5.0544        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         .15082        1.3861       -.66360E-04   -.81456    
   3  Normalizat    1.9793        1.0211        .48631E-05   -.65070    
   4  Prefactor     .94788        1.2902       -.64966E-06   -.94487    
                               ERR DEF=  .500    
Minuit fit quality: 1   estimated distance: 2.05131e-12
Minuit parameter uncertainties:
  1  9.2742e-06
  2  1.0657
  3  1.03265
  4  1.33609
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
Done.

MINUIT Return Code (Free Index): 101
logL (Free Index) = 44902.9342264
delta logL = 0.0

Extracting fit parameters...

4FGL J1659.7-3131
   Spectrum: PowerLaw
605    Prefactor:  0.000e+00  9.274e-06  0.000e+00  1.000e+06 ( 1.000e-13)
606        Index:  1.363e+00  1.066e+00  0.000e+00  1.000e+01 (-1.000e+00)
607        Scale:  1.906e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
2035    Prefactor:  9.479e-01  1.336e+00  0.000e+00  1.000e+01 ( 1.000e+00)
2036        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
2037        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
2007   Normalization:  1.979e+00  1.033e+00  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 0.00
Ra Dec: 254.945 -31.521

Creating a high resolution counts map...
INFO: Auto-setting vmin to -1.000e-01 [aplpy.core]
INFO: Auto-setting vmax to  1.110e+00 [aplpy.core]
Saving /lscratch/kocevski/14093922/cmap_HighResolution_774057601_774316801_4FGL_J1659.7-3131_daily_bin2063.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.26e-02', job_status='DONE', photon_flux_upper_limit='1.64e-07', time_completed='2025-10-20 13:04:33.593477', job_id='14093922', GAL2='0.95', fit_tolerance='1e-08', EG2='1.98', EG='1.98', time_epoch_completed='1760990673.59', return_code2='101', ts='0.00', comment='SUCCESS', return_code='0', GAL='0.95', dlogl='0.00e+00', ts2='0.00', photon_index_error='0.00', photon_index='2.29' WHERE bin_id='2063' AND source_name='4FGL J1659.7-3131' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Oct 20 13:04:33 PDT 2025

eal 0.53
user 0.22
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/lscratch/kocevski/14094395/ft1_filtered_4FGL_J1659.7-3131_daily_bin2063.fits scfile=/lscratch/kocevski/14094395/ft2_4FGL_J1659.7-3131_daily_bin2063.fits outfile=/lscratch/kocevski/14094395/cmap_HighResolution_774057601_774316801_4FGL_J1659.7-3131_daily_bin2063.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=254.945 yref=-31.5209 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.50
user 0.23
sys 0.16

Computing the diffuse response:
time -p gtdiffrsp evfile=/lscratch/kocevski/14094395/ft1_filtered_4FGL_J1659.7-3131_daily_bin2063.fits evtable="EVENTS" scfile=/lscratch/kocevski/14094395/ft2_4FGL_J1659.7-3131_daily_bin2063.fits sctable="SC_DATA" srcmdl=/lscratch/kocevski/14094395/Model_4FGL_J1659.7-3131_daily_bin2063.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 J1626.9-2431
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 HESS J1804-216
adding source HESS J1808-204
adding source HESS J1809-193
adding source HESS J1813-178
adding source RX J1713.7-3946
adding source W 28
adding source W 30
Working on...
/lscratch/kocevski/14094395/ft1_filtered_4FGL_J1659.7-3131_daily_bin2063.fits.....................!
real 585.09
user 580.19
sys 1.01

Creating the likelihood object...
obs = UnbinnedObs('/lscratch/kocevski/14094395/ft1_filtered_4FGL_J1659.7-3131_daily_bin2063.fits', '/lscratch/kocevski/14094395/ft2_4FGL_J1659.7-3131_daily_bin2063.fits', expMap='/lscratch/kocevski/14094395/expmap_774057601_774316801_4FGL_J1659.7-3131_daily_bin2063.fits', expCube='/lscratch/kocevski/14094395/ltcube_774057601_774316801_4FGL_J1659.7-3131_daily_bin2063.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/lscratch/kocevski/14094395/Model_4FGL_J1659.7-3131_daily_bin2063.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1659.7-3131'

4FGL J1659.7-3131
   Spectrum: PowerLaw
605    Prefactor:  3.151e+00  0.000e+00  0.000e+00  1.000e+06 ( 1.000e-13)
606        Index:  2.293e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
607        Scale:  1.906e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /lscratch/kocevski/14094395/ft1_filtered_4FGL_J1659.7-3131_daily_bin2063.fits
Spacecraft file(s): /lscratch/kocevski/14094395/ft2_4FGL_J1659.7-3131_daily_bin2063.fits
Exposure map: /lscratch/kocevski/14094395/expmap_774057601_774316801_4FGL_J1659.7-3131_daily_bin2063.fits
Exposure cube: /lscratch/kocevski/14094395/ltcube_774057601_774316801_4FGL_J1659.7-3131_daily_bin2063.fits
IRFs: P8R3_SOURCE_V2
Source model file: /lscratch/kocevski/14094395/Model_4FGL_J1659.7-3131_daily_bin2063.xml
Optimizer: MINUIT
Statistic: UNBINNED

Performing an iterative likelihood fit...

Fit tolerance = 1

Performing likelihood fit...
Done.

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    1.7831       1.0000          .0000       .10000E+07
     2 'norm      '    .22254E-06   1.0000          .0000       .10000E+07
     3 'norm      '    .14433E-08   1.0000          .0000       .10000E+07
     4 'norm      '    5.7590       1.0000          .0000       .10000E+07
     5 'Prefactor '    .30619E-04   1.0000          .0000       .10000E+07
     6 'Prefactor '    .70090E-02   1.0000          .0000       .10000E+07
     7 'norm      '    11.094       1.0000          .0000       .10000E+07
     8 'Normalizat'    1.9779       1.0000         .10000E-01   10.000    
     9 'Prefactor '    .94787       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .2072E+06   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   44902.93     FROM MIGRAD    STATUS=CONVERGED     80 CALLS      436 TOTAL
                     EDM=   .17E-10  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .9%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          1.1529        65.568       -.56608E-06   -.70039E-04
   2  norm           .0000        3.4094       -.29827E-07** at limit **
   3  norm           .0000        .97910        .25171E-07** at limit **
   4  norm          5.7517        8.2514        .74216E-06    .14570E-02
   5  Prefactor      .0000        10.782        .66021E-06** at limit **
   6  Prefactor     .55511E-10    34.647       -.35887E-06** at limit **
   7  norm          10.900        12.650        .57168E-07   -.39125E-04
   8  Normalizat    1.9793        .44583       -.10722E-04   -.81466E-05
   9  Prefactor     .94788        .22256E-01    .57942E-06   -.21826E-03
                               ERR DEF=  .500    
Final values: 
  norm       = 1.15287
  norm       = 0
  norm       = 0
  norm       = 5.75174
  Prefactor  = 0
  Prefactor  = 5.55112e-11
  norm       = 10.8998
  Normalizat = 1.97931
  Prefactor  = 0.947882
 **********
 **   18 **HESSE 
 **********

 FCN=   44902.93     FROM HESSE     STATUS=OK           101 CALLS      537 TOTAL
                     EDM=   .12E-06    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          1.1529        61.989        .78332E-03   -1.5686    
   2  norm           .0000        3.3889        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm           .0000        .97123        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  norm          5.7517        8.2581        .41830E-03   -1.5660    
   5  Prefactor      .0000        10.674        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .55511E-10    34.651        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  norm          10.900        12.619        .30053E-03   -1.5642    
   8  Normalizat    1.9793        .44962        .25993       -.65070    
   9  Prefactor     .94788        .22068E-01    .26052E-01   -.94487    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.15257e-07
Minuit parameter uncertainties:
  1  16.9077
  2  4.44696e-06
  3  2.08457e-06
  4  8.25811
  5  1.08914e-05
  6  6.64383e-05
  7  12.6189
  8  0.450583
  9  0.0220682
Done.

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

Extracting fit parameters...

4FGL J1659.7-3131
   Spectrum: PowerLaw
605    Prefactor:  0.000e+00  1.089e-05  0.000e+00  1.000e+06 ( 1.000e-13)
606        Index:  2.293e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
607        Scale:  1.906e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
2035    Prefactor:  9.479e-01  2.207e-02  0.000e+00  1.000e+01 ( 1.000e+00)
2036        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
2037        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
2007   Normalization:  1.979e+00  4.506e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 0.00
Ra Dec: 254.945 -31.521
Photon Flux Upper Limit: 1.64313512753e-07 ph cm-2 s-1
Energy Flux Upper Limit: 0.0126038225262 MeV cm-2 s-1

Saving results to:
/lscratch/kocevski/14094395/likelihoodResults_774057601_774316801_4FGL_J1659.7-3131_daily_bin2063.txt

Performing a free index iterative likelihood fit...

Freezing all point sources, except source of interest...

Done.

Freeing candidate source...
Done.

Fit tolerance = 1

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 44902.9815395
delta logL = -0.0473131093022

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 44902.9342267
delta logL = -3.7053541746e-07

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .90306E-06   1.0000          .0000       .10000E+07
     2 'Index     '    1.4000       1.0000          .0000       10.000    
     3 'Normalizat'    1.9796       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .94788       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .2072E+06   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

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

 FCN=   44902.93     FROM MIGRAD    STATUS=CONVERGED     50 CALLS      220 TOTAL
                     EDM=   .21E-11  STRATEGY=1  ERROR MATRIX UNCERTAINTY=100.0%

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor      .0000        5.0544        .42118E-03** at limit **
   2  Index         1.3629        1.0486       -.66360E-04     .0000    
   3  Normalizat    1.9793        1.0211        .48631E-05    .30738E-05
   4  Prefactor     .94788        1.2902       -.64966E-06    .23098E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0
  Index      = 1.3629
  Normalizat = 1.97931
  Prefactor  = 0.947882
 **********
 **   18 **HESSE 
 **********
  MNHESS FAILS AND WILL RETURN DIAGONAL MATRIX. 

 FCN=   44902.93     FROM HESSE     STATUS=FAILED         9 CALLS      229 TOTAL
                     EDM=   .21E-11  STRATEGY=1  ERROR MATRIX UNCERTAINTY=100.0%

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor      .0000        5.0544        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         .15082        1.3861       -.66360E-04   -.81456    
   3  Normalizat    1.9793        1.0211        .48631E-05   -.65070    
   4  Prefactor     .94788        1.2902       -.64966E-06   -.94487    
                               ERR DEF=  .500    
Minuit fit quality: 1   estimated distance: 2.05131e-12
Minuit parameter uncertainties:
  1  9.2742e-06
  2  1.0657
  3  1.03265
  4  1.33609
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
Done.

MINUIT Return Code (Free Index): 101
logL (Free Index) = 44902.9342264
delta logL = 0.0

Extracting fit parameters...

4FGL J1659.7-3131
   Spectrum: PowerLaw
605    Prefactor:  0.000e+00  9.274e-06  0.000e+00  1.000e+06 ( 1.000e-13)
606        Index:  1.363e+00  1.066e+00  0.000e+00  1.000e+01 (-1.000e+00)
607        Scale:  1.906e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
2035    Prefactor:  9.479e-01  1.336e+00  0.000e+00  1.000e+01 ( 1.000e+00)
2036        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
2037        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
2007   Normalization:  1.979e+00  1.033e+00  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 0.00
Ra Dec: 254.945 -31.521

Creating a high resolution counts map...
INFO: Auto-setting vmin to -1.000e-01 [aplpy.core]
INFO: Auto-setting vmax to  1.110e+00 [aplpy.core]
Saving /lscratch/kocevski/14094395/cmap_HighResolution_774057601_774316801_4FGL_J1659.7-3131_daily_bin2063.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.26e-02', job_status='DONE', photon_flux_upper_limit='1.64e-07', time_completed='2025-10-20 13:16:50.753358', job_id='14094395', GAL2='0.95', fit_tolerance='1e-08', EG2='1.98', EG='1.98', time_epoch_completed='1760991410.75', return_code2='101', ts='0.00', comment='SUCCESS', return_code='0', GAL='0.95', dlogl='0.00e+00', ts2='0.00', photon_index_error='0.00', photon_index='2.29' WHERE bin_id='2063' AND source_name='4FGL J1659.7-3131' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Oct 20 13:16:51 PDT 2025

