I/O and configuration (wcc_etc.io)
- wcc_etc.io.read_config(filename, source='config')[source]
Read a single configuration file.
If the input filename does not specifically include a path, it will be looked for in the default PACKAGE_PATH directory.
Currently, only .toml configuration files are supported.
- Parameters:
- Returns:
Configuration as a nested dictionary.
- Return type:
- Raises:
ValueError – If no extension is associated with the given filename.
NotImplementedError – If the configuration file extension is not supported.
- wcc_etc.io.get_sensor_config(kind, band, **kwargs)[source]
Get sensor configuration for a specific detector kind and band.
- Parameters:
- Returns:
The combined configuration dictionary.
- Return type:
- Raises:
ValueError – If the specified band is not available for the sensor kind.
NotImplementedError – If the throughput curve for the specified band is not yet implemented.
- wcc_etc.io.resolve_bandpass(bandpass)[source]
Resolve a bandpass to a synphot SpectralElement.
Local SDSS filters (
'sdss_u','sdss_g','sdss_r','sdss_i','sdss_z'; case-insensitive) are loaded from package data. Any other string defers to synphot’s built-inSpectralElement.from_filter(e.g.'johnson_v'). ASpectralElementis returned unchanged.- Parameters:
bandpass (str or SpectralElement) – The bandpass name or object.
- Return type:
synphot.SpectralElement