Skip to content

Commit 8c4ec88

Browse files
committed
fix get_supported_channels for single-channel instruments
Instruments without `channels:` in config.yaml (HERMES, and the defaults base) had get_supported_channels() returning None, causing test_channelinfo / test_sort_files to fail on `for channel in None`. CRIRES_PLUS and METIS_IFU avoided it by overriding the method; the base class now falls back to [None] so the single-channel case iterates once with channel=None.
1 parent 8476395 commit 8c4ec88

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

pyreduce/instruments/common.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -892,7 +892,9 @@ def get_wavecal_filename(self, header, channel, **kwargs):
892892
return fname
893893

894894
def get_supported_channels(self):
895-
return self.channels
895+
# Single-channel instruments with no `channels:` in config.yaml
896+
# iterate once with channel=None.
897+
return self.channels or [None]
896898

897899
def get_settings_fallbacks(self, channel):
898900
"""Return channel names to try when looking up settings files.

0 commit comments

Comments
 (0)