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

' /Data/Flight/Reprocess/P305

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/lscratch/kocevski/30013246/ft1_4FGL_J0017.5-0514_daily_bin2173.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/lscratch/kocevski/30013246/ft2_4FGL_J0017.5-0514_daily_bin2173.fits


Selecting the photons:
time -p gtselect infile=/lscratch/kocevski/30013246/ft1_4FGL_J0017.5-0514_daily_bin2173.fits outfile=/lscratch/kocevski/30013246/ft1_filteredMKT_4FGL_J0017.5-0514_daily_bin2173.fits ra=4.3949 dec=-5.2347 rad=12.0 tmin=802569601.0 tmax=802828801.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 3.37
user 2.79
sys 0.19

Adding sun position to ft2 file:
/sdf/group/fermi/g/LCRepository/Repository/bin/sunpos /lscratch/kocevski/30013246/ft2_4FGL_J0017.5-0514_daily_bin2173.fits

Selecting the good time intervals:
time -p gtmktime scfile=/lscratch/kocevski/30013246/ft2_4FGL_J0017.5-0514_daily_bin2173.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/30013246/ft1_filteredMKT_4FGL_J0017.5-0514_daily_bin2173.fits evtable="EVENTS" outfile="/lscratch/kocevski/30013246/ft1_filtered_4FGL_J0017.5-0514_daily_bin2173.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.66
user 0.21
sys 0.15

Number of photons that the gtmktime cut: 742

Generating the livetime cube:
time -p gtltcube evfile="/lscratch/kocevski/30013246/ft1_filtered_4FGL_J0017.5-0514_daily_bin2173.fits" evtable="EVENTS" scfile=/lscratch/kocevski/30013246/ft2_4FGL_J0017.5-0514_daily_bin2173.fits sctable="SC_DATA" outfile=/lscratch/kocevski/30013246/ltcube_802569601_802828801_4FGL_J0017.5-0514_daily_bin2173.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/30013246/ft2_4FGL_J0017.5-0514_daily_bin2173.fits
.....................!
real 8.92
user 8.32
sys 0.24

Generating the exposure map:
time -p gtexpmap evfile=/lscratch/kocevski/30013246/ft1_filtered_4FGL_J0017.5-0514_daily_bin2173.fits evtable="EVENTS" scfile=/lscratch/kocevski/30013246/ft2_4FGL_J0017.5-0514_daily_bin2173.fits sctable="SC_DATA" expcube=/lscratch/kocevski/30013246/ltcube_802569601_802828801_4FGL_J0017.5-0514_daily_bin2173.fits outfile=/lscratch/kocevski/30013246/expmap_802569601_802828801_4FGL_J0017.5-0514_daily_bin2173.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 f/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).

Done.


Performing analysis on: 4FGL_J0017.5-0514_daily_bin2173
RA = 4.3949, Dec = -5.2347
tmin = 802569601, tmax = 802828801
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='30013695', job_status='RUN', time_executed='2026-06-27 18:22:47.596485', time_epoch_executed='1782609767.6' WHERE source_name='4FGL J0017.5-0514' and cadence='daily' and bin_id='2173'
UPDATE lightcurve_data_v2 SET job_id='30013695', job_status='RUN', time_executed='2026-06-27 18:22:47.596485', time_epoch_executed='1782609767.6' WHERE source_name='4FGL J0017.5-0514' and cadence='daily' and bin_id='2173'
1290 (HY000): The MySQL server is running with the --read-only option so it cannot execute this statement
Traceback (most recent call last):
  File "/sdf/data/fermi/g/LCRepository/Likelihood/Scripts/DatabaseTools.py", line 124, in executeCommand
    cursor.execute(command)
  File "/sdf/group/fermi/u/kocevski/software/conda/envs/fermitools_v1.0.5/lib/python2.7/site-packages/mysql/connector/cursor.py", line 554, in execute
    self._handle_result(self._connection.cmd_query(stmt))
  File "/sdf/group/fermi/u/kocevski/software/conda/envs/fermitools_v1.0.5/lib/python2.7/site-packages/mysql/connector/connection.py", line 495, in cmd_query
    result = self._handle_result(self._send_cmd(ServerCmd.QUERY, query))
  File "/sdf/group/fermi/u/kocevski/software/conda/envs/fermitools_v1.0.5/lib/python2.7/site-packages/mysql/connector/connection.py", line 397, in _handle_result
    raise errors.get_exception(packet)
