Done. MINUIT Return Code (Fixed Index): 0 logL (Fixed Index) = 15663.3288044 Extracting fit parameters... 4FGL J2040.5-1705 Spectrum: PowerLaw 323 Prefactor: 1.045e-06 2.586e-03 0.000e+00 1.000e+06 ( 1.000e-12) 324 Index: 2.541e+00 0.000e+00 0.000e+00 1.000e+01 (-1.000e+00) fixed 325 Scale: 7.724e+02 0.000e+00 3.000e+01 5.000e+05 ( 1.000e+00) fixed GAL_V02 Spectrum: PowerLaw 596 Prefactor: 9.474e-01 6.893e-02 0.000e+00 1.000e+01 ( 1.000e+00) 597 Index: 0.000e+00 0.000e+00 -1.000e+00 1.000e+00 ( 1.000e+00) fixed 598 Scale: 1.000e+02 0.000e+00 5.000e+01 2.000e+02 ( 1.000e+00) fixed EG_v02 Spectrum: FileFunction 595 Normalization: 1.145e+00 1.613e-01 1.000e-02 1.000e+01 ( 1.000e+00) TS (Fixed Index): -0.00 Ra Dec: 310.136 -17.090 Photon Flux Upper Limit: 7.87794295726e-08 ph cm-2 s-1 Energy Flux Upper Limit: 0.00614317940108 MeV cm-2 s-1 Saving results to: /lscratch/kocevski/32671708/likelihoodResults_805680001_806284801_4FGL_J2040.5-1705_weekly_bin937.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) = 15663.3015945 delta logL = 0.0272098802143 Fit tolerance = 0.0001 Performing likelihood fit... Done. MINUIT Return Code (Free Index): 102 logL (Free Index) = 15663.2708588 delta logL = 0.0579455266106 Fit tolerance = 1e-08 Performing likelihood fit... ********** ** 14 **SET NOWARN ********** PARAMETER DEFINITIONS: NO. NAME VALUE STEP SIZE LIMITS 1 'Prefactor ' .23447 1.0000 .0000 .10000E+07 2 'Index ' 3.7593 1.0000 .0000 10.000 3 'Normalizat' 1.1248 1.0000 .10000E-01 10.000 4 'Prefactor ' .95179 1.0000 .0000 10.000 ********** ** 15 **SET ERR .5000 ********** ********** ** 16 **SET GRAD 1.000 ********** ********** ** 17 **MINIMIZE .5990E+05 .2000E-04 ********** MIGRAD MINIMIZATION HAS CONVERGED. MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX. FCN= 15663.27 FROM MIGRAD STATUS=CONVERGED 66 CALLS 360 TOTAL EDM= .88E-08 STRATEGY= 1 ERR MATRIX NOT POS-DEF EXT PARAMETER APPROXIMATE STEP FIRST NO. NAME VALUE ERROR SIZE DERIVATIVE 1 Prefactor .23523 1.4177 .23998E-02** at limit ** 2 Index 3.7578 .55485 .50000 .13513E-04 3 Normalizat 1.1247 .96804E-02 .82001E-01 .37891E-04 4 Prefactor .95198 .41287E-02 .45662E-01 -.54368E-05 ERR DEF= .500 Final values: Prefactor = 0.23523 Index = 3.75779 Normalizat = 1.12465 Prefactor = 0.951976 ********** ** 18 **HESSE ********** FCN= 15663.27 FROM HESSE STATUS=NOT POSDEF 33 CALLS 393 TOTAL EDM= .13E-07 STRATEGY= 1 ERR MATRIX NOT POS-DEF EXT PARAMETER APPROXIMATE INTERNAL INTERNAL NO. NAME VALUE ERROR STEP SIZE VALUE 1 Prefactor .23523 90.210 .12624E-03 -1.5698 WARNING - - ABOVE PARAMETER IS AT LIMIT. 2 Index 3.7578 8.1145 .60864E-02 -.25107 3 Normalizat 1.1247 .13731 .36304E-03 -.88964 4 Prefactor .95198 .54423E-01 .16595E-03 -.94348 ERR DEF= .500 Minuit fit quality: 2 estimated distance: 1.31618e-08 Minuit parameter uncertainties: 1 9.21317 2 21.2548 3 0.137354 4 0.0544262 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) = 15663.2708534 delta logL = 0.057950932156 Extracting fit parameters... 4FGL J2040.5-1705 Spectrum: PowerLaw 323 Prefactor: 2.352e-01 9.213e+00 0.000e+00 1.000e+06 ( 1.000e-12) 324 Index: 3.758e+00 2.125e+01 0.000e+00 1.000e+01 (-1.000e+00) 325 Scale: 7.724e+02 0.000e+00 3.000e+01 5.000e+05 ( 1.000e+00) fixed GAL_V02 Spectrum: PowerLaw 596 Prefactor: 9.520e-01 5.443e-02 0.000e+00 1.000e+01 ( 1.000e+00) 597 Index: 0.000e+00 0.000e+00 -1.000e+00 1.000e+00 ( 1.000e+00) fixed 598 Scale: 1.000e+02 0.000e+00 5.000e+01 2.000e+02 ( 1.000e+00) fixed EG_v02 Spectrum: FileFunction 595 Normalization: 1.125e+00 1.374e-01 1.000e-02 1.000e+01 ( 1.000e+00) TS (Free Index): -0.00 Ra Dec: 310.136 -17.090 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/32671708/cmap_HighResolution_805680001_806284801_4FGL_J2040.5-1705_weekly_bin937.png Cleaning up... ** Nuclear option initiated! ** Updating database... UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='6.14e-03', job_status='DONE', photon_flux_upper_limit='7.88e-08', time_completed='2026-07-21 18:34:31.506337', job_id='32671708', GAL2='0.95', fit_tolerance='1e-08', EG2='1.12', EG='1.15', time_epoch_completed='1784684071.51', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.95', dlogl='5.80e-02', ts2='0.13', photon_index_error='0.00', photon_index='2.54' WHERE bin_id='937' AND source_name='4FGL J2040.5-1705' AND cadence='weekly'; Database successfully updated. Analysis Complete. Tue Jul 21 18:34:32 PDT 2026 Done. MINUIT Return Code (Fixed Index): 0 logL (Fixed Index) = 15663.3288044 Extracting fit parameters... 4FGL J2040.5-1705 Spectrum: PowerLaw 323 Prefactor: 1.045e-06 2.586e-03 0.000e+00 1.000e+06 ( 1.000e-12) 324 Index: 2.541e+00 0.000e+00 0.000e+00 1.000e+01 (-1.000e+00) fixed 325 Scale: 7.724e+02 0.000e+00 3.000e+01 5.000e+05 ( 1.000e+00) fixed GAL_V02 Spectrum: PowerLaw 596 Prefactor: 9.474e-01 6.893e-02 0.000e+00 1.000e+01 ( 1.000e+00) 597 Index: 0.000e+00 0.000e+00 -1.000e+00 1.000e+00 ( 1.000e+00) fixed 598 Scale: 1.000e+02 0.000e+00 5.000e+01 2.000e+02 ( 1.000e+00) fixed EG_v02 Spectrum: FileFunction 595 Normalization: 1.145e+00 1.613e-01 1.000e-02 1.000e+01 ( 1.000e+00) TS (Fixed Index): -0.00 Ra Dec: 310.136 -17.090 Photon Flux Upper Limit: 7.87794295726e-08 ph cm-2 s-1 Energy Flux Upper Limit: 0.00614317940108 MeV cm-2 s-1 Saving results to: /lscratch/kocevski/32671714/likelihoodResults_805680001_806284801_4FGL_J2040.5-1705_weekly_bin937.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) = 15663.3015945 delta logL = 0.0272098802143 Fit tolerance = 0.0001 Performing likelihood fit... Done. MINUIT Return Code (Free Index): 102 logL (Free Index) = 15663.2708588 delta logL = 0.0579455266106 Fit tolerance = 1e-08 Performing likelihood fit... ********** ** 14 **SET NOWARN ********** PARAMETER DEFINITIONS: NO. NAME VALUE STEP SIZE LIMITS 1 'Prefactor ' .23447 1.0000 .0000 .10000E+07 2 'Index ' 3.7593 1.0000 .0000 10.000 3 'Normalizat' 1.1248 1.0000 .10000E-01 10.000 4 'Prefactor ' .95179 1.0000 .0000 10.000 ********** ** 15 **SET ERR .5000 ********** ********** ** 16 **SET GRAD 1.000 ********** ********** ** 17 **MINIMIZE .5990E+05 .2000E-04 ********** MIGRAD MINIMIZATION HAS CONVERGED. MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX. FCN= 15663.27 FROM MIGRAD STATUS=CONVERGED 66 CALLS 360 TOTAL EDM= .88E-08 STRATEGY= 1 ERR MATRIX NOT POS-DEF EXT PARAMETER APPROXIMATE STEP FIRST NO. NAME VALUE ERROR SIZE DERIVATIVE 1 Prefactor .23523 1.4177 .23998E-02** at limit ** 2 Index 3.7578 .55485 .50000 .13513E-04 3 Normalizat 1.1247 .96804E-02 .82001E-01 .37891E-04 4 Prefactor .95198 .41287E-02 .45662E-01 -.54368E-05 ERR DEF= .500 Final values: Prefactor = 0.23523 Index = 3.75779 Normalizat = 1.12465 Prefactor = 0.951976 ********** ** 18 **HESSE ********** FCN= 15663.27 FROM HESSE STATUS=NOT POSDEF 33 CALLS 393 TOTAL EDM= .13E-07 STRATEGY= 1 ERR MATRIX NOT POS-DEF EXT PARAMETER APPROXIMATE INTERNAL INTERNAL NO. NAME VALUE ERROR STEP SIZE VALUE 1 Prefactor .23523 90.210 .12624E-03 -1.5698 WARNING - - ABOVE PARAMETER IS AT LIMIT. 2 Index 3.7578 8.1145 .60864E-02 -.25107 3 Normalizat 1.1247 .13731 .36304E-03 -.88964 4 Prefactor .95198 .54423E-01 .16595E-03 -.94348 ERR DEF= .500 Minuit fit quality: 2 estimated distance: 1.31618e-08 Minuit parameter uncertainties: 1 9.21317 2 21.2548 3 0.137354 4 0.0544262 /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). 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) = 15663.2708534 delta logL = 0.057950932156 Extracting fit parameters... 4FGL J2040.5-1705 Spectrum: PowerLaw 323 Prefactor: 2.352e-01 9.213e+00 0.000e+00 1.000e+06 ( 1.000e-12) 324 Index: 3.758e+00 2.125e+01 0.000e+00 1.000e+01 (-1.000e+00) 325 Scale: 7.724e+02 0.000e+00 3.000e+01 5.000e+05 ( 1.000e+00) fixed GAL_V02 Spectrum: PowerLaw 596 Prefactor: 9.520e-01 5.443e-02 0.000e+00 1.000e+01 ( 1.000e+00) 597 Index: 0.000e+00 0.000e+00 -1.000e+00 1.000e+00 ( 1.000e+00) fixed 598 Scale: 1.000e+02 0.000e+00 5.000e+01 2.000e+02 ( 1.000e+00) fixed EG_v02 Spectrum: FileFunction 595 Normalization: 1.125e+00 1.374e-01 1.000e-02 1.000e+01 ( 1.000e+00) TS (Free Index): -0.00 Ra Dec: 310.136 -17.090 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/32671714/cmap_HighResolution_805680001_806284801_4FGL_J2040.5-1705_weekly_bin937.png Cleaning up... ** Nuclear option initiated! ** Updating database... UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='6.14e-03', job_status='DONE', photon_flux_upper_limit='7.88e-08', time_completed='2026-07-21 18:34:42.519708', job_id='32671714', GAL2='0.95', fit_tolerance='1e-08', EG2='1.12', EG='1.15', time_epoch_completed='1784684082.52', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.95', dlogl='5.80e-02', ts2='0.13', photon_index_error='0.00', photon_index='2.54' WHERE bin_id='937' AND source_name='4FGL J2040.5-1705' AND cadence='weekly'; Database successfully updated. Analysis Complete. Tue Jul 21 18:34:43 PDT 2026 /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 = 17284 number of fields = 31 RA_SUN column already exists. File will not be modified. Done. Performing analysis on: 4FGL_J2040.5-1705_weekly_bin937 RA = 310.136, Dec = -17.0901 tmin = 805680001, tmax = 806284801 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='32672496', job_status='RUN', time_executed='2026-07-21 18:32:53.246300', time_epoch_executed='1784683973.25' WHERE source_name='4FGL J2040.5-1705' and cadence='weekly' and bin_id='937' Database successfully updated. Done. Creating custom output directory: /lscratch/kocevski/32672496 Creating custom pfile directory: /lscratch/kocevski/32672496/pfiles/ Retrieving the FT1 file... Issuing command: datacat find --group FT1 --filter 'nMetStop>=805680001.0 && nMetStart<806284801.0' /Data/Flight/Reprocess/P305 Issuing command: datacat find --group FT1 --filter 'nMetStart>564945418 && nMetStop>=805680001.0 && nMetStart<806284801.0' /Data/Flight/Level1/LPA Retrieving 107 files... Done. Merging files... Checksum keywords updated successfully. Merged file saved to: /lscratch/kocevski/32672496/ft1_4FGL_J2040.5-1705_weekly_bin937.fits Retrieving the FT1 file... Issuing command: datacat find --group FT2 --filter 'nMetStop>=805680001.0 && nMetStart<806284801.0' /Data/Flight/Level1/LPA Retrieving 107 files... Done. Merging files... Merged file saved to: /lscratch/kocevski/32672496/ft2_4FGL_J2040.5-1705_weekly_bin937.fits Selecting the photons: time -p gtselect infile=/lscratch/kocevski/32672496/ft1_4FGL_J2040.5-1705_weekly_bin937.fits outfile=/lscratch/kocevski/32672496/ft1_filteredMKT_4FGL_J2040.5-1705_weekly_bin937.fits ra=310.136 dec=-17.0901 rad=12.0 tmin=805680001.0 tmax=806284801.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 5.24 user 3.95 sys 0.23 Adding sun position to ft2 file: /sdf/group/fermi/g/LCRepository/Repository/bin/sunpos /lscratch/kocevski/32672496/ft2_4FGL_J2040.5-1705_weekly_bin937.fits Selecting the good time intervals: time -p gtmktime scfile=/lscratch/kocevski/32672496/ft2_4FGL_J2040.5-1705_weekly_bin937.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/32672496/ft1_filteredMKT_4FGL_J2040.5-1705_weekly_bin937.fits evtable="EVENTS" outfile="/lscratch/kocevski/32672496/ft1_filtered_4FGL_J2040.5-1705_weekly_bin937.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.27 user 0.22 sys 0.11 Number of photons that the gtmktime cut: 1390 Generating the livetime cube: time -p gtltcube evfile="/lscratch/kocevski/32672496/ft1_filtered_4FGL_J2040.5-1705_weekly_bin937.fits" evtable="EVENTS" scfile=/lscratch/kocevski/32672496/ft2_4FGL_J2040.5-1705_weekly_bin937.fits sctable="SC_DATA" outfile=/lscratch/kocevski/32672496/ltcube_805680001_806284801_4FGL_J2040.5-1705_weekly_bin937.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/32672496/ft2_4FGL_J2040.5-1705_weekly_bin937.fits .....................! real 17.65 user 16.26 sys 0.25 Generating the exposure map: time -p gtexpmap evfile=/lscratch/kocevski/32672496/ft1_filtered_4FGL_J2040.5-1705_weekly_bin937.fits evtable="EVENTS" scfile=/lscratch/kocevski/32672496/ft2_4FGL_J2040.5-1705_weekly_bin937.fits sctable="SC_DATA" expcube=/lscratch/kocevski/32672496/ltcube_805680001_806284801_4FGL_J2040.5-1705_weekly_bin937.fits outfile=/lscratch/kocevski/32672496/expmap_805680001_806284801_4FGL_J2040.5-1705_weekly_bin937.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/32672496/ltcube_805680001_806284801_4FGL_J2040.5-1705_weekly_bin937.fits .....................! real 64.92 user 59.82 sys 3.72 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 181 point sources and 0 extended sources Setting source of interest to: 4FGL J2040.5-1705 @ 310.136 -17.0901 Creating the counts map: time -p gtbin evfile=/lscratch/kocevski/32672496/ft1_filtered_4FGL_J2040.5-1705_weekly_bin937.fits scfile=/lscratch/kocevski/32672496/ft2_4FGL_J2040.5-1705_weekly_bin937.fits outfile=/lscratch/kocevski/32672496/cmap_805680001_806284801_4FGL_J2040.5-1705_weekly_bin937.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=310.136 yref=-17.0901 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.31 user 0.22 sys 0.13 Creating the high resolution counts map: time -p gtbin evfile=/lscratch/kocevski/32672496/ft1_filtered_4FGL_J2040.5-1705_weekly_bin937.fits scfile=/lscratch/kocevski/32672496/ft2_4FGL_J2040.5-1705_weekly_bin937.fits outfile=/lscratch/kocevski/32672496/cmap_HighResolution_805680001_806284801_4FGL_J2040.5-1705_weekly_bin937.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=310.136 yref=-17.0901 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.39 user 0.23 sys 0.14 Computing the diffuse response: time -p gtdiffrsp evfile=/lscratch/kocevski/32672496/ft1_filtered_4FGL_J2040.5-1705_weekly_bin937.fits evtable="EVENTS" scfile=/lscratch/kocevski/32672496/ft2_4FGL_J2040.5-1705_weekly_bin937.fits sctable="SC_DATA" srcmdl=/lscratch/kocevski/32672496/Model_4FGL_J2040.5-1705_weekly_bin937.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 number of points = 17284 number of fields = 31 RA_SUN column already exists. File will not be modified. Done. Performing analysis on: 4FGL_J2040.5-1705_weekly_bin937 RA = 310.136, Dec = -17.0901 tmin = 805680001, tmax = 806284801 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='32672701', job_status='RUN', time_executed='2026-07-21 18:34:54.641556', time_epoch_executed='1784684094.64' WHERE source_name='4FGL J2040.5-1705' and cadence='weekly' and bin_id='937' Database successfully updated. Done. Creating custom output directory: /lscratch/kocevski/32672701 Creating custom pfile directory: /lscratch/kocevski/32672701/pfiles/ Retrieving the FT1 file... Issuing command: datacat find --group FT1 --filter 'nMetStop>=805680001.0 && nMetStart<806284801.0' /Data/Flight/Reprocess/P305 Issuing command: datacat find --group FT1 --filter 'nMetStart>564945418 && nMetStop>=805680001.0 && nMetStart<806284801.0' /Data/Flight/Level1/LPA Retrieving 107 files... Done. Merging files... Checksum keywords updated successfully. Merged file saved to: /lscratch/kocevski/32672701/ft1_4FGL_J2040.5-1705_weekly_bin937.fits Retrieving the FT1 file... Issuing command: datacat find --group FT2 --filter 'nMetStop>=805680001.0 && nMetStart<806284801.0' /Data/Flight/Level1/LPA Retrieving 107 files... Done. Merging files... Merged file saved to: /lscratch/kocevski/32672701/ft2_4FGL_J2040.5-1705_weekly_bin937.fits Selecting the photons: time -p gtselect infile=/lscratch/kocevski/32672701/ft1_4FGL_J2040.5-1705_weekly_bin937.fits outfile=/lscratch/kocevski/32672701/ft1_filteredMKT_4FGL_J2040.5-1705_weekly_bin937.fits ra=310.136 dec=-17.0901 rad=12.0 tmin=805680001.0 tmax=806284801.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 5.02 user 3.80 sys 0.22 Adding sun position to ft2 file: /sdf/group/fermi/g/LCRepository/Repository/bin/sunpos /lscratch/kocevski/32672701/ft2_4FGL_J2040.5-1705_weekly_bin937.fits Selecting the good time intervals: time -p gtmktime scfile=/lscratch/kocevski/32672701/ft2_4FGL_J2040.5-1705_weekly_bin937.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/32672701/ft1_filteredMKT_4FGL_J2040.5-1705_weekly_bin937.fits evtable="EVENTS" outfile="/lscratch/kocevski/32672701/ft1_filtered_4FGL_J2040.5-1705_weekly_bin937.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.21 user 0.20 sys 0.12 Number of photons that the gtmktime cut: 1390 Generating the livetime cube: time -p gtltcube evfile="/lscratch/kocevski/32672701/ft1_filtered_4FGL_J2040.5-1705_weekly_bin937.fits" evtable="EVENTS" scfile=/lscratch/kocevski/32672701/ft2_4FGL_J2040.5-1705_weekly_bin937.fits sctable="SC_DATsource GAL_V02 Working on... /lscratch/kocevski/32672496/ft1_filtered_4FGL_J2040.5-1705_weekly_bin937.fits.....................! real 48.96 user 46.57 sys 1.05 Creating the likelihood object... obs = UnbinnedObs('/lscratch/kocevski/32672496/ft1_filtered_4FGL_J2040.5-1705_weekly_bin937.fits', '/lscratch/kocevski/32672496/ft2_4FGL_J2040.5-1705_weekly_bin937.fits', expMap='/lscratch/kocevski/32672496/expmap_805680001_806284801_4FGL_J2040.5-1705_weekly_bin937.fits', expCube='/lscratch/kocevski/32672496/ltcube_805680001_806284801_4FGL_J2040.5-1705_weekly_bin937.fits', irfs='P8R3_SOURCE_V2') like = UnbinnedAnalysis(obs, '/lscratch/kocevski/32672496/Model_4FGL_J2040.5-1705_weekly_bin937.xml', optimizer='MINUIT') Using source of interest name: '4FGL J2040.5-1705' 4FGL J2040.5-1705 Spectrum: PowerLaw 323 Prefactor: 1.223e+00 0.000e+00 0.000e+00 1.000e+06 ( 1.000e-12) 324 Index: 2.541e+00 0.000e+00 0.000e+00 1.000e+01 (-1.000e+00) fixed 325 Scale: 7.724e+02 0.000e+00 3.000e+01 5.000e+05 ( 1.000e+00) fixed Likelihood Fit Parameters: Event file(s): /lscratch/kocevski/32672496/ft1_filtered_4FGL_J2040.5-1705_weekly_bin937.fits Spacecraft file(s): /lscratch/kocevski/32672496/ft2_4FGL_J2040.5-1705_weekly_bin937.fits Exposure map: /lscratch/kocevski/32672496/expmap_805680001_806284801_4FGL_J2040.5-1705_weekly_bin937.fits Exposure cube: /lscratch/kocevski/32672496/ltcube_805680001_806284801_4FGL_J2040.5-1705_weekly_bin937.fits IRFs: P8R3_SOURCE_V2 Source model file: /lscratch/kocevski/32672496/Model_4FGL_J2040.5-1705_weekly_bin937.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) = 15663.34536 Fit tolerance = 0.0001 Performing likelihood fit... Done. MINUIT Return Code (Fixed Index): 0 logL (Fixed Index) = 15663.3294219 Fit tolerance = 1e-08 Performing likelihood fit... ********** ** 14 **SET NOWARN ********** PARAMETER DEFINITIONS: NO. NAME VALUE STEP SIZE LIMITS 1 'Prefactor ' 27.180 1.0000 .0000 .10000E+07 2 'Prefactor ' .92154E-06 1.0000 .0000 .10000E+07 3 'norm ' 12.946 1.0000 .0000 .10000E+07 4 'norm ' .22881E-03 1.0000 .0000 .10000E+07 5 'Prefactor ' 45.518 1.0000 .0000 .10000E+07 6 'norm ' 7.2575 1.0000 .0000 .10000E+07 7 'norm ' .39917E-03 1.0000 .0000 .10000E+07 8 'norm ' .58425 1.0000 .0000 .10000E+07 9 'Prefactor ' .14597E-01 1.0000 .0000 .10000E+07 10 'Prefactor ' .19436E-04 1.0000 .0000 .10000E+07 11 'norm ' .36435E-05 1.0000 .0000 .10000E+07 12 'Prefactor ' .14462E-05 1.0000 .0000 .10000E+07 13 'norm ' .17473E-02 1.0000 .0000 .10000E+07 14 'Prefactor ' 4.5498 1.0000 .0000 .10000E+07 15 'Prefactor ' .17489E-03 1.0000 .0000 .10000E+07 16 'Prefactor ' .26966E-05 1.0000 .0000 .10000E+07 17 'Normalizat' 1.1449 1.0000 .10000E-01 10.000 18 'Prefactor ' .94754 1.0000 .0000 10.000 ********** ** 15 **SET ERR .5000 ********** ********** ** 16 **SET GRAD 1.000 ********** ********** ** 17 **MINIMIZE .5990E+05 .2000E-04 ********** MIGRAD MINIMIZATION HAS CONVERGED. FCN= 15663.33 FROM MIGRAD STATUS=CONVERGED 111 CALLS 1303 TOTAL EDM= .13E-08 STRATEGY=1 ERROR MATRIX UNCERTAINTY= 1.5% EXT PARAMETER STEP FIRST NO. NAME VALUE ERROR SIZE DERIVATIVE 1 Prefactor 27.514 23.853 .36203E-05 -.37680E-01 2 Prefactor .0000 1.0967 .85330E-07** at limit ** 3 norm 12.934 1.9348 .16504E-06 .11015E-02 4 norm .56943E-06 2.5766 .13061E-05** at limit ** 5 Prefactor 45.472 7.3430 -.90024E-06 .10186 6 norm 7.2624 8.9674 .72105E-06 .11599E-01 7 norm .17641E-06 4.3593 -.85817E-06** at limit ** 8 norm .58478 .59427 -.24926E-06 -.38855E-02 9 Prefactor .57176E-08 25.614 .40761E-05** at limit ** 10 Prefactor .64393E-08 4.3319 -.22778E-05** at limit ** 11 norm .0000 .71862 .36819E-06** at limit ** 12 Prefactor .10449E-05 1.9665 .13600E-05** at limit ** 13 norm .86986E-07 5.8204 -.93575E-08** at limit ** 14 Prefactor 4.5107 4.5073 -.68535E-07 -.11571E-02 15 Prefactor .52797E-06 2.5737 -.46901E-06** at limit ** 16 Prefactor .44020E-07 2.5431 .35872E-06** at limit ** 17 Normalizat 1.1455 .19202 .98793E-05 -.13357E-05 18 Prefactor .94741 .82283E-01 -.32207E-05 .25237E-04 ERR DEF= .500 Final values: Prefactor = 27.5144 Prefactor = 0 norm = 12.9337 norm = 5.69433e-07 Prefactor = 45.4721 norm = 7.26237 norm = 1.76414e-07 norm = 0.584784 Prefactor = 5.71765e-09 Prefactor = 6.43929e-09 norm = 0 Prefactor = 1.04494e-06 norm = 8.6986e-08 Prefactor = 4.5107 Prefactor = 5.27967e-07 Prefactor = 4.40203e-08 Normalizat = 1.1455 Prefactor = 0.947411 A" outfile=/lscratch/kocevski/32672701/ltcube_805680001_806284801_4FGL_J2040.5-1705_weekly_bin937.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/32672701/ft2_4FGL_J2040.5-1705_weekly_bin937.fits .....................! real 17.08 user 15.81 sys 0.23 Generating the exposure map: time -p gtexpmap evfile=/lscratch/kocevski/32672701/ft1_filtered_4FGL_J2040.5-1705_weekly_bin937.fits evtable="EVENTS" scfile=/lscratch/kocevski/32672701/ft2_4FGL_J2040.5-1705_weekly_bin937.fits sctable="SC_DATA" expcube=/lscratch/kocevski/32672701/ltcube_805680001_806284801_4FGL_J2040.5-1705_weekly_bin937.fits outfile=/lscratch/kocevski/32672701/expmap_805680001_806284801_4FGL_J2040.5-1705_weekly_bin937.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/32672701/ltcube_805680001_806284801_4FGL_J2040.5-1705_weekly_bin937.fits .....................! real 62.75 user 57.89 sys 3.59 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 181 point sources and 0 extended sources Setting source of interest to: 4FGL J2040.5-1705 @ 310.136 -17.0901 Creating the counts map: time -p gtbin evfile=/lscratch/kocevski/32672701/ft1_filtered_4FGL_J2040.5-1705_weekly_bin937.fits scfile=/lscratch/kocevski/32672701/ft2_4FGL_J2040.5-1705_weekly_bin937.fits outfile=/lscratch/kocevski/32672701/cmap_805680001_806284801_4FGL_J2040.5-1705_weekly_bin937.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=310.136 yref=-17.0901 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.22 user 0.21 sys 0.13 Creating the high resolution counts map: time -p gtbin evfile=/lscratch/kocevski/32672701/ft1_filtered_4FGL_J2040.5-1705_weekly_bin937.fits scfile=/lscratch/kocevski/32672701/ft2_4FGL_J2040.5-1705_weekly_bin937.fits outfile=/lscratch/kocevski/32672701/cmap_HighResolution_805680001_806284801_4FGL_J2040.5-1705_weekly_bin937.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=310.136 yref=-17.0901 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.16 user 0.22 sys 0.13 Computing the diffuse response: time -p gtdiffrsp evfile=/lscratch/kocevski/32672701/ft1_filtered_4FGL_J2040.5-1705_weekly_bin937.fits evtable="EVENTS" scfile=/lscratch/kocevski/32672701/ft2_4FGL_J2040.5-1705_weekly_bin937.fits sctable="SC_DATA" srcmdl=/lscratch/kocevski/32672701/Model_4FGL_J2040.5-1705_weekly_bin937.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 ********** ** 18 **HESSE ********** FCN= 15663.33 FROM HESSE STATUS=OK 284 CALLS 1587 TOTAL EDM= .14E-05 STRATEGY= 1 ERROR MATRIX ACCURATE EXT PARAMETER INTERNAL INTERNAL NO. NAME VALUE ERROR STEP SIZE VALUE 1 Prefactor 27.514 27.381 .19185E-03 -1.5603 2 Prefactor .0000 1.0732 .42118E-03 -1.5708 WARNING - - ABOVE PARAMETER IS AT LIMIT. 3 norm 12.934 10.780 .27814E-03 -1.5636 4 norm .56943E-06 5.5041 .42118E-03 -1.5708 WARNING - - ABOVE PARAMETER IS AT LIMIT. 5 Prefactor 45.472 65.823 .14823E-03 -1.5573 6 norm 7.2624 9.0027 .37209E-03 -1.5654 7 norm .17641E-06 4.8535 .42118E-03 -1.5708 WARNING - - ABOVE PARAMETER IS AT LIMIT. 8 norm .58478 .59636 .70651E-03 -1.5693 9 Prefactor .57176E-08 25.387 .42118E-03 -1.5708 WARNING - - ABOVE PARAMETER IS AT LIMIT. 10 Prefactor .64393E-08 4.3301 .42118E-03 -1.5708 WARNING - - ABOVE PARAMETER IS AT LIMIT. 11 norm .0000 .71799 .42118E-03 -1.5708 WARNING - - ABOVE PARAMETER IS AT LIMIT. 12 Prefactor .10449E-05 1.5999 .52837E-02 -1.5708 WARNING - - ABOVE PARAMETER IS AT LIMIT. 13 norm .86986E-07 6.6928 .42118E-03 -1.5708 WARNING - - ABOVE PARAMETER IS AT LIMIT. 14 Prefactor 4.5107 4.5086 .47171E-03 -1.5665 15 Prefactor .52797E-06 6.1149 .42118E-03 -1.5708 WARNING - - ABOVE PARAMETER IS AT LIMIT. 16 Prefactor .44020E-07 5.8685 .42118E-03 -1.5708 WARNING - - ABOVE PARAMETER IS AT LIMIT. 17 Normalizat 1.1455 .16124 .81337E-01 -.88304 18 Prefactor .94741 .68927E-01 .45608E-01 -.94504 ERR DEF= .500 Minuit fit quality: 3 estimated distance: 1.37354e-06 Minuit parameter uncertainties: 1 27.3811 2 3.82704e-06 3 10.7802 4 0.00354072 5 65.824 6 9.00275 7 0.00185057 8 0.596358 9 0.000762691 10 0.000334273 11 4.73976e-06 12 0.00258599 13 0.00152581 14 4.50858 15 0.00359362 16 0.00101623 17 0.16131 18 0.0689338 Done. MINUIT Return Code (Fixed Index): 0 logL (Fixed Index) = 15663.3288044 Extracting fit parameters... 4FGL J2040.5-1705 Spectrum: PowerLaw 323 Prefactor: 1.045e-06 2.586e-03 0.000e+00 1.000e+06 ( 1.000e-12) 324 Index: 2.541e+00 0.000e+00 0.000e+00 1.000e+01 (-1.000e+00) fixed 325 Scale: 7.724e+02 0.000e+00 3.000e+01 5.000e+05 ( 1.000e+00) fixed GAL_V02 Spectrum: PowerLaw 596 Prefactor: 9.474e-01 6.893e-02 0.000e+00 1.000e+01 ( 1.000e+00) 597 Index: 0.000e+00 0.000e+00 -1.000e+00 1.000e+00 ( 1.000e+00) fixed 598 Scale: 1.000e+02 0.000e+00 5.000e+01 2.000e+02 ( 1.000e+00) fixed EG_v02 Spectrum: FileFunction 595 Normalization: 1.145e+00 1.613e-01 1.000e-02 1.000e+01 ( 1.000e+00) TS (Fixed Index): -0.00 Ra Dec: 310.136 -17.090 Photon Flux Upper Limit: 7.87794295726e-08 ph cm-2 s-1 Energy Flux Upper Limit: 0.00614317940108 MeV cm-2 s-1 Saving results to: /lscratch/kocevski/32672496/likelihoodResults_805680001_806284801_4FGL_J2040.5-1705_weekly_bin937.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) = 15663.3015945 delta logL = 0.0272098802143 Fit tolerance = 0.0001 Performing likelihood fit... Done. MINUIT Return Code (Free Index): 102 logL (Free Index) = 15663.2708588 delta logL = 0.0579455266106 Fit tolerance = 1e-08 Performing likelihood fit... ********** ** 14 **SET NOWARN ********** PARAMETER DEFINITIONS: NO. NAME VALUE STEP SIZE LIMITS 1 'Prefactor ' .23447 1.0000 .0000 .10000E+07 2 'Index ' 3.7593 1.0000 .0000 10.000 3 'Normalizat' 1.1248 1.0000 .10000E-01 10.000 4 'Prefactor ' .95179 1.0000 .0000 10.000 ********** ** 15 **SET ERR .5000 ********** ********** ** 16 **SET GRAD 1.000 ********** ********** ** 17 **MINIMIZE .5990E+05 .2000E-04 ********** MIGRAD MINIMIZATION HAS CONVERGED. MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX. FCN= 15663.27 FROM MIGRAD STATUS=CONVERGED 66 CALLS 360 TOTAL EDM= .88E-08 STRATEGY= 1 ERR MATRIX NOT POS-DEF EXT PARAMETER APPROXIMATE STEP FIRST NO. NAME VALUE ERROR SIZE DERIVATIVE 1 Prefactor .23523 1.4177 .23998E-02** at limit ** 2 Index 3.7578 .55485 .50000 .13513E-04 3 Normalizat 1.1247 .96804E-02 .82001E-01 .37891E-04 4 Prefactor .95198 .41287E-02 .45662E-01 -.54368E-05 ERR DEF= .500 Final values: Prefactor = 0.23523 Index = 3.75779 Normalizat = 1.12465 Prefactor = 0.951976 ********** ** 18 **HESSE ********** FCN= 15663.27 FROM HESSE STATUS=NOT POSDEF 33 CALLS 393 TOTAL EDM= .13E-07 STRATEGY= 1 ERR MATRIX NOT POS-DEF EXT PARAMETER APPROXIMATE INTERNAL INTERNAL NO. NAME VALUE ERROR STEP SIZE VALUE 1 Prefactor .23523 90.210 .12624E-03 -1.5698 WARNING - - ABOVE PARAMETER IS AT LIMIT. 2 Index 3.7578 8.1145 .60864E-02 -.25107 3 Normalizat 1.1247 .13731 .36304E-03 -.88964 4 Prefactor .95198 .54423E-01 .16595E-03 -.94348 ERR DEF= .500 Minuit fit quality: 2 estimated distance: 1.31618e-08 Minuit parameter uncertainties: 1 9.21317 2 21.2548 3 0.137354 4 0.0544262 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) = 15663.2708534 delta logL = 0.057950932156 Extracting fit parameters... 4FGL J2040.5-1705 Spectrum: PowerLaw 323 Prefactor: 2.352e-01 9.213e+00 0.000e+00 1.000e+06 ( 1.000e-12) 324 Index: 3.758e+00 2.125e+01 0.000e+00 1.000e+01 (-1.000e+00) 325 Scale: 7.724e+02 0.000e+00 3.000e+01 5.000e+05 ( 1.000e+00) fixed GAL_V02 Spectrum: PowerLaw 596 Prefactor: 9.520e-01 5.443e-02 0.000e+00 1.000e+01 ( 1.000e+00) 597 Index: 0.000e+00 0.000e+00 -1.000e+00 1.000e+00 ( 1.000e+00) fixed 598 Scale: 1.000e+02 0.000e+00 5.000e+01 2.000e+02 ( 1.000e+00) fixed EG_v02 Spectrum: FileFunction 595 Normalization: 1.125e+00 1.374e-01 1.000e-02 1.000e+01 ( 1.000e+00) TS (Free Index): -0.00 Ra Dec: 310.136 -17.090 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/32672496/cmap_HighResolution_805680001_806284801_4FGL_J2040.5-1705_weekly_bin937.png Cleaning up... ** Nuclear option initiated! ** Updating database... UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='6.14e-03', job_status='DONE', photon_flux_upper_limit='7.88e-08', time_completed='2026-07-21 18:47:02.180132', job_id='32672496', GAL2='0.95', fit_tolerance='1e-08', EG2='1.12', EG='1.15', time_epoch_completed='1784684822.18', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.95', dlogl='5.80e-02', ts2='0.13', photon_index_error='0.00', photon_index='2.54' WHERE bin_id='937' AND source_name='4FGL J2040.5-1705' AND cadence='weekly'; Database successfully updated. Analysis Complete. Tue Jul 21 18:47:03 PDT 2026 source GAL_V02 Working on... /lscratch/kocevski/32672701/ft1_filtered_4FGL_J2040.5-1705_weekly_bin937.fits.....................! real 48.45 user 46.01 sys 1.06 Creating the likelihood object... obs = UnbinnedObs('/lscratch/kocevski/32672701/ft1_filtered_4FGL_J2040.5-1705_weekly_bin937.fits', '/lscratch/kocevski/32672701/ft2_4FGL_J2040.5-1705_weekly_bin937.fits', expMap='/lscratch/kocevski/32672701/expmap_805680001_806284801_4FGL_J2040.5-1705_weekly_bin937.fits', expCube='/lscratch/kocevski/32672701/ltcube_805680001_806284801_4FGL_J2040.5-1705_weekly_bin937.fits', irfs='P8R3_SOURCE_V2') like = UnbinnedAnalysis(obs, '/lscratch/kocevski/32672701/Model_4FGL_J2040.5-1705_weekly_bin937.xml', optimizer='MINUIT') Using source of interest name: '4FGL J2040.5-1705' 4FGL J2040.5-1705 Spectrum: PowerLaw 323 Prefactor: 1.223e+00 0.000e+00 0.000e+00 1.000e+06 ( 1.000e-12) 324 Index: 2.541e+00 0.000e+00 0.000e+00 1.000e+01 (-1.000e+00) fixed 325 Scale: 7.724e+02 0.000e+00 3.000e+01 5.000e+05 ( 1.000e+00) fixed Likelihood Fit Parameters: Event file(s): /lscratch/kocevski/32672701/ft1_filtered_4FGL_J2040.5-1705_weekly_bin937.fits Spacecraft file(s): /lscratch/kocevski/32672701/ft2_4FGL_J2040.5-1705_weekly_bin937.fits Exposure map: /lscratch/kocevski/32672701/expmap_805680001_806284801_4FGL_J2040.5-1705_weekly_bin937.fits Exposure cube: /lscratch/kocevski/32672701/ltcube_805680001_806284801_4FGL_J2040.5-1705_weekly_bin937.fits IRFs: P8R3_SOURCE_V2 Source model file: /lscratch/kocevski/32672701/Model_4FGL_J2040.5-1705_weekly_bin937.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) = 15663.34536 Fit tolerance = 0.0001 Performing likelihood fit... Done. MINUIT Return Code (Fixed Index): 0 logL (Fixed Index) = 15663.3294219 Fit tolerance = 1e-08 Performing likelihood fit... ********** ** 14 **SET NOWARN ********** PARAMETER DEFINITIONS: NO. NAME VALUE STEP SIZE LIMITS 1 'Prefactor ' 27.180 1.0000 .0000 .10000E+07 2 'Prefactor ' .92154E-06 1.0000 .0000 .10000E+07 3 'norm ' 12.946 1.0000 .0000 .10000E+07 4 'norm ' .22881E-03 1.0000 .0000 .10000E+07 5 'Prefactor ' 45.518 1.0000 .0000 .10000E+07 6 'norm ' 7.2575 1.0000 .0000 .10000E+07 7 'norm ' .39917E-03 1.0000 .0000 .10000E+07 8 'norm ' .58425 1.0000 .0000 .10000E+07 9 'Prefactor ' .14597E-01 1.0000 .0000 .10000E+07 10 'Prefactor ' .19436E-04 1.0000 .0000 .10000E+07 11 'norm ' .36435E-05 1.0000 .0000 .10000E+07 12 'Prefactor ' .14462E-05 1.0000 .0000 .10000E+07 13 'norm ' .17473E-02 1.0000 .0000 .10000E+07 14 'Prefactor ' 4.5498 1.0000 .0000 .10000E+07 15 'Prefactor ' .17489E-03 1.0000 .0000 .10000E+07 16 'Prefactor ' .26966E-05 1.0000 .0000 .10000E+07 17 'Normalizat' 1.1449 1.0000 .10000E-01 10.000 18 'Prefactor ' .94754 1.0000 .0000 10.000 ********** ** 15 **SET ERR .5000 ********** ********** ** 16 **SET GRAD 1.000 ********** ********** ** 17 **MINIMIZE .5990E+05 .2000E-04 ********** MIGRAD MINIMIZATION HAS CONVERGED. FCN= 15663.33 FROM MIGRAD STATUS=CONVERGED 111 CALLS 1303 TOTAL EDM= .13E-08 STRATEGY=1 ERROR MATRIX UNCERTAINTY= 1.5% EXT PARAMETER STEP FIRST NO. NAME VALUE ERROR SIZE DERIVATIVE 1 Prefactor 27.514 23.853 .36203E-05 -.37680E-01 2 Prefactor .0000 1.0967 .85330E-07** at limit ** 3 norm 12.934 1.9348 .16504E-06 .11015E-02 4 norm .56943E-06 2.5766 .13061E-05** at limit ** 5 Prefactor 45.472 7.3430 -.90024E-06 .10186 6 norm 7.2624 8.9674 .72105E-06 .11599E-01 7 norm .17641E-06 4.3593 -.85817E-06** at limit ** 8 norm .58478 .59427 -.24926E-06 -.38855E-02 9 Prefactor .57176E-08 25.614 .40761E-05** at limit ** 10 Prefactor .64393E-08 4.3319 -.22778E-05** at limit ** 11 norm .0000 .71862 .36819E-06** at limit ** 12 Prefactor .10449E-05 1.9665 .13600E-05** at limit ** 13 norm .86986E-07 5.8204 -.93575E-08** at limit ** 14 Prefactor 4.5107 4.5073 -.68535E-07 -.11571E-02 15 Prefactor .52797E-06 2.5737 -.46901E-06** at limit ** 16 Prefactor .44020E-07 2.5431 .35872E-06** at limit ** 17 Normalizat 1.1455 .19202 .98793E-05 -.13357E-05 18 Prefactor .94741 .82283E-01 -.32207E-05 .25237E-04 ERR DEF= .500 Final values: Prefactor = 27.5144 Prefactor = 0 norm = 12.9337 norm = 5.69433e-07 Prefactor = 45.4721 norm = 7.26237 norm = 1.76414e-07 norm = 0.584784 Prefactor = 5.71765e-09 Prefactor = 6.43929e-09 norm = 0 Prefactor = 1.04494e-06 norm = 8.6986e-08 Prefactor = 4.5107 Prefactor = 5.27967e-07 Prefactor = 4.40203e-08 Normalizat = 1.1455 Prefactor = 0.947411 ********** ** 18 **HESSE ********** FCN= 15663.33 FROM HESSE STATUS=OK 284 CALLS 1587 TOTAL EDM= .14E-05 STRATEGY= 1 ERROR MATRIX ACCURATE EXT PARAMETER INTERNAL INTERNAL NO. NAME VALUE ERROR STEP SIZE VALUE 1 Prefactor 27.514 27.381 .19185E-03 -1.5603 2 Prefactor .0000 1.0732 .42118E-03 -1.5708 WARNING - - ABOVE PARAMETER IS AT LIMIT. 3 norm 12.934 10.780 .27814E-03 -1.5636 4 norm .56943E-06 5.5041 .42118E-03 -1.5708 WARNING - - ABOVE PARAMETER IS AT LIMIT. 5 Prefactor 45.472 65.823 .14823E-03 -1.5573 6 norm 7.2624 9.0027 .37209E-03 -1.5654 7 norm .17641E-06 4.8535 .42118E-03 -1.5708 WARNING - - ABOVE PARAMETER IS AT LIMIT. 8 norm .58478 .59636 .70651E-03 -1.5693 9 Prefactor .57176E-08 25.387 .42118E-03 -1.5708 WARNING - - ABOVE PARAMETER IS AT LIMIT. 10 Prefactor .64393E-08 4.3301 .42118E-03 -1.5708 WARNING - - ABOVE PARAMETER IS AT LIMIT. 11 norm .0000 .71799 .42118E-03 -1.5708 WARNING - - ABOVE PARAMETER IS AT LIMIT. 12 Prefactor .10449E-05 1.5999 .52837E-02 -1.5708 WARNING - - ABOVE PARAMETER IS AT LIMIT. 13 norm .86986E-07 6.6928 .42118E-03 -1.5708 WARNING - - ABOVE PARAMETER IS AT LIMIT. 14 Prefactor 4.5107 4.5086 .47171E-03 -1.5665 15 Prefactor .52797E-06 6.1149 .42118E-03 -1.5708 WARNING - - ABOVE PARAMETER IS AT LIMIT. 16 Prefactor .44020E-07 5.8685 .42118E-03 -1.5708 WARNING - - ABOVE PARAMETER IS AT LIMIT. 17 Normalizat 1.1455 .16124 .81337E-01 -.88304 18 Prefactor .94741 .68927E-01 .45608E-01 -.94504 ERR DEF= .500 Minuit fit quality: 3 estimated distance: 1.37354e-06 Minuit parameter uncertainties: 1 27.3811 2 3.82704e-06 3 10.7802 4 0.00354072 5 65.824 6 9.00275 7 0.00185057 8 0.596358 9 0.000762691 10 0.000334273 11 4.73976e-06 12 0.00258599 13 0.00152581 14 4.50858 15 0.00359362 16 0.00101623 17 0.16131 18 0.0689338 Done. MINUIT Return Code (Fixed Index): 0 logL (Fixed Index) = 15663.3288044 Extracting fit parameters... 4FGL J2040.5-1705 Spectrum: PowerLaw 323 Prefactor: 1.045e-06 2.586e-03 0.000e+00 1.000e+06 ( 1.000e-12) 324 Index: 2.541e+00 0.000e+00 0.000e+00 1.000e+01 (-1.000e+00) fixed 325 Scale: 7.724e+02 0.000e+00 3.000e+01 5.000e+05 ( 1.000e+00) fixed GAL_V02 Spectrum: PowerLaw 596 Prefactor: 9.474e-01 6.893e-02 0.000e+00 1.000e+01 ( 1.000e+00) 597 Index: 0.000e+00 0.000e+00 -1.000e+00 1.000e+00 ( 1.000e+00) fixed 598 Scale: 1.000e+02 0.000e+00 5.000e+01 2.000e+02 ( 1.000e+00) fixed EG_v02 Spectrum: FileFunction 595 Normalization: 1.145e+00 1.613e-01 1.000e-02 1.000e+01 ( 1.000e+00) TS (Fixed Index): -0.00 Ra Dec: 310.136 -17.090 Photon Flux Upper Limit: 7.87794295726e-08 ph cm-2 s-1 Energy Flux Upper Limit: 0.00614317940108 MeV cm-2 s-1 Saving results to: /lscratch/kocevski/32672701/likelihoodResults_805680001_806284801_4FGL_J2040.5-1705_weekly_bin937.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) = 15663.3015945 delta logL = 0.0272098802143 Fit tolerance = 0.0001 Performing likelihood fit... Done. MINUIT Return Code (Free Index): 102 logL (Free Index) = 15663.2708588 delta logL = 0.0579455266106 Fit tolerance = 1e-08 Performing likelihood fit... ********** ** 14 **SET NOWARN ********** PARAMETER DEFINITIONS: NO. NAME VALUE STEP SIZE LIMITS 1 'Prefactor ' .23447 1.0000 .0000 .10000E+07 2 'Index ' 3.7593 1.0000 .0000 10.000 3 'Normalizat' 1.1248 1.0000 .10000E-01 10.000 4 'Prefactor ' .95179 1.0000 .0000 10.000 ********** ** 15 **SET ERR .5000 ********** ********** ** 16 **SET GRAD 1.000 ********** ********** ** 17 **MINIMIZE .5990E+05 .2000E-04 ********** MIGRAD MINIMIZATION HAS CONVERGED. MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX. FCN= 15663.27 FROM MIGRAD STATUS=CONVERGED 66 CALLS 360 TOTAL EDM= .88E-08 STRATEGY= 1 ERR MATRIX NOT POS-DEF EXT PARAMETER APPROXIMATE STEP FIRST NO. NAME VALUE ERROR SIZE DERIVATIVE 1 Prefactor .23523 1.4177 .23998E-02** at limit ** 2 Index 3.7578 .55485 .50000 .13513E-04 3 Normalizat 1.1247 .96804E-02 .82001E-01 .37891E-04 4 Prefactor .95198 .41287E-02 .45662E-01 -.54368E-05 ERR DEF= .500 Final values: Prefactor = 0.23523 Index = 3.75779 Normalizat = 1.12465 Prefactor = 0.951976 ********** ** 18 **HESSE ********** FCN= 15663.27 FROM HESSE STATUS=NOT POSDEF 33 CALLS 393 TOTAL EDM= .13E-07 STRATEGY= 1 ERR MATRIX NOT POS-DEF EXT PARAMETER APPROXIMATE INTERNAL INTERNAL NO. NAME VALUE ERROR STEP SIZE VALUE 1 Prefactor .23523 90.210 .12624E-03 -1.5698 WARNING - - ABOVE PARAMETER IS AT LIMIT. 2 Index 3.7578 8.1145 .60864E-02 -.25107 3 Normalizat 1.1247 .13731 .36304E-03 -.88964 4 Prefactor .95198 .54423E-01 .16595E-03 -.94348 ERR DEF= .500 Minuit fit quality: 2 estimated distance: 1.31618e-08 Minuit parameter uncertainties: 1 9.21317 2 21.2548 3 0.137354 4 0.0544262 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) = 15663.2708534 delta logL = 0.057950932156 Extracting fit parameters... 4FGL J2040.5-1705 Spectrum: PowerLaw 323 Prefactor: 2.352e-01 9.213e+00 0.000e+00 1.000e+06 ( 1.000e-12) 324 Index: 3.758e+00 2.125e+01 0.000e+00 1.000e+01 (-1.000e+00) 325 Scale: 7.724e+02 0.000e+00 3.000e+01 5.000e+05 ( 1.000e+00) fixed GAL_V02 Spectrum: PowerLaw 596 Prefactor: 9.520e-01 5.443e-02 0.000e+00 1.000e+01 ( 1.000e+00) 597 Index: 0.000e+00 0.000e+00 -1.000e+00 1.000e+00 ( 1.000e+00) fixed 598 Scale: 1.000e+02 0.000e+00 5.000e+01 2.000e+02 ( 1.000e+00) fixed EG_v02 Spectrum: FileFunction 595 Normalization: 1.125e+00 1.374e-01 1.000e-02 1.000e+01 ( 1.000e+00) TS (Free Index): -0.00 Ra Dec: 310.136 -17.090 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/32672701/cmap_HighResolution_805680001_806284801_4FGL_J2040.5-1705_weekly_bin937.png Cleaning up... ** Nuclear option initiated! ** Updating database... UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='6.14e-03', job_status='DONE', photon_flux_upper_limit='7.88e-08', time_completed='2026-07-21 18:49:13.639954', job_id='32672701', GAL2='0.95', fit_tolerance='1e-08', EG2='1.12', EG='1.15', time_epoch_completed='1784684953.64', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.95', dlogl='5.80e-02', ts2='0.13', photon_index_error='0.00', photon_index='2.54' WHERE bin_id='937' AND source_name='4FGL J2040.5-1705' AND cadence='weekly'; Database successfully updated. Analysis Complete. Tue Jul 21 18:49:14 PDT 2026