moment¶
- specutils.analysis.moment(spectrum, regions=None, order=0, axis=-1)[source]¶
Estimate the moment of the spectrum.
- Parameters:
- spectrum
Spectrum1D
The spectrum object over which the width will be calculated.
- regions: `~specutils.SpectralRegion` or list of `~specutils.SpectralRegion`
Region within the spectrum to calculate the gaussian sigma width. If regions is
None
, computation is performed over entire spectrum.- orderint
The order of the moment to be calculated. Default=0
- axisint
Axis along which a moment is calculated. Default=-1, computes along the last axis (spectral axis).
- spectrum
- Returns:
- moment:
float
or list (based on region input) Moment of the spectrum. Returns None if (order < 0 or None)
- moment: