SpectrumCollection¶
-
class
specutils.spectra.spectrum_collection.
SpectrumCollection
(flux, spectral_axis=None, wcs=None, uncertainty=None, mask=None, meta=None)[source]¶ Bases:
object
A class to represent a heterogeneous set of spectra that are the same length but have different spectral axes. Spectra that meet this requirement can be stored as multidimensional arrays, and thus can have operations performed on them faster than if they are treated as individual
Spectrum1D
objects.The attributes on this class uses the same names and conventions as
Spectrum1D
, allowing some operations to work the same. Where this does not work, the user can use standard indexing notation to access individualSpectrum1D
objects.Parameters: flux :
astropy.units.Quantity
The flux data. The trailing dimension should be the spectral dimension.
spectral_axis :
astropy.units.Quantity
The spectral axes of the spectra (e.g., wavelength). Must match the dimensionality of
flux
.wcs : wcs object or None
A wcs object (if available) for the collection of spectra. The object must follow standard indexing rules to get a sub-wcs if it is provided.
uncertainty :
astropy.nddata.NDUncertainty
or ndarrayThe uncertainties associated with each spectrum of the collection. In the case that only an n-dimensional quantity or ndaray is provided, the uncertainties are assumed to be standard deviations. Must match the dimensionality of
flux
.mask : ndarray or None
The n-dimensional mask information associated with each spectrum. If present, must match the dimensionality of
flux
.meta : list
The list of dictionaries containing meta data to be associated with each spectrum in the collection.
Attributes Summary
energy
The spectral axis as an energy Quantity
(in eV).flux
The flux in the spectrum as a Quantity
.frequency
The spectral axis as a frequency Quantity
(in GHz).mask
The mask array for the spectrum. meta
A dictionary of metadata for theis spectrum collection, or None
.ndim
The dimensionality of the collection. nspectral
The length of the spectral dimension. shape
The shape of the collection. spectral_axis
The spectral axes as a Quantity
.uncertainty
The uncertainty in the spectrum as a Quantity
.wavelength
The spectral axis as a wavelength Quantity
(in Angstroms).wcs
The WCS’s as an object array Methods Summary
from_spectra
(spectra)Create a spectrum collection from a set of individual specutils.Spectrum1D
objects.Attributes Documentation
-
mask
¶ The mask array for the spectrum.
-
ndim
¶ The dimensionality of the collection. This is not the same as the dimensionality of the flux et al., because the trailing (spectral) dimension is not included here.
-
nspectral
¶ The length of the spectral dimension.
-
shape
¶ The shape of the collection. This is not the same as the shape of the flux et al., because the trailing (spectral) dimension is not included here.
-
wcs
¶ The WCS’s as an object array
Methods Documentation
-