extract_pv_slice¶
-
pvextractor.
extract_pv_slice
(cube, path, wcs=None, spacing=1.0, order=3, respect_nan=True)[source]¶ Given a position-position-velocity cube with dimensions (nv, ny, nx), and a path, extract a position-velocity slice.
- Alternative implementations:
- gipsy::sliceview karma::kpvslice casaviewer::slice
Parameters: cube :
ndarray
orSpectralCube
or str or HDUThe cube to extract a slice from. If this is a plain
ndarray
instance, the WCS information can optionally be specified with thewcs
parameter. If a string, it should be the name of a file containing a spectral cube.path :
Path
or list of 2-tuplesThe path along which to define the position-velocity slice. The path can contain coordinates defined in pixel or world coordinates.
wcs :
WCS
, optionalThe WCS information to use for the cube. This should only be specified if the
cube
parameter is a plainndarray
instance.spacing : float
The position resolution in the final position-velocity slice. This can be given in pixel coordinates or as a
Quantity
instance with angle units.order : int, optional
Spline interpolation order when using paths with zero width. Does not have any effect for paths with a non-zero width.
respect_nan : bool, optional
Returns: slice :
PrimaryHDU
The position-velocity slice, as a FITS HDU object