DatabaseError: 1290 (HY000): The MySQL server is running with the --read-only option so it cannot execute this statement

Command execution failed.

Waiting 11.8280519226 seconds and trying again...


UPDATE lightcurve_data_v2 SET job_id='30013695', job_status='RUN', time_executed='2026-06-27 18:22:47.596485', time_epoch_executed='1782609767.6' WHERE source_name='4FGL J0017.5-0514' and cadence='daily' and bin_id='2173'
UPDATE lightcurve_data_v2 SET job_id='30013695', job_status='RUN', time_executed='2026-06-27 18:22:47.596485', time_epoch_executed='1782609767.6' WHERE source_name='4FGL J0017.5-0514' and cadence='daily' and bin_id='2173'
1290 (HY000): The MySQL server is running with the --read-only option so it cannot execute this statement
Traceback (most recent call last):
  File "/sdf/data/fermi/g/LCRepository/Likelihood/Scripts/DatabaseTools.py", line 124, in executeCommand
    cursor.execute(command)
  File "/sdf/group/fermi/u/kocevski/software/conda/envs/fermitools_v1.0.5/lib/python2.7/site-packages/mysql/connector/cursor.py", line 554, in execute
    self._handle_result(self._connection.cmd_query(stmt))
  File "/sdf/group/fermi/u/kocevski/software/conda/envs/fermitools_v1.0.5/lib/python2.7/site-packages/mysql/connector/connection.py", line 495, in cmd_query
    result = self._handle_result(self._send_cmd(ServerCmd.QUERY, query))
  File "/sdf/group/fermi/u/kocevski/software/conda/envs/fermitools_v1.0.5/lib/python2.7/site-packages/mysql/connector/connection.py", line 397, in _handle_result
    raise errors.get_exception(packet)
DatabaseError: 1290 (HY000): The MySQL server is running with the --read-only option so it cannot execute this statement

Command execution failed.

Waiting 11.8478577774 seconds and trying again...


UPDATE lightcurve_data_v2 SET job_id='30013695', job_status='RUN', time_executed='2026-06-27 18:22:47.596485', time_epoch_executed='1782609767.6' WHERE source_name='4FGL J0017.5-0514' and cadence='daily' and bin_id='2173'
UPDATE lightcurve_data_v2 SET job_id='30013695'or *unbinned* likelihood analysis only.
Do not use them for binned analyses.
Computing the ExposureMap using /lscratch/kocevski/30013246/ltcube_802569601_802828801_4FGL_J0017.5-0514_daily_bin2173.fits
.....................!
real 72.63
user 67.77
sys 4.06

Generating the xml model:
radLim = 0.001
maxRad = 12
normsOnly = True
freeVariableSources = True
Fixing all sources to their catalog values, except variable sources
Creating file and adding sources from 4FGL
Added 169 point sources and 0 extended sources

Setting source of interest to:
4FGL J0017.5-0514 @ 4.3949 -5.2347

Creating the counts map:
time -p gtbin evfile=/lscratch/kocevski/30013246/ft1_filtered_4FGL_J0017.5-0514_daily_bin2173.fits scfile=/lscratch/kocevski/30013246/ft2_4FGL_J0017.5-0514_daily_bin2173.fits outfile=/lscratch/kocevski/30013246/cmap_802569601_802828801_4FGL_J0017.5-0514_daily_bin2173.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=4.3949 yref=-5.2347 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.74
user 0.24
sys 0.12

