Done. MINUIT Return Code (Fixed Index): 0 logL (Fixed Index) = 16245.0313182 Extracting fit parameters... 4FGL J1040.5+0617 Spectrum: PowerLaw 216 Prefactor: 1.042e+00 2.410e+00 0.000e+00 1.000e+06 ( 1.000e-12) 217 Index: 2.368e+00 0.000e+00 0.000e+00 1.000e+01 (-1.000e+00) fixed 218 Scale: 8.643e+02 0.000e+00 3.000e+01 5.000e+05 ( 1.000e+00) fixed GAL_V02 Spectrum: PowerLaw 533 Prefactor: 1.013e+00 9.591e-02 0.000e+00 1.000e+01 ( 1.000e+00) 534 Index: 0.000e+00 0.000e+00 -1.000e+00 1.000e+00 ( 1.000e+00) fixed 535 Scale: 1.000e+02 0.000e+00 5.000e+01 2.000e+02 ( 1.000e+00) fixed EG_v02 Spectrum: FileFunction 532 Normalization: 1.050e+00 1.184e-01 1.000e-02 1.000e+01 ( 1.000e+00) TS (Fixed Index): 0.22 Ra Dec: 160.150 6.285 Photon Flux Upper Limit: 6.7745318464e-08 ph cm-2 s-1 Energy Flux Upper Limit: 0.00522356105598 MeV cm-2 s-1 Saving results to: /lscratch/kocevski/31088119/likelihoodResults_804470401_805075201_4FGL_J1040.5+0617_weekly_bin935.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) = 16242.9858854 delta logL = 2.04543280919 Fit tolerance = 0.0001 Performing likelihood fit... Done. MINUIT Return Code (Free Index): 102 logL (Free Index) = 16242.8309383 delta logL = 2.20037994123 Fit tolerance = 1e-08 Performing likelihood fit... ********** ** 14 **SET NOWARN ********** PARAMETER DEFINITIONS: NO. NAME VALUE STEP SIZE LIMITS 1 'Prefactor ' .24715E-01 1.0000 .0000 .10000E+07 2 'Index ' 5.4219 1.0000 .0000 10.000 3 'Normalizat' .97080 1.0000 .10000E-01 10.000 4 'Prefactor ' 1.0612 1.0000 .0000 10.000 ********** ** 15 **SET ERR .5000 ********** ********** ** 16 **SET GRAD 1.000 ********** ********** ** 17 **MINIMIZE .5360E+05 .2000E-04 ********** MIGRAD MINIMIZATION HAS CONVERGED. MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX. FCN= 16242.83 FROM MIGRAD STATUS=CONVERGED 52 CALLS 252 TOTAL EDM= .51E-09 STRATEGY= 1 ERR MATRIX NOT POS-DEF EXT PARAMETER APPROXIMATE STEP FIRST NO. NAME VALUE ERROR SIZE DERIVATIVE 1 Prefactor .24374E-01 .12131 .16744E-03** at limit ** 2 Index 5.4290 1.6989 .14382 .37207E-03 3 Normalizat .97099 .26686E-01 .45800E-01 .41692E-04 4 Prefactor 1.0612 .23180E-01 .39295E-01 .17713E-04 ERR DEF= .500 Final values: Prefactor = 0.024374 Index = 5.42903 Normalizat = 0.970987 Prefactor = 1.06117 ********** ** 18 **HESSE ********** FCN= 16242.83 FROM HESSE STATUS=NOT POSDEF 33 CALLS 285 TOTAL EDM= .14E-08 STRATEGY= 1 ERR MATRIX NOT POS-DEF EXT PARAMETER APPROXIMATE INTERNAL INTERNAL NO. NAME VALUE ERROR STEP SIZE VALUE 1 Prefactor .24374E-01 .32927 .10048E-05 -1.5705 WARNING - - ABOVE PARAMETER IS AT LIMIT. 2 Index 5.4290 3.3760 .50195E-02 .85912E-01 3 Normalizat .97099 .11282 .26553E-03 -.94009 4 Prefactor 1.0612 .95916E-01 .22090E-03 -.90717 ERR DEF= .500 Minuit fit quality: 2 estimated distance: 1.3598e-09 Minuit parameter uncertainties: 1 0.179171 2 3.70948 3 0.112845 4 0.0959317 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) = 16242.8309283 delta logL = 2.20038986408 Extracting fit parameters... 4FGL J1040.5+0617 Spectrum: PowerLaw 216 Prefactor: 2.437e-02 1.792e-01 0.000e+00 1.000e+06 ( 1.000e-12) 217 Index: 5.429e+00 3.709e+00 0.000e+00 1.000e+01 (-1.000e+00) 218 Scale: 8.643e+02 0.000e+00 3.000e+01 5.000e+05 ( 1.000e+00) fixed GAL_V02 Spectrum: PowerLaw 533 Prefactor: 1.061e+00 9.593e-02 0.000e+00 1.000e+01 ( 1.000e+00) 534 Index: 0.000e+00 0.000e+00 -1.000e+00 1.000e+00 ( 1.000e+00) fixed 535 Scale: 1.000e+02 0.000e+00 5.000e+01 2.000e+02 ( 1.000e+00) fixed EG_v02 Spectrum: FileFunction 532 Normalization: 9.710e-01 1.128e-01 1.000e-02 1.000e+01 ( 1.000e+00) TS (Free Index): 5.00 Ra Dec: 160.150 6.285 Photon Index (Free Index): 5.43 +/- 3.71 Photon Flux (Free Index): 6.75e-08 +/- 3.62e-08 Energy Flux (Free Index): 8.69e-06 +/- 5.70e-06 Creating a high resolution counts map... INFO: Auto-setting vmin to -1.000e-01 [aplpy.core] INFO: Auto-setting vmax to 1.110e+00 [aplpy.core] Saving /lscratch/kocevski/31088119/cmap_HighResolution_804470401_805075201_4FGL_J1040.5+0617_weekly_bin935.png Cleaning up... ** Nuclear option initiated! ** Updating database... UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='5.22e-03', comment='SUCCESS', energy_flux2='8.69e-06', dlogl='2.20e+00', photon_flux2='6.75e-08', job_status='DONE', time_completed='2026-07-08 23:56:31.686738', photon_index_error2='3.71', photon_index2='5.43', ts='0.22', fit_tolerance='1e-08', GAL='1.01', photon_index_error='0.00', photon_flux_upper_limit='6.77e-08', energy_flux_error2='5.70e-06', EG='1.05', time_epoch_completed='1783580191.69', return_code='0', job_id='31088119', GAL2='1.06', EG2='0.97', return_code2='102', photon_flux_error2='3.62e-08', ts2='5.00', photon_index='2.37' WHERE bin_id='935' AND source_name='4FGL J1040.5+0617' AND cadence='weekly'; Database successfully updated. Analysis Complete. Wed Jul 8 23:56:31 PDT 2026 /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 = 17462 number of fields = 31 RA_SUN column already exists. File will not be modified. Done. Performing analysis on: 4FGL_J1040.5+0617_weekly_bin935 RA = 160.15, Dec = 6.2848 tmin = 804470401, tmax = 805075201 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='31088759', job_status='RUN', time_executed='2026-07-08 23:55:39.898683', time_epoch_executed='1783580139.9' WHERE source_name='4FGL J1040.5+0617' and cadence='weekly' and bin_id='935' Database successfully updated. Done. Creating custom output directory: /lscratch/kocevski/31088759 Creating custom pfile directory: /lscratch/kocevski/31088759/pfiles/ Retrieving the FT1 file... Issuing command: datacat find --group FT1 --filter 'nMetStop>=804470401.0 && nMetStart<805075201.0' /Data/Flight/Reprocess/P305 Issuing command: datacat find --group FT1 --filter 'nMetStart>564945418 && nMetStop>=804470401.0 && nMetStart<805075201.0' /Data/Flight/Level1/LPA Retrieving 108 files... Done. Merging files... Checksum keywords updated successfully. Merged file saved to: /lscratch/kocevski/31088759/ft1_4FGL_J1040.5+0617_weekly_bin935.fits Retrieving the FT1 file... Issuing command: datacat find --group FT2 --filter 'nMetStop>=804470401.0 && nMetStart<805075201.0' /Data/Flight/Level1/LPA Retrieving 108 files... Done. Merging files... Merged file saved to: /lscratch/kocevski/31088759/ft2_4FGL_J1040.5+0617_weekly_bin935.fits Selecting the photons: time -p gtselect infile=/lscratch/kocevski/31088759/ft1_4FGL_J1040.5+0617_weekly_bin935.fits outfile=/lscratch/kocevski/31088759/ft1_filteredMKT_4FGL_J1040.5+0617_weekly_bin935.fits ra=160.15 dec=6.2848 rad=12.0 tmin=804470401.0 tmax=805075201.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 6.12 user 5.48 sys 0.23 Adding sun position to ft2 file: /sdf/group/fermi/g/LCRepository/Repository/bin/sunpos /lscratch/kocevski/31088759/ft2_4FGL_J1040.5+0617_weekly_bin935.fits Selecting the good time intervals: time -p gtmktime scfile=/lscratch/kocevski/31088759/ft2_4FGL_J1040.5+0617_weekly_bin935.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/31088759/ft1_filteredMKT_4FGL_J1040.5+0617_weekly_bin935.fits evtable="EVENTS" outfile="/lscratch/kocevski/31088759/ft1_filtered_4FGL_J1040.5+0617_weekly_bin935.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.78 user 0.23 sys 0.13 Number of photons that the gtmktime cut: 1466 Generating the livetime cube: time -p gtltcube evfile="/lscratch/kocevski/31088759/ft1_filtered_4FGL_J1040.5+0617_weekly_bin935.fits" evtable="EVENTS" scfile=/lscratch/kocevski/31088759/ft2_4FGL_J1040.5+0617_weekly_bin935.fits sctable="SC_DATA" outfDone. MINUIT Return Code (Fixed Index): 0 logL (Fixed Index) = 16245.0313182 Extracting fit parameters... 4FGL J1040.5+0617 Spectrum: PowerLaw 216 Prefactor: 1.042e+00 2.410e+00 0.000e+00 1.000e+06 ( 1.000e-12) 217 Index: 2.368e+00 0.000e+00 0.000e+00 1.000e+01 (-1.000e+00) fixed 218 Scale: 8.643e+02 0.000e+00 3.000e+01 5.000e+05 ( 1.000e+00) fixed GAL_V02 Spectrum: PowerLaw 533 Prefactor: 1.013e+00 9.591e-02 0.000e+00 1.000e+01 ( 1.000e+00) 534 Index: 0.000e+00 0.000e+00 -1.000e+00 1.000e+00 ( 1.000e+00) fixed 535 Scale: 1.000e+02 0.000e+00 5.000e+01 2.000e+02 ( 1.000e+00) fixed EG_v02 Spectrum: FileFunction 532 Normalization: 1.050e+00 1.184e-01 1.000e-02 1.000e+01 ( 1.000e+00) TS (Fixed Index): 0.22 Ra Dec: 160.150 6.285 Photon Flux Upper Limit: 6.7745318464e-08 ph cm-2 s-1 Energy Flux Upper Limit: 0.00522356105598 MeV cm-2 s-1 Saving results to: /lscratch/kocevski/31088163/likelihoodResults_804470401_805075201_4FGL_J1040.5+0617_weekly_bin935.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) = 16242.9858854 delta logL = 2.04543280919 Fit tolerance = 0.0001 Performing likelihood fit... Done. MINUIT Return Code (Free Index): 102 logL (Free Index) = 16242.8309383 delta logL = 2.20037994123 Fit tolerance = 1e-08 Performing likelihood fit... ********** ** 14 **SET NOWARN ********** PARAMETER DEFINITIONS: NO. NAME VALUE STEP SIZE LIMITS 1 'Prefactor ' .24715E-01 1.0000 .0000 .10000E+07 2 'Index ' 5.4219 1.0000 .0000 10.000 3 'Normalizat' .97080 1.0000 .10000E-01 10.000 4 'Prefactor ' 1.0612 1.0000 .0000 10.000 ********** ** 15 **SET ERR .5000 ********** ********** ** 16 **SET GRAD 1.000 ********** ********** ** 17 **MINIMIZE .5360E+05 .2000E-04 ********** MIGRAD MINIMIZATION HAS CONVERGED. MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX. FCN= 16242.83 FROM MIGRAD STATUS=CONVERGED 52 CALLS 252 TOTAL EDM= .51E-09 STRATEGY= 1 ERR MATRIX NOT POS-DEF EXT PARAMETER APPROXIMATE STEP FIRST NO. NAME VALUE ERROR SIZE DERIVATIVE 1 Prefactor .24374E-01 .12131 .16744E-03** at limit ** 2 Index 5.4290 1.6989 .14382 .37207E-03 3 Normalizat .97099 .26686E-01 .45800E-01 .41692E-04 4 Prefactor 1.0612 .23180E-01 .39295E-01 .17713E-04 ERR DEF= .500 Final values: Prefactor = 0.024374 Index = 5.42903 Normalizat = 0.970987 Prefactor = 1.06117 ********** ** 18 **HESSE ********** FCN= 16242.83 FROM HESSE STATUS=NOT POSDEF 33 CALLS 285 TOTAL EDM= .14E-08 STRATEGY= 1 ERR MATRIX NOT POS-DEF EXT PARAMETER APPROXIMATE INTERNAL INTERNAL NO. NAME VALUE ERROR STEP SIZE VALUE 1 Prefactor .24374E-01 .32927 .10048E-05 -1.5705 WARNING - - ABOVE PARAMETER IS AT LIMIT. 2 Index 5.4290 3.3760 .50195E-02 .85912E-01 3 Normalizat .97099 .11282 .26553E-03 -.94009 4 Prefactor 1.0612 .95916E-01 .22090E-03 -.90717 ERR DEF= .500 Minuit fit quality: 2 estimated distance: 1.3598e-09 Minuit parameter uncertainties: 1 0.179171 2 3.70948 3 0.112845 4 0.0959317 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) = 16242.8309283 delta logL = 2.20038986408 Extracting fit parameters... 4FGL J1040.5+0617 Spectrum: PowerLaw 216 Prefactor: 2.437e-02 1.792e-01 0.000e+00 1.000e+06 ( 1.000e-12) 217 Index: 5.429e+00 3.709e+00 0.000e+00 1.000e+01 (-1.000e+00) 218 Scale: 8.643e+02 0.000e+00 3.000e+01 5.000e+05 ( 1.000e+00) fixed GAL_V02 Spectrum: PowerLaw 533 Prefactor: 1.061e+00 9.593e-02 0.000e+00 1.000e+01 ( 1.000e+00) 534 Index: 0.000e+00 0.000e+00 -1.000e+00 1.000e+00 ( 1.000e+00) fixed 535 Scale: 1.000e+02 0.000e+00 5.000e+01 2.000e+02 ( 1.000e+00) fixed EG_v02 Spectrum: FileFunction 532 Normalization: 9.710e-01 1.128e-01 1.000e-02 1.000e+01 ( 1.000e+00) TS (Free Index): 5.00 Ra Dec: 160.150 6.285 Photon Index (Free Index): 5.43 +/- 3.71 Photon Flux (Free Index): 6.75e-08 +/- 3.62e-08 Energy Flux (Free Index): 8.69e-06 +/- 5.70e-06 Creating a high resolution counts map... INFO: Auto-setting vmin to -1.000e-01 [aplpy.core] INFO: Auto-setting vmax to 1.110e+00 [aplpy.core] Saving /lscratch/kocevski/31088163/cmap_HighResolution_804470401_805075201_4FGL_J1040.5+0617_weekly_bin935.png Cleaning up... ** Nuclear option initiated! ** Updating database... UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='5.22e-03', comment='SUCCESS', energy_flux2='8.69e-06', dlogl='2.20e+00', photon_flux2='6.75e-08', job_status='DONE', time_completed='2026-07-08 23:57:10.059867', photon_index_error2='3.71', photon_index2='5.43', ts='0.22', fit_tolerance='1e-08', GAL='1.01', photon_index_error='0.00', photon_flux_upper_limit='6.77e-08', energy_flux_error2='5.70e-06', EG='1.05', time_epoch_completed='1783580230.06', return_code='0', job_id='31088163', GAL2='1.06', EG2='0.97', return_code2='102', photon_flux_error2='3.62e-08', ts2='5.00', photon_index='2.37' WHERE bin_id='935' AND source_name='4FGL J1040.5+0617' AND cadence='weekly'; Database successfully updated. Analysis Complete. Wed Jul 8 23:57:10 PDT 2026 Working on... /lscratch/kocevski/31088355/ft1_filtered_4FGL_J1040.5+0617_weekly_bin935.fits.....................! real 57.90 user 55.99 sys 0.90 Creating the likelihood object... obs = UnbinnedObs('/lscratch/kocevski/31088355/ft1_filtered_4FGL_J1040.5+0617_weekly_bin935.fits', '/lscratch/kocevski/31088355/ft2_4FGL_J1040.5+0617_weekly_bin935.fits', expMap='/lscratch/kocevski/31088355/expmap_804470401_805075201_4FGL_J1040.5+0617_weekly_bin935.fits', expCube='/lscratch/kocevski/31088355/ltcube_804470401_805075201_4FGL_J1040.5+0617_weekly_bin935.fits', irfs='P8R3_SOURCE_V2') like = UnbinnedAnalysis(obs, '/lscratch/kocevski/31088355/Model_4FGL_J1040.5+0617_weekly_bin935.xml', optimizer='MINUIT') Using source of interest name: '4FGL J1040.5+0617' 4FGL J1040.5+0617 Spectrum: PowerLaw 216 Prefactor: 2.877e+00 0.000e+00 0.000e+00 1.000e+06 ( 1.000e-12) 217 Index: 2.368e+00 0.000e+00 0.000e+00 1.000e+01 (-1.000e+00) fixed 218 Scale: 8.643e+02 0.000e+00 3.000e+01 5.000e+05 ( 1.000e+00) fixed Likelihood Fit Parameters: Event file(s): /lscratch/kocevski/31088355/ft1_filtered_4FGL_J1040.5+0617_weekly_bin935.fits Spacecraft file(s): /lscratch/kocevski/31088355/ft2_4FGL_J1040.5+0617_weekly_bin935.fits Exposure map: /lscratch/kocevski/31088355/expmap_804470401_805075201_4FGL_J1040.5+0617_weekly_bin935.fits Exposure cube: /lscratch/kocevski/31088355/ltcube_804470401_805075201_4FGL_J1040.5+0617_weekly_bin935.fits IRFs: P8R3_SOURCE_V2 Source model file: /lscratch/kocevski/31088355/Model_4FGL_J1040.5+0617_weekly_bin935.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) = 16245.109415 Fit tolerance = 0.0001 Performing likelihood fit... Done. MINUIT Return Code (Fixed Index): 0 logL (Fixed Index) = 16245.0322612 Fit tolerance = 1e-08 Performing likelihood fit... ********** ** 14 **SET NOWARN ********** PARAMETER DEFINITIONS: NO. NAME VALUE STEP SIZE LIMITS 1 'Prefactor ' .86239E-04 1.0000 .0000 .10000E+07 2 'Prefactor ' .37547E-04 1.0000 .0000 .10000E+07 3 'Prefactor ' .47164E-05 1.0000 .0000 .10000E+07 4 'Prefactor ' 27.739 1.0000 .0000 .10000E+07 5 'Prefactor ' 12.436 1.0000 .0000 .10000E+07 6 'Prefactor ' .66296E-02 1.0000 .0000 .10000E+07 7 'norm ' 1.5924 1.0000 .0000 .10000E+07 8 'Prefactor ' 2.5321 1.0000 .0000 .10000E+07 9 'Prefactor ' 1.0439 1.0000 .0000 .10000E+07 10 'Prefactor ' 6.1437 1.0000 .0000 .10000E+07 11 'Prefactor ' 5.0582 1.0000 .0000 .10000E+07 12 'norm ' .11491E-07 1.0000 .0000 .10000E+07 13 'norm ' 2.2000 1.0000 .0000 .10000E+07 14 'Prefactor ' .84838E-06 1.0000 .0000 .10000E+07 15 'norm ' .51352E-04 1.0000 .0000 .10000E+07 16 'Normalizat' 1.0511 1.0000 .10000E-01 10.000 17 'Prefactor ' 1.0122 1.0000 .0000 10.000 ********** ** 15 **SET ERR .5000 ********** ********** ** 16 **SET GRAD 1.000 ********** ********** ** 17 **MINIMIZE .5360E+05 .2000E-04 ********** MIGRAD MINIMIZATION HAS CONVERGED. FCN= 16245.03 FROM MIGRAD STATUS=CONVERGED 117 CALLS 1006 TOTAL EDM= .13E-08 STRATEGY=1 ERROR MATRIX UNCERTAINTY= .9% EXT PARAMETER STEP FIRST NO. NAME VALUE ERROR SIZE DERIVATIVE 1 Prefactor .0000 1.5798 .55375E-07** at limit ** 2 Prefactor .14223E-05 14.777 -.28796E-06** at limit ** 3 Prefactor .16653E-09 3.1416 -.96579E-10** at limit ** 4 Prefactor 28.759 21.953 .22533E-06 -.15920 5 Prefactor 12.475 21.244 .13214E-06 -.68784E-01 6 Prefactor .11629E-04 16.379 -.78460E-06** at limit ** 7 norm 1.5942 .77809 .10055E-06 -.38951E-02 8 Prefactor 2.4857 3.6890 -.22046E-07 -.86565E-03 9 Prefactor 1.0420 2.3609 -.24759E-07 -.47877E-03 10 Prefactor 6.1417 4.4795 .24638E-06 -.22129E-02 11 Prefactor 5.0495 3.8512 .17406E-08 -.73460E-03 12 norm .0000 .68648E-01 .56327E-08** at limit ** 13 norm 2.2011 .98494 .32094E-07 .97864E-03 14 Prefactor .14155E-07 5.7374 -.12239E-06** at limit ** 15 norm .0000 1.5251 .25753E-07** at limit ** 16 Normalizat 1.0505 .13918 .31861E-05 -.60780E-04 17 Prefactor 1.0125 .11431 -.20567E-05 -.77917E-04 ERR DEF= .500 Final values: Prefactor = 0 Prefactor = 1.42231e-06 Prefactor = 1.66533e-10 Prefactor = 28.7589 Prefactor = 12.4747 Prefactor = 1.16291e-05 norm = 1.59425 Prefactor = 2.48568 Prefactor = 1.04196 Prefactor = 6.14168 Prefactor = 5.04953 norm = 0 norm = 2.20108 Prefactor = 1.41553e-08 norm = 0 Normalizat = 1.05049 Prefactor = 1.01254 ********** ** 18 **HESSE ********** FCN= 16245.03 FROM HESSE STATUS=OK 257 CALLS 1263 TOTAL EDM= .24E-05 STRATEGY= 1 ERROR MATRIX ACCURATE EXT PARAMETER INTERNAL INTERNAL NO. NAME VALUE ERROR STEP SIZE VALUE 1 Prefactor .0000 1.5845 .42118E-03 -1.5708 WARNING - - ABOVE PARAMETER IS AT LIMIT. 2 Prefactor .14223E-05 15.657 .42118E-03 -1.5708 WARNING - - ABOVE PARAMETER IS AT LIMIT. 3 Prefactor .16653E-09 3.1065 .42118E-03 -1.5708 WARNING - - ABOVE PARAMETER IS AT LIMIT. 4 Prefactor 28.759 29.821 .18990E-03 -1.5601 5 Prefactor 12.475 21.773 .28380E-03 -1.5637 6 Prefactor .11629E-04 23.921 .42118E-03 -1.5708 WARNING - - ABOVE PARAMETER IS AT LIMIT. 7 norm 1.5942 .78518 .84042E-03 -1.5683 8 Prefactor 2.4857 3.7101 .64161E-03 -1.5676 9 Prefactor 1.0420 2.4100 .12201E-02 -1.5688 10 Prefactor 6.1417 4.4794 .40480E-03 -1.5658 11 Prefactor 5.0495 3.9226 .44685E-03 -1.5663 12 norm .0000 .66839E-01 .42118E-03 -1.5708 WARNING - - ABOVE PARAMETER IS AT LIMIT. 13 norm 2.2011 .98531 .69341E-03 -1.5678 14 Prefactor .14155E-07 5.7422 .42118E-03 -1.5708 WARNING - - ABOVE PARAMETER IS AT LIMIT. 15 norm .0000 1.5227 .42118E-03 -1.5708 WARNING - - ABOVE PARAMETER IS AT LIMIT. 16 Normalizat 1.0505 .11840 .58065E-01 -.91358 17 Prefactor 1.0125 .95898E-01 .43022E-01 -.92313 ERR DEF= .500 Minuit fit quality: 3 estimated distance: 2.40641e-06 Minuit parameter uncertainties: 1 1.26078e-05 2 0.00943807 3 4.45719e-05 4 29.8207 5 21.7731 6 0.0333572 7 0.785176 8 3.71007 9 2.41003 10 4.47944 11 3.92257 12 2.28198e-07 13 0.985306 14 0.000570086 15 1.13644e-05 16 0.118435 17 0.095914 number of points = 17462 number of fields = 31 RA_SUN column already exists. File will not be modified. Done. Performing analysis on: 4FGL_J1040.5+0617_weekly_bin935 RA = 160.15, Dec = 6.2848 tmin = 804470401, tmax = 805075201 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='31088836', job_status='RUN', time_executed='2026-07-08 23:56:41.488897', time_epoch_executed='1783580201.49' WHERE source_name='4FGL J1040.5+0617' and cadence='weekly' and bin_id='935' Database successfully updated. Done. Creating custom output directory: /lscratch/kocevski/31088836 Creating custom pfile directory: /lscratch/kocevski/31088836/pfiles/ Retrieving the FT1 file... Issuing command: datacat find --group FT1 --filter 'nMetStop>=804470401.0 && nMetStart<805075201.0' /Data/Flight/Reprocess/P305 Issuing command: datacat find --group FT1 --filter 'nMetStart>564945418 && nMetStop>=804470401.0 && nMetStart<805075201.0' /Data/Flight/Level1/LPA Retrieving 108 files... Done. Merging files... Checksum keywords updated successfully. Merged file saved to: /lscratch/kocevski/31088836/ft1_4FGL_J1040.5+0617_weekly_bin935.fits Retrieving the FT1 file... Issuing command: datacat find --group FT2 --filter 'nMetStop>=804470401.0 && nMetStart<805075201.0' /Data/Flight/Level1/LPA Retrieving 108 files... Done. Merging files... Merged file saved to: /lscratch/kocevski/31088836/ft2_4FGL_J1040.5+0617_weekly_bin935.fits Selecting the photons: time -p gtselect infile=/lscratch/kocevski/31088836/ft1_4FGL_J1040.5+0617_weekly_bin935.fits outfile=/lscratch/kocevski/31088836/ft1_filteredMKT_4FGL_J1040.5+0617_weekly_bin935.fits ra=160.15 dec=6.2848 rad=12.0 tmin=804470401.0 tmax=805075201.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 6.82 user 5.85 sys 0.29 Adding sun position to ft2 file: /sdf/group/fermi/g/LCRepository/Repository/bin/sunpos /lscratch/kocevski/31088836/ft2_4FGL_J1040.5+0617_weekly_bin935.fits Selecting the good time intervals: time -p gtmktime scfile=/lscratch/kocevski/31088836/ft2_4FGL_J1040.5+0617_weekly_bin935.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/31088836/ft1_filteredMKT_4FGL_J1040.5+0617_weekly_bin935.fits evtable="EVENTS" outfile="/lscratch/kocevski/31088836/ft1_filtered_4FGL_J1040.5+0617_weekly_bin935.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.14 user 0.25 sys 0.16 Number of photons that the gtmktime cut: 1466 Generating the livetime cube: time -p gtltcube evfile="/lscratch/kocevski/31088836/ft1_filtered_4FGL_J1040.5+0617_weekly_bin935.fits" evtable="EVENTS" scfile=/lscratch/kocevski/31088836/ft2_4FGL_J1040.5+0617_weekly_bin935.fits sctable="SC_DATA" outDone. MINUIT Return Code (Fixed Index): 0 logL (Fixed Index) = 16245.0313182 Extracting fit parameters... 4FGL J1040.5+0617 Spectrum: PowerLaw 216 Prefactor: 1.042e+00 2.410e+00 0.000e+00 1.000e+06 ( 1.000e-12) 217 Index: 2.368e+00 0.000e+00 0.000e+00 1.000e+01 (-1.000e+00) fixed 218 Scale: 8.643e+02 0.000e+00 3.000e+01 5.000e+05 ( 1.000e+00) fixed GAL_V02 Spectrum: PowerLaw 533 Prefactor: 1.013e+00 9.591e-02 0.000e+00 1.000e+01 ( 1.000e+00) 534 Index: 0.000e+00 0.000e+00 -1.000e+00 1.000e+00 ( 1.000e+00) fixed 535 Scale: 1.000e+02 0.000e+00 5.000e+01 2.000e+02 ( 1.000e+00) fixed EG_v02 Spectrum: FileFunction 532 Normalization: 1.050e+00 1.184e-01 1.000e-02 1.000e+01 ( 1.000e+00) TS (Fixed Index): 0.22 Ra Dec: 160.150 6.285 Photon Flux Upper Limit: 6.7745318464e-08 ph cm-2 s-1 Energy Flux Upper Limit: 0.00522356105598 MeV cm-2 s-1 Saving results to: /lscratch/kocevski/31088355/likelihoodResults_804470401_805075201_4FGL_J1040.5+0617_weekly_bin935.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) = 16242.9858854 delta logL = 2.04543280919 Fit tolerance = 0.0001 Performing likelihood fit... Done. MINUIT Return Code (Free Index): 102 logL (Free Index) = 16242.8309383 delta logL = 2.20037994123 Fit tolerance = 1e-08 Performing likelihood fit... ********** ** 14 **SET NOWARN ********** PARAMETER DEFINITIONS: NO. NAME VALUE STEP SIZE LIMITS 1 'Prefactor ' .24715E-01 1.0000 .0000 .10000E+07 2 'Index ' 5.4219 1.0000 .0000 10.000 3 'Normalizat' .97080 1.0000 .10000E-01 10.000 4 'Prefactor ' 1.0612 1.0000 .0000 10.000 ********** ** 15 **SET ERR .5000 ********** ********** ** 16 **SET GRAD 1.000 ********** ********** ** 17 **MINIMIZE .5360E+05 .2000E-04 ********** MIGRAD MINIMIZATION HAS CONVERGED. MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX. FCN= 16242.83 FROM MIGRAD STATUS=CONVERGED 52 CALLS 252 TOTAL EDM= .51E-09 STRATEGY= 1 ERR MATRIX NOT POS-DEF EXT PARAMETER APPROXIMATE STEP FIRST NO. NAME VALUE ERROR SIZE DERIVATIVE 1 Prefactor .24374E-01 .12131 .16744E-03** at limit ** 2 Index 5.4290 1.6989 .14382 .37207E-03 3 Normalizat .97099 .26686E-01 .45800E-01 .41692E-04 4 Prefactor 1.0612 .23180E-01 .39295E-01 .17713E-04 ERR DEF= .500 Final values: Prefactor = 0.024374 Index = 5.42903 Normalizat = 0.970987 Prefactor = 1.06117 ********** ** 18 **HESSE ********** FCN= 16242.83 FROM HESSE STATUS=NOT POSDEF 33 CALLS 285 TOTAL EDM= .14E-08 STRATEGY= 1 ERR MATRIX NOT POS-DEF EXT PARAMETER APPROXIMATE INTERNAL INTERNAL NO. NAME VALUE ERROR STEP SIZE VALUE 1 Prefactor .24374E-01 .32927 .10048E-05 -1.5705 WARNING - - ABOVE PARAMETER IS AT LIMIT. 2 Index 5.4290 3.3760 .50195E-02 .85912E-01 3 Normalizat .97099 .11282 .26553E-03 -.94009 4 Prefactor 1.0612 .95916E-01 .22090E-03 -.90717 ERR DEF= .500 Minuit fit quality: 2 estimated distance: 1.3598e-09 Minuit parameter uncertainties: 1 0.179171 2 3.70948 3 0.112845 4 0.0959317 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) = 16242.8309283 delta logL = 2.20038986408 Extracting fit parameters... 4FGL J1040.5+0617 Spectrum: PowerLaw 216 Prefactor: 2.437e-02 1.792e-01 0.000e+00 1.000e+06 ( 1.000e-12) 217 Index: 5.429e+00 3.709e+00 0.000e+00 1.000e+01 (-1.000e+00) 218 Scale: 8.643e+02 0.000e+00 3.000e+01 5.000e+05 ( 1.000e+00) fixed GAL_V02 Spectrum: PowerLaw 533 Prefactor: 1.061e+00 9.593e-02 0.000e+00 1.000e+01 ( 1.000e+00) 534 Index: 0.000e+00 0.000e+00 -1.000e+00 1.000e+00 ( 1.000e+00) fixed 535 Scale: 1.000e+02 0.000e+00 5.000e+01 2.000e+02 ( 1.000e+00) fixed EG_v02 Spectrum: FileFunction 532 Normalization: 9.710e-01 1.128e-01 1.000e-02 1.000e+01 ( 1.000e+00) TS (Free Index): 5.00 Ra Dec: 160.150 6.285 Photon Index (Free Index): 5.43 +/- 3.71 Photon Flux (Free Index): 6.75e-08 +/- 3.62e-08 Energy Flux (Free Index): 8.69e-06 +/- 5.70e-06 Creating a high resolution counts map... INFO: Auto-setting vmin to -1.000e-01 [aplpy.core] INFO: Auto-setting vmax to 1.110e+00 [aplpy.core] Saving /lscratch/kocevski/31088355/cmap_HighResolution_804470401_805075201_4FGL_J1040.5+0617_weekly_bin935.png Cleaning up... ** Nuclear option initiated! ** Updating database... UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='5.22e-03', comment='SUCCESS', energy_flux2='8.69e-06', dlogl='2.20e+00', photon_flux2='6.75e-08', job_status='DONE', time_completed='2026-07-08 23:58:58.840239', photon_index_error2='3.71', photon_index2='5.43', ts='0.22', fit_tolerance='1e-08', GAL='1.01', photon_index_error='0.00', photon_flux_upper_limit='6.77e-08', energy_flux_error2='5.70e-06', EG='1.05', time_epoch_completed='1783580338.84', return_code='0', job_id='31088355', GAL2='1.06', EG2='0.97', return_code2='102', photon_flux_error2='3.62e-08', ts2='5.00', photon_index='2.37' WHERE bin_id='935' AND source_name='4FGL J1040.5+0617' AND cadence='weekly'; Database successfully updated. Analysis Complete. Wed Jul 8 23:58:59 PDT 2026 ile=/lscratch/kocevski/31088759/ltcube_804470401_805075201_4FGL_J1040.5+0617_weekly_bin935.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/31088759/ft2_4FGL_J1040.5+0617_weekly_bin935.fits .....................! real 20.22 user 19.51 sys 0.24 Generating the exposure map: time -p gtexpmap evfile=/lscratch/kocevski/31088759/ft1_filtered_4FGL_J1040.5+0617_weekly_bin935.fits evtable="EVENTS" scfile=/lscratch/kocevski/31088759/ft2_4FGL_J1040.5+0617_weekly_bin935.fits sctable="SC_DATA" expcube=/lscratch/kocevski/31088759/ltcube_804470401_805075201_4FGL_J1040.5+0617_weekly_bin935.fits outfile=/lscratch/kocevski/31088759/expmap_804470401_805075201_4FGL_J1040.5+0617_weekly_bin935.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/31088759/ltcube_804470401_805075201_4FGL_J1040.5+0617_weekly_bin935.fits .....................! real 75.87 user 70.76 sys 4.43 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 J1040.5+0617 @ 160.15 6.2848 Creating the counts map: time -p gtbin evfile=/lscratch/kocevski/31088759/ft1_filtered_4FGL_J1040.5+0617_weekly_bin935.fits scfile=/lscratch/kocevski/31088759/ft2_4FGL_J1040.5+0617_weekly_bin935.fits outfile=/lscratch/kocevski/31088759/cmap_804470401_805075201_4FGL_J1040.5+0617_weekly_bin935.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=160.15 yref=6.2848 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.82 user 0.25 sys 0.12 Creating the high resolution counts map: time -p gtbin evfile=/lscratch/kocevski/31088759/ft1_filtered_4FGL_J1040.5+0617_weekly_bin935.fits scfile=/lscratch/kocevski/31088759/ft2_4FGL_J1040.5+0617_weekly_bin935.fits outfile=/lscratch/kocevski/31088759/cmap_HighResolution_804470401_805075201_4FGL_J1040.5+0617_weekly_bin935.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=160.15 yref=6.2848 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.25 sys 0.14 Computing the diffuse response: time -p gtdiffrsp evfile=/lscratch/kocevski/31088759/ft1_filtered_4FGL_J1040.5+0617_weekly_bin935.fits evtable="EVENTS" scfile=/lscratch/kocevski/31088759/ft2_4FGL_J1040.5+0617_weekly_bin935.fits sctable="SC_DATA" srcmdl=/lscratch/kocevski/31088759/Model_4FGL_J1040.5+0617_weekly_bin935.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/31088759/ft1_filtered_4FGL_J1040.5+0617_weekly_bin935.fits.....................! real 60.32 user 57.91 sys 1.32 Creating the likelihood object... obs = UnbinnedObs('/lscratch/kocevski/31088759/ft1_filtered_4FGL_J1040.5+0617_weekly_bin935.fits', '/lscratch/kocevski/31088759/ft2_4FGL_J1040.5+0617_weekly_bin935.fits', expMap='/lscratch/kocevski/31088759/expmap_804470401_805075201_4FGL_J1040.5+0617_weekly_bin935.fits', expCube='/lscratch/kocevski/31088759/ltcube_804470401_805075201_4FGL_J1040.5+0617_weekly_bin935.fits', irfs='P8R3_SOURCE_V2') like = UnbinnedAnalysis(obs, '/lscratch/kocevski/31088759/Model_4FGL_J1040.5+0617_weekly_bin935.xml', optimizer='MINUIT') Using source of interest name: '4FGL J1040.5+0617' 4FGL J1040.5+0617 Spectrum: PowerLaw 216 Prefactor: 2.877e+00 0.000e+00 0.000e+00 1.000e+06 ( 1.000e-12) 217 Index: 2.368e+00 0.000e+00 0.000e+00 1.000e+01 (-1.000e+00) fixed 218 Scale: 8.643e+02 0.000e+00 3.000e+01 5.000e+05 ( 1.000e+00) fixed Likelihood Fit Parameters: Event file(s): /lscratch/kocevski/31088759/ft1_filtered_4FGL_J1040.5+0617_weekly_bin935.fits Spacecraft file(s): /lscratch/kocevski/31088759/ft2_4FGL_J1040.5+0617_weekly_bin935.fits Exposure map: /lscratch/kocevski/31088759/expmap_804470401_805075201_4FGL_J1040.5+0617_weekly_bin935.fits Exposure cube: /lscratch/kocevski/31088759/ltcube_804470401_805075201_4FGL_J1040.5+0617_weekly_bin935.fits IRFs: P8R3_SOURCE_V2 Source model file: /lscratch/kocevski/31088759/Model_4FGL_J1040.5+0617_weekly_bin935.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) = 16245.109415 Fit tolerance = 0.0001 Performing likelihood fit... Done. MINUIT Return Code (Fixed Index): 0 logL (Fixed Index) = 16245.0322612 Fit tolerance = 1e-08 Performing likelihood fit... ********** ** 14 **SET NOWARN ********** PARAMETER DEFINITIONS: NO. NAME VALUE STEP SIZE LIMITS 1 'Prefactor ' .86239E-04 1.0000 .0000 .10000E+07 2 'Prefactor ' .37547E-04 1.0000 .0000 .10000E+07 3 'Prefactor ' .47164E-05 1.0000 .0000 .10000E+07 4 'Prefactor ' 27.739 1.0000 .0000 .10000E+07 5 'Prefactor ' 12.436 1.0000 .0000 .10000E+07 6 'Prefactor ' .66296E-02 1.0000 .0000 .10000E+07 7 'norm ' 1.5924 1.0000 .0000 .10000E+07 8 'Prefactor ' 2.5321 1.0000 .0000 .10000E+07 9 'Prefactor ' 1.0439 1.0000 .0000 .10000E+07 10 'Prefactor ' 6.1437 1.0000 .0000 .10000E+07 11 'Prefactor ' 5.0582 1.0000 .0000 .10000E+07 12 'norm ' .11491E-07 1.0000 .0000 .10000E+07 13 'norm ' 2.2000 1.0000 .0000 .10000E+07 14 'Prefactor ' .84838E-06 1.0000 .0000 .10000E+07 15 'norm ' .51352E-04 1.0000 .0000 .10000E+07 16 'Normalizat' 1.0511 1.0000 .10000E-01 10.000 17 'Prefactor ' 1.0122 1.0000 .0000 10.000 ********** ** 15 **SET ERR .5000 ********** ********** ** 16 **SET GRAD 1.000 ********** ********** ** 17 **MINIMIZE .5360E+05 .2000E-04 ********** MIGRAD MINIMIZATION HAS CONVERGED. FCN= 16245.03 FROM MIGRAD STATUS=CONVERGED 117 CALLS 1006 TOTAL EDM= .13E-08 STRATEGY=1 ERROR MATRIX UNCERTAINTY= .9% EXT PARAMETER STEP FIRST NO. NAME VALUE ERROR SIZE DERIVATIVE 1 Prefactor .0000 1.5798 .55375E-07** at limit ** 2 Prefactor .14223E-05 14.777 -.28796E-06** at limit ** 3 Prefactor .16653E-09 3.1416 -.96579E-10** at limit ** 4 Prefactor 28.759 21.953 .22533E-06 -.15920 5 Prefactor 12.475 21.244 .13214E-06 -.68784E-01 6 Prefactor .11629E-04 16.379 -.78460E-06** at limit ** 7 norm 1.5942 .77809 .10055E-06 -.38951E-02 8 Prefactor 2.4857 3.6890 -.22046E-07 -.86565E-03 9 Prefactor 1.0420 2.3609 -.24759E-07 -.47877E-03 10 Prefactor 6.1417 4.4795 .24638E-06 -.22129E-02 11 Prefactor 5.0495 3.8512 .17406E-08 -.73460E-03 12 norm .0000 .68648E-01 .56327E-08** at limit ** 13 norm 2.2011 .98494 .32094E-07 .97864E-03 14 Prefactor .14155E-07 5.7374 -.12239E-06** at limit ** 15 norm .0000 1.5251 .25753E-07** at limit ** 16 Normalizat 1.0505 .13918 .31861E-05 -.60780E-04 17 Prefactor 1.0125 .11431 -.20567E-05 -.77917E-04 ERR DEF= .500 Final values: Prefactor = 0 Prefactor = 1.42231e-06 Prefactor = 1.66533e-10 Prefactor = 28.7589 Prefactor = 12.4747 Prefactor = 1.16291e-05 norm = 1.59425 Prefactor = 2.48568 Prefactor = 1.04196 Prefactor = 6.14168 Prefactor = 5.04953 norm = 0 norm = 2.20108 Prefactor = 1.41553e-08 norm = 0 Normalizat = 1.05049 Prefactor = 1.01254 file=/lscratch/kocevski/31088836/ltcube_804470401_805075201_4FGL_J1040.5+0617_weekly_bin935.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/31088836/ft2_4FGL_J1040.5+0617_weekly_bin935.fits .....................! real 22.07 user 20.49 sys 0.27 Generating the exposure map: time -p gtexpmap evfile=/lscratch/kocevski/31088836/ft1_filtered_4FGL_J1040.5+0617_weekly_bin935.fits evtable="EVENTS" scfile=/lscratch/kocevski/31088836/ft2_4FGL_J1040.5+0617_weekly_bin935.fits sctable="SC_DATA" expcube=/lscratch/kocevski/31088836/ltcube_804470401_805075201_4FGL_J1040.5+0617_weekly_bin935.fits outfile=/lscratch/kocevski/31088836/expmap_804470401_805075201_4FGL_J1040.5+0617_weekly_bin935.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/31088836/ltcube_804470401_805075201_4FGL_J1040.5+0617_weekly_bin935.fits .....................! real 82.71 user 74.88 sys 4.88 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 J1040.5+0617 @ 160.15 6.2848 Creating the counts map: time -p gtbin evfile=/lscratch/kocevski/31088836/ft1_filtered_4FGL_J1040.5+0617_weekly_bin935.fits scfile=/lscratch/kocevski/31088836/ft2_4FGL_J1040.5+0617_weekly_bin935.fits outfile=/lscratch/kocevski/31088836/cmap_804470401_805075201_4FGL_J1040.5+0617_weekly_bin935.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=160.15 yref=6.2848 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 2.42 user 0.29 sys 0.13 Creating the high resolution counts map: time -p gtbin evfile=/lscratch/kocevski/31088836/ft1_filtered_4FGL_J1040.5+0617_weekly_bin935.fits scfile=/lscratch/kocevski/31088836/ft2_4FGL_J1040.5+0617_weekly_bin935.fits outfile=/lscratch/kocevski/31088836/cmap_HighResolution_804470401_805075201_4FGL_J1040.5+0617_weekly_bin935.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=160.15 yref=6.2848 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 1.11 user 0.30 sys 0.13 Computing the diffuse response: time -p gtdiffrsp evfile=/lscratch/kocevski/31088836/ft1_filtered_4FGL_J1040.5+0617_weekly_bin935.fits evtable="EVENTS" scfile=/lscratch/kocevski/31088836/ft2_4FGL_J1040.5+0617_weekly_bin935.fits sctable="SC_DATA" srcmdl=/lscratch/kocevski/31088836/Model_4FGL_J1040.5+0617_weekly_bin935.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 ********** ** 18 **HESSE ********** FCN= 16245.03 FROM HESSE STATUS=OK 257 CALLS 1263 TOTAL EDM= .24E-05 STRATEGY= 1 ERROR MATRIX ACCURATE EXT PARAMETER INTERNAL INTERNAL NO. NAME VALUE ERROR STEP SIZE VALUE 1 Prefactor .0000 1.5845 .42118E-03 -1.5708 WARNING - - ABOVE PARAMETER IS AT LIMIT. 2 Prefactor .14223E-05 15.657 .42118E-03 -1.5708 WARNING - - ABOVE PARAMETER IS AT LIMIT. 3 Prefactor .16653E-09 3.1065 .42118E-03 -1.5708 WARNING - - ABOVE PARAMETER IS AT LIMIT. 4 Prefactor 28.759 29.821 .18990E-03 -1.5601 5 Prefactor 12.475 21.773 .28380E-03 -1.5637 6 Prefactor .11629E-04 23.921 .42118E-03 -1.5708 WARNING - - ABOVE PARAMETER IS AT LIMIT. 7 norm 1.5942 .78518 .84042E-03 -1.5683 8 Prefactor 2.4857 3.7101 .64161E-03 -1.5676 9 Prefactor 1.0420 2.4100 .12201E-02 -1.5688 10 Prefactor 6.1417 4.4794 .40480E-03 -1.5658 11 Prefactor 5.0495 3.9226 .44685E-03 -1.5663 12 norm .0000 .66839E-01 .42118E-03 -1.5708 WARNING - - ABOVE PARAMETER IS AT LIMIT. 13 norm 2.2011 .98531 .69341E-03 -1.5678 14 Prefactor .14155E-07 5.7422 .42118E-03 -1.5708 WARNING - - ABOVE PARAMETER IS AT LIMIT. 15 norm .0000 1.5227 .42118E-03 -1.5708 WARNING - - ABOVE PARAMETER IS AT LIMIT. 16 Normalizat 1.0505 .11840 .58065E-01 -.91358 17 Prefactor 1.0125 .95898E-01 .43022E-01 -.92313 ERR DEF= .500 Minuit fit quality: 3 estimated distance: 2.40641e-06 Minuit parameter uncertainties: 1 1.26078e-05 2 0.00943807 3 4.45719e-05 4 29.8207 5 21.7731 6 0.0333572 7 0.785176 8 3.71007 9 2.41003 10 4.47944 11 3.92257 12 2.28198e-07 13 0.985306 14 0.000570086 15 1.13644e-05 16 0.118435 17 0.095914 Done. MINUIT Return Code (Fixed Index): 0 logL (Fixed Index) = 16245.0313182 Extracting fit parameters... 4FGL J1040.5+0617 Spectrum: PowerLaw 216 Prefactor: 1.042e+00 2.410e+00 0.000e+00 1.000e+06 ( 1.000e-12) 217 Index: 2.368e+00 0.000e+00 0.000e+00 1.000e+01 (-1.000e+00) fixed 218 Scale: 8.643e+02 0.000e+00 3.000e+01 5.000e+05 ( 1.000e+00) fixed GAL_V02 Spectrum: PowerLaw 533 Prefactor: 1.013e+00 9.591e-02 0.000e+00 1.000e+01 ( 1.000e+00) 534 Index: 0.000e+00 0.000e+00 -1.000e+00 1.000e+00 ( 1.000e+00) fixed 535 Scale: 1.000e+02 0.000e+00 5.000e+01 2.000e+02 ( 1.000e+00) fixed EG_v02 Spectrum: FileFunction 532 Normalization: 1.050e+00 1.184e-01 1.000e-02 1.000e+01 ( 1.000e+00) TS (Fixed Index): 0.22 Ra Dec: 160.150 6.285 Photon Flux Upper Limit: 6.7745318464e-08 ph cm-2 s-1 Energy Flux Upper Limit: 0.00522356105598 MeV cm-2 s-1 Saving results to: /lscratch/kocevski/31088759/likelihoodResults_804470401_805075201_4FGL_J1040.5+0617_weekly_bin935.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) = 16242.9858854 delta logL = 2.04543280919 Fit tolerance = 0.0001 Performing likelihood fit... Done. MINUIT Return Code (Free Index): 102 logL (Free Index) = 16242.8309383 delta logL = 2.20037994123 Fit tolerance = 1e-08 Performing likelihood fit... ********** ** 14 **SET NOWARN ********** PARAMETER DEFINITIONS: NO. NAME VALUE STEP SIZE LIMITS 1 'Prefactor ' .24715E-01 1.0000 .0000 .10000E+07 2 'Index ' 5.4219 1.0000 .0000 10.000 3 'Normalizat' .97080 1.0000 .10000E-01 10.000 4 'Prefactor ' 1.0612 1.0000 .0000 10.000 ********** ** 15 **SET ERR .5000 ********** ********** ** 16 **SET GRAD 1.000 ********** ********** ** 17 **MINIMIZE .5360E+05 .2000E-04 ********** MIGRAD MINIMIZATION HAS CONVERGED. MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX. FCN= 16242.83 FROM MIGRAD STATUS=CONVERGED 52 CALLS 252 TOTAL EDM= .51E-09 STRATEGY= 1 ERR MATRIX NOT POS-DEF EXT PARAMETER APPROXIMATE STEP FIRST NO. NAME VALUE ERROR SIZE DERIVATIVE 1 Prefactor .24374E-01 .12131 .16744E-03** at limit ** 2 Index 5.4290 1.6989 .14382 .37207E-03 3 Normalizat .97099 .26686E-01 .45800E-01 .41692E-04 4 Prefactor 1.0612 .23180E-01 .39295E-01 .17713E-04 ERR DEF= .500 Final values: Prefactor = 0.024374 Index = 5.42903 Normalizat = 0.970987 Prefactor = 1.06117 ********** ** 18 **HESSE ********** FCN= 16242.83 FROM HESSE STATUS=NOT POSDEF 33 CALLS 285 TOTAL EDM= .14E-08 STRATEGY= 1 ERR MATRIX NOT POS-DEF EXT PARAMETER APPROXIMATE INTERNAL INTERNAL NO. NAME VALUE ERROR STEP SIZE VALUE 1 Prefactor .24374E-01 .32927 .10048E-05 -1.5705 WARNING - - ABOVE PARAMETER IS AT LIMIT. 2 Index 5.4290 3.3760 .50195E-02 .85912E-01 3 Normalizat .97099 .11282 .26553E-03 -.94009 4 Prefactor 1.0612 .95916E-01 .22090E-03 -.90717 ERR DEF= .500 Minuit fit quality: 2 estimated distance: 1.3598e-09 Minuit parameter uncertainties: 1 0.179171 2 3.70948 3 0.112845 4 0.0959317 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) = 16242.8309283 delta logL = 2.20038986408 Extracting fit parameters... 4FGL J1040.5+0617 Spectrum: PowerLaw 216 Prefactor: 2.437e-02 1.792e-01 0.000e+00 1.000e+06 ( 1.000e-12) 217 Index: 5.429e+00 3.709e+00 0.000e+00 1.000e+01 (-1.000e+00) 218 Scale: 8.643e+02 0.000e+00 3.000e+01 5.000e+05 ( 1.000e+00) fixed GAL_V02 Spectrum: PowerLaw 533 Prefactor: 1.061e+00 9.593e-02 0.000e+00 1.000e+01 ( 1.000e+00) 534 Index: 0.000e+00 0.000e+00 -1.000e+00 1.000e+00 ( 1.000e+00) fixed 535 Scale: 1.000e+02 0.000e+00 5.000e+01 2.000e+02 ( 1.000e+00) fixed EG_v02 Spectrum: FileFunction 532 Normalization: 9.710e-01 1.128e-01 1.000e-02 1.000e+01 ( 1.000e+00) TS (Free Index): 5.00 Ra Dec: 160.150 6.285 Photon Index (Free Index): 5.43 +/- 3.71 Photon Flux (Free Index): 6.75e-08 +/- 3.62e-08 Energy Flux (Free Index): 8.69e-06 +/- 5.70e-06 Creating a high resolution counts map... INFO: Auto-setting vmin to -1.000e-01 [aplpy.core] INFO: Auto-setting vmax to 1.110e+00 [aplpy.core] Saving /lscratch/kocevski/31088759/cmap_HighResolution_804470401_805075201_4FGL_J1040.5+0617_weekly_bin935.png Cleaning up... ** Nuclear option initiated! ** Updating database... UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='5.22e-03', comment='SUCCESS', energy_flux2='8.69e-06', dlogl='2.20e+00', photon_flux2='6.75e-08', job_status='DONE', time_completed='2026-07-09 00:02:16.448620', photon_index_error2='3.71', photon_index2='5.43', ts='0.22', fit_tolerance='1e-08', GAL='1.01', photon_index_error='0.00', photon_flux_upper_limit='6.77e-08', energy_flux_error2='5.70e-06', EG='1.05', time_epoch_completed='1783580536.45', return_code='0', job_id='31088759', GAL2='1.06', EG2='0.97', return_code2='102', photon_flux_error2='3.62e-08', ts2='5.00', photon_index='2.37' WHERE bin_id='935' AND source_name='4FGL J1040.5+0617' AND cadence='weekly'; Database successfully updated. Analysis Complete. Thu Jul 9 00:02:16 PDT 2026 Working on... /lscratch/kocevski/31088836/ft1_filtered_4FGL_J1040.5+0617_weekly_bin935.fits.....................! real 64.56 user 60.25 sys 1.50 Creating the likelihood object... obs = UnbinnedObs('/lscratch/kocevski/31088836/ft1_filtered_4FGL_J1040.5+0617_weekly_bin935.fits', '/lscratch/kocevski/31088836/ft2_4FGL_J1040.5+0617_weekly_bin935.fits', expMap='/lscratch/kocevski/31088836/expmap_804470401_805075201_4FGL_J1040.5+0617_weekly_bin935.fits', expCube='/lscratch/kocevski/31088836/ltcube_804470401_805075201_4FGL_J1040.5+0617_weekly_bin935.fits', irfs='P8R3_SOURCE_V2') like = UnbinnedAnalysis(obs, '/lscratch/kocevski/31088836/Model_4FGL_J1040.5+0617_weekly_bin935.xml', optimizer='MINUIT') Using source of interest name: '4FGL J1040.5+0617' 4FGL J1040.5+0617 Spectrum: PowerLaw 216 Prefactor: 2.877e+00 0.000e+00 0.000e+00 1.000e+06 ( 1.000e-12) 217 Index: 2.368e+00 0.000e+00 0.000e+00 1.000e+01 (-1.000e+00) fixed 218 Scale: 8.643e+02 0.000e+00 3.000e+01 5.000e+05 ( 1.000e+00) fixed Likelihood Fit Parameters: Event file(s): /lscratch/kocevski/31088836/ft1_filtered_4FGL_J1040.5+0617_weekly_bin935.fits Spacecraft file(s): /lscratch/kocevski/31088836/ft2_4FGL_J1040.5+0617_weekly_bin935.fits Exposure map: /lscratch/kocevski/31088836/expmap_804470401_805075201_4FGL_J1040.5+0617_weekly_bin935.fits Exposure cube: /lscratch/kocevski/31088836/ltcube_804470401_805075201_4FGL_J1040.5+0617_weekly_bin935.fits IRFs: P8R3_SOURCE_V2 Source model file: /lscratch/kocevski/31088836/Model_4FGL_J1040.5+0617_weekly_bin935.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) = 16245.109415 Fit tolerance = 0.0001 Performing likelihood fit... Done. MINUIT Return Code (Fixed Index): 0 logL (Fixed Index) = 16245.0322612 Fit tolerance = 1e-08 Performing likelihood fit... ********** ** 14 **SET NOWARN ********** PARAMETER DEFINITIONS: NO. NAME VALUE STEP SIZE LIMITS 1 'Prefactor ' .86239E-04 1.0000 .0000 .10000E+07 2 'Prefactor ' .37547E-04 1.0000 .0000 .10000E+07 3 'Prefactor ' .47164E-05 1.0000 .0000 .10000E+07 4 'Prefactor ' 27.739 1.0000 .0000 .10000E+07 5 'Prefactor ' 12.436 1.0000 .0000 .10000E+07 6 'Prefactor ' .66296E-02 1.0000 .0000 .10000E+07 7 'norm ' 1.5924 1.0000 .0000 .10000E+07 8 'Prefactor ' 2.5321 1.0000 .0000 .10000E+07 9 'Prefactor ' 1.0439 1.0000 .0000 .10000E+07 10 'Prefactor ' 6.1437 1.0000 .0000 .10000E+07 11 'Prefactor ' 5.0582 1.0000 .0000 .10000E+07 12 'norm ' .11491E-07 1.0000 .0000 .10000E+07 13 'norm ' 2.2000 1.0000 .0000 .10000E+07 14 'Prefactor ' .84838E-06 1.0000 .0000 .10000E+07 15 'norm ' .51352E-04 1.0000 .0000 .10000E+07 16 'Normalizat' 1.0511 1.0000 .10000E-01 10.000 17 'Prefactor ' 1.0122 1.0000 .0000 10.000 ********** ** 15 **SET ERR .5000 ********** ********** ** 16 **SET GRAD 1.000 ********** ********** ** 17 **MINIMIZE .5360E+05 .2000E-04 ********** MIGRAD MINIMIZATION HAS CONVERGED. FCN= 16245.03 FROM MIGRAD STATUS=CONVERGED 117 CALLS 1006 TOTAL EDM= .13E-08 STRATEGY=1 ERROR MATRIX UNCERTAINTY= .9% EXT PARAMETER STEP FIRST NO. NAME VALUE ERROR SIZE DERIVATIVE 1 Prefactor .0000 1.5798 .55375E-07** at limit ** 2 Prefactor .14223E-05 14.777 -.28796E-06** at limit ** 3 Prefactor .16653E-09 3.1416 -.96579E-10** at limit ** 4 Prefactor 28.759 21.953 .22533E-06 -.15920 5 Prefactor 12.475 21.244 .13214E-06 -.68784E-01 6 Prefactor .11629E-04 16.379 -.78460E-06** at limit ** 7 norm 1.5942 .77809 .10055E-06 -.38951E-02 8 Prefactor 2.4857 3.6890 -.22046E-07 -.86565E-03 9 Prefactor 1.0420 2.3609 -.24759E-07 -.47877E-03 10 Prefactor 6.1417 4.4795 .24638E-06 -.22129E-02 11 Prefactor 5.0495 3.8512 .17406E-08 -.73460E-03 12 norm .0000 .68648E-01 .56327E-08** at limit ** 13 norm 2.2011 .98494 .32094E-07 .97864E-03 14 Prefactor .14155E-07 5.7374 -.12239E-06** at limit ** 15 norm .0000 1.5251 .25753E-07** at limit ** 16 Normalizat 1.0505 .13918 .31861E-05 -.60780E-04 17 Prefactor 1.0125 .11431 -.20567E-05 -.77917E-04 ERR DEF= .500 Final values: Prefactor = 0 Prefactor = 1.42231e-06 Prefactor = 1.66533e-10 Prefactor = 28.7589 Prefactor = 12.4747 Prefactor = 1.16291e-05 norm = 1.59425 Prefactor = 2.48568 Prefactor = 1.04196 Prefactor = 6.14168 Prefactor = 5.04953 norm = 0 norm = 2.20108 Prefactor = 1.41553e-08 norm = 0 Normalizat = 1.05049 Prefactor = 1.01254 ********** ** 18 **HESSE ********** FCN= 16245.03 FROM HESSE STATUS=OK 257 CALLS 1263 TOTAL EDM= .24E-05 STRATEGY= 1 ERROR MATRIX ACCURATE EXT PARAMETER INTERNAL INTERNAL NO. NAME VALUE ERROR STEP SIZE VALUE 1 Prefactor .0000 1.5845 .42118E-03 -1.5708 WARNING - - ABOVE PARAMETER IS AT LIMIT. 2 Prefactor .14223E-05 15.657 .42118E-03 -1.5708 WARNING - - ABOVE PARAMETER IS AT LIMIT. 3 Prefactor .16653E-09 3.1065 .42118E-03 -1.5708 WARNING - - ABOVE PARAMETER IS AT LIMIT. 4 Prefactor 28.759 29.821 .18990E-03 -1.5601 5 Prefactor 12.475 21.773 .28380E-03 -1.5637 6 Prefactor .11629E-04 23.921 .42118E-03 -1.5708 WARNING - - ABOVE PARAMETER IS AT LIMIT. 7 norm 1.5942 .78518 .84042E-03 -1.5683 8 Prefactor 2.4857 3.7101 .64161E-03 -1.5676 9 Prefactor 1.0420 2.4100 .12201E-02 -1.5688 10 Prefactor 6.1417 4.4794 .40480E-03 -1.5658 11 Prefactor 5.0495 3.9226 .44685E-03 -1.5663 12 norm .0000 .66839E-01 .42118E-03 -1.5708 WARNING - - ABOVE PARAMETER IS AT LIMIT. 13 norm 2.2011 .98531 .69341E-03 -1.5678 14 Prefactor .14155E-07 5.7422 .42118E-03 -1.5708 WARNING - - ABOVE PARAMETER IS AT LIMIT. 15 norm .0000 1.5227 .42118E-03 -1.5708 WARNING - - ABOVE PARAMETER IS AT LIMIT. 16 Normalizat 1.0505 .11840 .58065E-01 -.91358 17 Prefactor 1.0125 .95898E-01 .43022E-01 -.92313 ERR DEF= .500 Minuit fit quality: 3 estimated distance: 2.40641e-06 Minuit parameter uncertainties: 1 1.26078e-05 2 0.00943807 3 4.45719e-05 4 29.8207 5 21.7731 6 0.0333572 7 0.785176 8 3.71007 9 2.41003 10 4.47944 11 3.92257 12 2.28198e-07 13 0.985306 14 0.000570086 15 1.13644e-05 16 0.118435 17 0.095914 Done. MINUIT Return Code (Fixed Index): 0 logL (Fixed Index) = 16245.0313182 Extracting fit parameters... 4FGL J1040.5+0617 Spectrum: PowerLaw 216 Prefactor: 1.042e+00 2.410e+00 0.000e+00 1.000e+06 ( 1.000e-12) 217 Index: 2.368e+00 0.000e+00 0.000e+00 1.000e+01 (-1.000e+00) fixed 218 Scale: 8.643e+02 0.000e+00 3.000e+01 5.000e+05 ( 1.000e+00) fixed GAL_V02 Spectrum: PowerLaw 533 Prefactor: 1.013e+00 9.591e-02 0.000e+00 1.000e+01 ( 1.000e+00) 534 Index: 0.000e+00 0.000e+00 -1.000e+00 1.000e+00 ( 1.000e+00) fixed 535 Scale: 1.000e+02 0.000e+00 5.000e+01 2.000e+02 ( 1.000e+00) fixed EG_v02 Spectrum: FileFunction 532 Normalization: 1.050e+00 1.184e-01 1.000e-02 1.000e+01 ( 1.000e+00) TS (Fixed Index): 0.22 Ra Dec: 160.150 6.285 Photon Flux Upper Limit: 6.7745318464e-08 ph cm-2 s-1 Energy Flux Upper Limit: 0.00522356105598 MeV cm-2 s-1 Saving results to: /lscratch/kocevski/31088836/likelihoodResults_804470401_805075201_4FGL_J1040.5+0617_weekly_bin935.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) = 16242.9858854 delta logL = 2.04543280919 Fit tolerance = 0.0001 Performing likelihood fit... Done. MINUIT Return Code (Free Index): 102 logL (Free Index) = 16242.8309383 delta logL = 2.20037994123 Fit tolerance = 1e-08 Performing likelihood fit... ********** ** 14 **SET NOWARN ********** PARAMETER DEFINITIONS: NO. NAME VALUE STEP SIZE LIMITS 1 'Prefactor ' .24715E-01 1.0000 .0000 .10000E+07 2 'Index ' 5.4219 1.0000 .0000 10.000 3 'Normalizat' .97080 1.0000 .10000E-01 10.000 4 'Prefactor ' 1.0612 1.0000 .0000 10.000 ********** ** 15 **SET ERR .5000 ********** ********** ** 16 **SET GRAD 1.000 ********** ********** ** 17 **MINIMIZE .5360E+05 .2000E-04 ********** MIGRAD MINIMIZATION HAS CONVERGED. MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX. FCN= 16242.83 FROM MIGRAD STATUS=CONVERGED 52 CALLS 252 TOTAL EDM= .51E-09 STRATEGY= 1 ERR MATRIX NOT POS-DEF EXT PARAMETER APPROXIMATE STEP FIRST NO. NAME VALUE ERROR SIZE DERIVATIVE 1 Prefactor .24374E-01 .12131 .16744E-03** at limit ** 2 Index 5.4290 1.6989 .14382 .37207E-03 3 Normalizat .97099 .26686E-01 .45800E-01 .41692E-04 4 Prefactor 1.0612 .23180E-01 .39295E-01 .17713E-04 ERR DEF= .500 Final values: Prefactor = 0.024374 Index = 5.42903 Normalizat = 0.970987 Prefactor = 1.06117 ********** ** 18 **HESSE ********** FCN= 16242.83 FROM HESSE STATUS=NOT POSDEF 33 CALLS 285 TOTAL EDM= .14E-08 STRATEGY= 1 ERR MATRIX NOT POS-DEF EXT PARAMETER APPROXIMATE INTERNAL INTERNAL NO. NAME VALUE ERROR STEP SIZE VALUE 1 Prefactor .24374E-01 .32927 .10048E-05 -1.5705 WARNING - - ABOVE PARAMETER IS AT LIMIT. 2 Index 5.4290 3.3760 .50195E-02 .85912E-01 3 Normalizat .97099 .11282 .26553E-03 -.94009 4 Prefactor 1.0612 .95916E-01 .22090E-03 -.90717 ERR DEF= .500 Minuit fit quality: 2 estimated distance: 1.3598e-09 Minuit parameter uncertainties: 1 0.179171 2 3.70948 3 0.112845 4 0.0959317 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) = 16242.8309283 delta logL = 2.20038986408 Extracting fit parameters... 4FGL J1040.5+0617 Spectrum: PowerLaw 216 Prefactor: 2.437e-02 1.792e-01 0.000e+00 1.000e+06 ( 1.000e-12) 217 Index: 5.429e+00 3.709e+00 0.000e+00 1.000e+01 (-1.000e+00) 218 Scale: 8.643e+02 0.000e+00 3.000e+01 5.000e+05 ( 1.000e+00) fixed GAL_V02 Spectrum: PowerLaw 533 Prefactor: 1.061e+00 9.593e-02 0.000e+00 1.000e+01 ( 1.000e+00) 534 Index: 0.000e+00 0.000e+00 -1.000e+00 1.000e+00 ( 1.000e+00) fixed 535 Scale: 1.000e+02 0.000e+00 5.000e+01 2.000e+02 ( 1.000e+00) fixed EG_v02 Spectrum: FileFunction 532 Normalization: 9.710e-01 1.128e-01 1.000e-02 1.000e+01 ( 1.000e+00) TS (Free Index): 5.00 Ra Dec: 160.150 6.285 Photon Index (Free Index): 5.43 +/- 3.71 Photon Flux (Free Index): 6.75e-08 +/- 3.62e-08 Energy Flux (Free Index): 8.69e-06 +/- 5.70e-06 Creating a high resolution counts map... INFO: Auto-setting vmin to -1.000e-01 [aplpy.core] INFO: Auto-setting vmax to 1.110e+00 [aplpy.core] Saving /lscratch/kocevski/31088836/cmap_HighResolution_804470401_805075201_4FGL_J1040.5+0617_weekly_bin935.png Cleaning up... ** Nuclear option initiated! ** Updating database... UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='5.22e-03', comment='SUCCESS', energy_flux2='8.69e-06', dlogl='2.20e+00', photon_flux2='6.75e-08', job_status='DONE', time_completed='2026-07-09 00:04:35.029092', photon_index_error2='3.71', photon_index2='5.43', ts='0.22', fit_tolerance='1e-08', GAL='1.01', photon_index_error='0.00', photon_flux_upper_limit='6.77e-08', energy_flux_error2='5.70e-06', EG='1.05', time_epoch_completed='1783580675.03', return_code='0', job_id='31088836', GAL2='1.06', EG2='0.97', return_code2='102', photon_flux_error2='3.62e-08', ts2='5.00', photon_index='2.37' WHERE bin_id='935' AND source_name='4FGL J1040.5+0617' AND cadence='weekly'; Database successfully updated. Analysis Complete. Thu Jul 9 00:04:35 PDT 2026