Spectrum¶
- class sofia_redux.visualization.models.low_model.Spectrum(*args, **kwargs)[source]¶
Bases:
LowModel
Class for holding simple 1D spectra.
- Attributes:
- default_ndimsint
Default data dimensions.
- idstr
Filename associated with the FITS file.
- datanp.ndarray
Data from the FITS HDU.
- kind_namesdict
Extension names associated with particular data kinds.
Methods Summary
convert
(target_unit, wavelength, wavelength_unit)Convert units.
Methods Documentation
- convert(target_unit: str, wavelength: Data, wavelength_unit: str) None [source]¶
Convert units.
- Parameters:
- target_unitstr
Unit to convert to.
- wavelengtharray-like
Wavelength data array associated with current data.
- wavelength_unitstr
Wavelength units.
- Raises:
- ValueError
If conversion cannot be completed.