Creating the high resolution counts map:
time -p gtbin evfile=/lscratch/kocevski/30013246/ft1_filtered_4FGL_J0017.5-0514_daily_bin2173.fits scfile=/lscratch/kocevski/30013246/ft2_4FGL_J0017.5-0514_daily_bin2173.fits outfile=/lscratch/kocevski/30013246/cmap_HighResolution_802569601_802828801_4FGL_J0017.5-0514_daily_bin2173.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=4.3949 yref=-5.2347 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.13

Computing the diffuse response:
time -p gtdiffrsp evfile=/lscratch/kocevski/30013246/ft1_filtered_4FGL_J0017.5-0514_daily_bin2173.fits evtable="EVENTS" scfile=/lscratch/kocevski/30013246/ft2_4FGL_J0017.5-0514_daily_bin2173.fits sctable="SC_DATA" srcmdl=/lscratch/kocevski/30013246/Model_4FGL_J0017.5-0514_daily_bin2173.xml irfs="P8R3_SOURCE_V2" evclsmin=0 evclass="INDEF" evtype="INDEF" convert=yes chatter=2 clobber=yes debug=no gui=no mode="ql"

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

adding source EG_v02
adding source GAL_V02
Working on...
/lscratch/kocevski/30013246/ft1_filtered_4FGL_J0017.5-0514_daily_bin2173.fits.....................!
real 31.26
user 30.04
sys 0.59

