Skip to content

Commit 3d0f1f8

Browse files
author
David Turner
committed
Fixed a problem with the _get_phot_prod method in BaseSource, so that if combined PSF corrected images/ratemaps are requested, it will actually generate the extra search key necessary to find them (it would only work for image and ratemap prod types before)
Signed-off-by: David Turner <djturner@umbc.edu>
1 parent 577bc39 commit 3d0f1f8

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

xga/sources/base.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# This code is part of X-ray: Generate and Analyse (XGA), a module designed for the XMM Cluster Survey (XCS).
2-
# Last modified by David J Turner (djturner@umbc.edu) 5/7/26, 12:30 PM. Copyright (c) The Contributors.
2+
# Last modified by David J Turner (djturner@umbc.edu) 5/8/26, 11:20 AM. Copyright (c) The Contributors.
33

44
import contextlib
55
import gc
@@ -2285,7 +2285,9 @@ def _get_phot_prod(self, prod_type: str, obs_id: str = None, inst: str = None, l
22852285
f" None or BOTH an Astropy quantity.")
22862286

22872287
# If we are looking for a PSF corrected image/ratemap then we assemble the extra key with PSF details
2288-
if psf_corr and prod_type in ["image", "ratemap"]:
2288+
# The use of np.char like that means we can catch when the product type has been
2289+
# passed as 'combined_image' and 'combined_ratemap' as well
2290+
if psf_corr and (np.char.find(prod_type, ['image', 'ratemap']) != -1).any():
22892291
extra_key = "_" + psf_model + "_" + str(psf_bins) + "_" + psf_algo + str(psf_iter)
22902292

22912293
if not psf_corr and with_lims:

0 commit comments

Comments
 (0)