OneDSpectrum¶
-
class
spectral_cube.lower_dimensional_structures.OneDSpectrum[source]¶ Bases:
spectral_cube.lower_dimensional_structures.LowerDimensionalObject,spectral_cube.base_class.SpectralAxisMixinClassAttributes Summary
hduhdulistheaderspectral_axisA Quantityarray 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
Quantityarray 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.plotParameters: 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 :
Kernel1DA 1D kernel from astropy
convolve : function
The astropy convolution function to use, either
astropy.convolution.convolveorastropy.convolution.convolve_fftkwargs : dict
Passed to the convolve function
-