Creating the likelihood object...
obs = UnbinnedObs('/lscratch/kocevski/30013246/ft1_filtered_4FGL_J0017.5-0514_daily_bin2173.fits', '/lscratch/kocevski/30013246/ft2_4FGL_J0017.5-0514_daily_bin2173.fits', expMap='/lscratch/kocevski/30013246/expmap_802569601_802828801_4FGL_J0017.5-0514_daily_bin2173.fits', expCube='/lscratch/kocevski/30013246/ltcube_802569601_802828801_4FGL_J0017.5-0514_daily_bin2173.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/lscratch/kocevski/30013246/Model_4FGL_J0017.5-0514_daily_bin2173.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J0017.5-0514'

4FGL J0017.5-0514
   Spectrum: LogParabola
72          norm:  2.149e+00  0.000e+00  0.000e+00  1.000e+06 ( 1.000e-12)
73         alpha:  2.594e+00  0.000e+00  0.000e+00  5.000e+00 ( 1.000e+00) fixed
74          beta:  1.051e-01  0.000e+00 -5.000e+00  1.000e+01 ( 1.000e+00) fixed
75            Eb:  8.308e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /lscratch/kocevski/30013246/ft1_filtered_4FGL_J0017.5-0514_daily_bin2173.fits
Spacecraft file(s): /lscratch/kocevski/30013246/ft2_4FGL_J0017.5-0514_daily_bin2173.fits
Exposure map: /lscratch/kocevski/30013246/expmap_802569601_802828801_4FGL_J0017.5-0514_daily_bin2173.fits
Exposure cube: /lscratch/kocevski/30013246/ltcube_802569601_802828801_4FGL_J0017.5-0514_daily_bin2173.fits
IRFs: P8R3_SOURCE_V2
Source model file: /lscratch/kocevski/30013246/Model_4FGL_J0017.5-0514_daily_bin2173.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) = 8004.80625476

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .76529E-05   1.0000          .0000       .10000E+07
     2 'Prefactor '    44.751       1.0000          .0000       .10000E+07
     3 'Prefactor '    .41441E-04   1.0000          .0000       .10000E+07
     4 'norm      '    1.8520       1.0000          .0000       .10000E+07
     5 'Prefactor '    6.2750       1.0000          .0000       .10000E+07
     6 'norm      '    .30642E-07   1.0000          .0000       .10000E+07
     7 'norm      '    21.516       1.0000          .0000       .10000E+07
     8 'Prefactor '    .18978       1.0000          .0000       .10000E+07
     9 'Prefactor '    .32201E-03   1.0000          .0000       .10000E+07
    10 'norm      '    3.5570       1.0000          .0000       .10000E+07
    11 'Prefactor '    .64726E-07   1.0000          .0000       .10000E+07
    12 'Prefactor '    .91704E-06   1.0000          .0000       .10000E+07
    13 'norm      '    4.9934       1.0000          .0000       .10000E+07
    14 'norm      '    1.2755       1.0000          .0000       .10000E+07
    15 'Prefactor '    .19693E-04   1.0000          .0000       .10000E+07
    16 'Prefactor '    .11644E-04   1.0000          .0000       .10000E+07
    17 'Prefactor '    43.972       1.0000          .0000       .10000E+07
    18 'norm      '    .52888E-02   1.0000          .0000       .10000E+07
    19 'Prefactor '    .67304       1.0000          .0000       .10000E+07
    20 'Prefactor '    .73515E-02   1.0000          .0000       .10000E+07
    21 'Normalizat'    1.3270       1.0000         .10000E-01   10.000    
    22 'Prefactor '    .58752       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5530E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   8004.706     FROM MIGRAD    STATUS=CONVERGED    153 CALLS     1421 TOTAL
                     EDM=   .66E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  4.6%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .22204E-08    5.6544       -.17133E-05** at limit **
   2  Prefactor     44.847        2.2767        .25481E-06    .24483E-02
   3  Prefactor     .11102E-09    3.0975        .35946E-06** at limit **
   4  norm          1.8559        2.9567       -.16635E-06   -.18402E-02
   5  Prefactor     6.2978        8.6548        .91523E-07    .24138E-02
   6  norm          .16653E-09    4.7315        .22865E-06** at limit **
   7  norm          21.575        6.7236       -.20374E-06   -.28287E-02
   8  Prefactor     .46579E-06    2.8698       -.15065E-05** at limit **
   9  Prefactor     .40523E-07    9.4930       -.16600E-05** at limit **
  10  norm          3.6245        6.0355       -.14466E-05   -.43147E-03
  11  Prefactor      .0000        .67258        .25872E-07** at limit **
  12  Prefactor      .0000        1.1989       -.44706E-06** at limit **
  13  norm          5.0054        2.8935       -.35861E-06   -.34967E-02
  14  norm          1.2763        2.9672        .18122E-06   -.22845E-02
  15  Prefactor     .34417E-08    11.914        .31734E-06** at limit **
  16  Prefactor     .72387E-07    8.7088       -.39401E-07** at limit **
  17  Prefactor     43.920        1.4895        .20714E-06    .10314E-01
  18  norm          .29976E-08    23.653        .86296E-05** at limit **
  19  Prefactor     .70295        2.5503        .58598E-06   -.29390E-02
  20  Prefactor     .12212E-08    43.401       -.15736E-04** at limit **
  21  Normalizat    1.3270        .17745        .28807E-04    .51595E-03
  22  Prefactor     .58726        .15366       -.26681E-04    .22693E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 2.22045e-09
  Prefactor  = 44.8473
  Prefactor  = 1.11022e-10
  norm       = 1.85594
  Prefactor  = 6.29776
  norm       = 1.66533e-10
  norm       = 21.5745
  Prefactor  = 4.65794e-07
  Prefactor  = 4.05231e-08
  norm       = 3.62447
  Prefactor  = 0
  Prefactor  = 0
  norm       = 5.0054
  norm       = 1.27631
  Prefactor  = 3.44169e-09
  Prefactor  = 7.23865e-08
  Prefactor  = 43.9197
  norm       = 2.9976e-09
  Prefactor  = 0.702949
  Prefactor  = 1.22125e-09
  Normalizat = 1.32702
  Prefactor  = 0.587262
 **********
 **   18 **HESSE 
 **********

 FCN=   8004.706     FROM HESSE     STATUS=OK           402 CALLS     1823 TOTAL
                     EDM=   .15E-05    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .22204E-08    5.6617        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     44.847        22.557        .14950E-03   -1.5574    
   3  Prefactor     .11102E-09    3.0847        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  norm          1.8559        3.5532        .76575E-03   -1.5681    
   5  Prefactor     6.2978        8.6951        .40048E-03   -1.5658    
   6  norm          .16653E-09    4.6216        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  norm          21.575        6.9001        .21565E-03   -1.5615    
   8  Prefactor     .46579E-06    7.7462        .81248E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     .40523E-07    17.915        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  norm          3.6245        6.0618        .53565E-03   -1.5670    
  11  Prefactor      .0000        .66774        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor      .0000        1.1910        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          5.0054        2.9033        .44979E-03   -1.5663    
  14  norm          1.2763        3.0342        .98359E-03   -1.5685    
  15  Prefactor     .34417E-08    12.134        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     .72387E-07    18.206        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor     43.920        20.397        .15082E-03   -1.5575    
  18  norm          .29976E-08    23.936        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     .70295        2.5751        .62925E-03   -1.5691    
  20  Prefactor     .12212E-08    4.1386        .54110E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Normalizat    1.3270        .15541        .50103E-01   -.82763    
  22  Prefactor     .58726        .13255        .62896E-01   -1.0813    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.47999e-06
