SpectrumCollection¶
-
class
specutils.spectra.spectrum_collection.SpectrumCollection(flux, spectral_axis=None, wcs=None, uncertainty=None, mask=None, meta=None)[source]¶ Bases:
objectA 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
Spectrum1Dobjects.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 individualSpectrum1Dobjects.Parameters: flux :
astropy.units.QuantityThe flux data. The trailing dimension should be the spectral dimension.
spectral_axis :
astropy.units.QuantityThe 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.NDUncertaintyor 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
energyThe spectral axis as an energy Quantity(in eV).fluxThe flux in the spectrum as a Quantity.frequencyThe spectral axis as a frequency Quantity(in GHz).maskThe mask array for the spectrum. metaA dictionary of metadata for theis spectrum collection, or None.ndimThe dimensionality of the collection. nspectralThe length of the spectral dimension. shapeThe shape of the collection. spectral_axisThe spectral axes as a Quantity.uncertaintyThe uncertainty in the spectrum as a Quantity.wavelengthThe spectral axis as a wavelength Quantity(in Angstroms).wcsThe WCS’s as an object array Methods Summary
from_spectra(spectra)Create a spectrum collection from a set of individual specutils.Spectrum1Dobjects.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
-