Skip to content

Commit

Permalink
I may have had an inadvertent effect adding the attitude files to the…
Browse files Browse the repository at this point in the history
… combined instrument entry when reading in _initial_products - that output dictionary is used to build the valid instruments information for each ObsID, and never had 'combined' in before (that was never meant to appear in the self.instruments property - for instance). Now made sure that when ._obs is constructed the combined 'instrument' is ignored.
  • Loading branch information
DavidT3 committed Mar 3, 2025
1 parent 24c3e51 commit fc723ec
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions xga/sources/base.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This code is a part of X-ray: Generate and Analyse (XGA), a module designed for the XMM Cluster Survey (XCS).
# Last modified by David J Turner ([email protected]) 03/03/2025, 16:57. Copyright (c) The Contributors
# Last modified by David J Turner ([email protected]) 03/03/2025, 17:12. Copyright (c) The Contributors

import os
import pickle
Expand Down Expand Up @@ -294,7 +294,8 @@ def __init__(self, ra: float, dec: float, redshift: float = None, name: str = No
# NOTE that this attribute has changed considerably since the pre-multi mission version of XGA, as the
# instruments attribute has been consolidated into it - plus there is an extra level for telescope names
self._obs = {t: {o: obs[t][o] if COMBINED_INSTS[t] else [i for i in self._products[t][o]
if len(self._products[t][o][i]) != 0]
if len(self._products[t][o][i]) != 0 and
i != 'combined']
for o in self._products[t]} for t in self._products}

# Set the blacklisted observation attribute with our dictionary - if all has gone well then this will be a
Expand Down Expand Up @@ -4129,7 +4130,7 @@ def get_snr(self, outer_radius: Union[Quantity, str], telescope: str, central_co
outer_radius * self._back_inn_factor, obs_id=obs_id,
central_coord=central_coord)

# We use the ratemap's built in signal to noise calculation method
# We use the ratemap's built in signal-to-noise calculation method
sn = rt.signal_to_noise(src_mask, bck_mask, exp_corr, allow_negative)

return sn
Expand Down

0 comments on commit fc723ec

Please sign in to comment.