Minuit parameter uncertainties:
  1  0.000225492
  2  22.5575
  3  3.50454e-05
  4  3.55319
  5  8.69509
  6  5.29249e-05
  7  6.90013
  8  0.00379904
  9  0.00170361
  10  6.06182
  11  6.94829e-07
  12  7.85888e-06
  13  2.90335
  14  3.03418
  15  0.000407984
  16  0.00229573
  17  20.397
  18  0.000536683
  19  2.57515
  20  0.00014308
  21  0.155461
  22  0.132618
number of points = 7429
number of fields = 31
RA_SUN column already exists. File will not be modified.
, job_status='RUN', time_executed='2026-06-27 18:22:47.596485', time_epoch_executed='1782609767.6' WHERE source_name='4FGL J0017.5-0514' and cadence='daily' and bin_id='2173'
1290 (HY000): The MySQL server is running with the --read-only option so it cannot execute this statement
Traceback (most recent call last):
  File "/sdf/data/fermi/g/LCRepository/Likelihood/Scripts/DatabaseTools.py", line 124, in executeCommand
    cursor.execute(command)
  File "/sdf/group/fermi/u/kocevski/software/conda/envs/fermitools_v1.0.5/lib/python2.7/site-packages/mysql/connector/cursor.py", line 554, in execute
    self._handle_result(self._connection.cmd_query(stmt))
  File "/sdf/group/fermi/u/kocevski/software/conda/envs/fermitools_v1.0.5/lib/python2.7/site-packages/mysql/connector/connection.py", line 495, in cmd_query
    result = self._handle_result(self._send_cmd(ServerCmd.QUERY, query))
  File "/sdf/group/fermi/u/kocevski/software/conda/envs/fermitools_v1.0.5/lib/python2.7/site-packages/mysql/connector/connection.py", line 397, in _handle_result
    raise errors.get_exception(packet)
DatabaseError: 1290 (HY000): The MySQL server is running with the --read-only option so it cannot execute this statement

Command execution failed.

Waiting 19.2463163086 seconds and trying again...

Done.

Creating custom output directory:
/lscratch/kocevski/30013695

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/lscratch/kocevski/30013695/ft1_4FGL_J0017.5-0514_daily_bin2173.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/lscratch/kocevski/30013695/ft2_4FGL_J0017.5-0514_daily_bin2173.fits


Selecting the photons:
time -p gtselect infile=/lscratch/kocevski/30013695/ft1_4FGL_J0017.5-0514_daily_bin2173.fits outfile=/lscratch/kocevski/30013695/ft1_filteredMKT_4FGL_J0017.5-0514_daily_bin2173.fits ra=4.3949 dec=-5.2347 rad=12.0 tmin=802569601.0 tmax=802828801.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 3.91
user 2.90
sys 0.21

Adding sun position to ft2 file:
/sdf/group/fermi/g/LCRepository/Repository/bin/sunpos /lscratch/kocevski/30013695/ft2_4FGL_J0017.5-0514_daily_bin2173.fits

