OneDSpectrum¶
-
class
spectral_cube.lower_dimensional_structures.
OneDSpectrum
[source]¶ Bases:
spectral_cube.lower_dimensional_structures.LowerDimensionalObject
,spectral_cube.base_class.SpectralAxisMixinClass
Attributes Summary
hdu
hdulist
header
spectral_axis
A Quantity
array containing the central values of each channel along the spectral axis.Methods Summary
quicklook
([filename, drawstyle])Plot the spectrum with current spectral units in the currently open spectral_interpolate
(spectral_grid[, ...])Resample the spectrum onto a specific grid spectral_smooth
(kernel[, convolve])Smooth the spectrum with_spectral_unit
(unit[, ...])Attributes Documentation
-
hdu
¶
-
hdulist
¶
-
header
¶
-
spectral_axis
¶ A
Quantity
array containing the central values of each channel along the spectral axis.
Methods Documentation
-
quicklook
(filename=None, drawstyle='steps-mid', **kwargs)[source]¶ Plot the spectrum with current spectral units in the currently open figure
kwargs are passed to
matplotlib.pyplot.plot
Parameters: filename : str or Non
Optional - the filename to save the quicklook to.
-
spectral_interpolate
(spectral_grid, suppress_smooth_warning=False)[source]¶ Resample the spectrum onto a specific grid
Parameters: spectral_grid : array
An array of the spectral positions to regrid onto
suppress_smooth_warning : bool
If disabled, a warning will be raised when interpolating onto a grid that does not nyquist sample the existing grid. Disable this if you have already appropriately smoothed the data.
Returns: cube : SpectralCube
-
spectral_smooth
(kernel, convolve=<function convolve>, **kwargs)[source]¶ Smooth the spectrum
Parameters: kernel :
Kernel1D
A 1D kernel from astropy
convolve : function
The astropy convolution function to use, either
astropy.convolution.convolve
orastropy.convolution.convolve_fft
kwargs : dict
Passed to the convolve function
-