Selecting the good time intervals:
time -p gtmktime scfile=/lscratch/kocevski/30013695/ft2_4FGL_J0017.5-0514_daily_bin2173.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/30013695/ft1_filteredMKT_4FGL_J0017.5-0514_daily_bin2173.fits evtable="EVENTS" outfile="/lscratch/kocevski/30013695/ft1_filtered_4FGL_J0017.5-0514_daily_bin2173.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))
Done.

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

Extracting fit parameters...

4FGL J0017.5-0514
   Spectrum: LogParabola
72          norm:  1.665e-10  5.292e-05  0.000e+00  1.000e+06 ( 1.000e-12)
73         alpha:  2.594e+00  0.000e+00  0.000e+00  5.000e+00 ( 1.000e+00) fixed
74          beta:  1.051e-01  0.000e+00 -5.000e+00  1.000e+01 ( 1.000e+00) fixed
75            Eb:  8.308e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
550    Prefactor:  5.873e-01  1.326e-01  0.000e+00  1.000e+01 ( 1.000e+00)
551        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
552        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
549   Normalization:  1.327e+00  1.555e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): -0.00
Ra Dec: 4.395 -5.235
Photon Flux Upper Limit: 6.37746336035e-08 ph cm-2 s-1
Energy Flux Upper Limit: 1.77368819184e-05 MeV cm-2 s-1

Saving results to:
/lscratch/kocevski/30013246/likelihoodResults_802569601_802828801_4FGL_J0017.5-0514_daily_bin2173.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) = 8004.70097647
delta logL = 0.00457708803697

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 8004.68949171
delta logL = 0.0160618465061

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    .49702E-01   1.0000          .0000       .10000E+07
     2 'alpha     '    4.1168       1.0000          .0000       5.0000    
     3 'Normalizat'    1.3192       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .59082       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5530E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.
 MACHINE ACCURACY LIMITS FURTHER IMPROVEMENT.

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.
 MIGRAD TERMINATED WITHOUT CONVERGENCE.

 FCN=   8004.689     FROM MIGRAD    STATUS=FAILED       103 CALLS      314 TOTAL
                     EDM=   .30E-04    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          .46834E-01    54.371        .63722E-04** at limit **
   2  alpha         4.1470        2.6328        .12566        .29346E-03
   3  Normalizat    1.3189        .67027E-01    .22208E-03   -.14897E-04
   4  Prefactor     .59101        .58948E-01    .27746E-03   -.20323E-04
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   8004.689     FROM SIMPLEX   STATUS=UNCHANGED     94 CALLS      408 TOTAL
                     EDM=   .79E-05    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          .46834E-01    54.371        .77262E-05** at limit **
   2  alpha         4.1470        2.6328        .49578E-02    .29346E-03
   3  Normalizat    1.3189        .67027E-01    .67764E-04   -.14897E-04
   4  Prefactor     .59101        .58948E-01    .61074E-04   -.20323E-04
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   8004.689     FROM MIGRAD    STATUS=CONVERGED     31 CALLS      439 TOTAL
                     EDM=   .12E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          .46827E-01    73.175        .25489E-05** at limit **
   2  alpha         4.1471        3.9682        .25133E-01    .12001E-05
   3  Normalizat    1.3189        .16104        .88830E-05   -.35067E-04
   4  Prefactor     .59101        .14061        .11098E-04   -.36263E-04
                               ERR DEF=  .500    
Final values: 
  norm       = 0.046827
  alpha      = 4.14712
  Normalizat = 1.31894
  Prefactor  = 0.591009
 **********
 **   18 **HESSE 
 **********

 FCN=   8004.689     FROM HESSE     STATUS=OK            27 CALLS      466 TOTAL
                     EDM=   .17E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          .46827E-01    2.0670        .10195E-06   -1.5704    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  alpha         4.1471        3.4988        .10053E-02    .71929    
   3  Normalizat    1.3189        .17996        .17766E-05   -.83003    
   4  Prefactor     .59101        .15355        .22197E-05   -1.0797    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.65532e-11
Minuit parameter uncertainties:
  1  0.622222
  2  6.99663
  3  0.180043
  4  0.153659
