pvextractor.slice_wcs(wcs, spatial_scale)[source]

Slice a WCS header for a spectral cube to a Position-Velocity WCS, with ctype “OFFSET” for the spatial offset direction


wcs : WCS

The WCS of the spectral cube. This should already be sanitized and have the spectral axis along the third dimension.

spatial_scale: :class:`~astropy.units.Quantity`

The spatial scale of the position axis


wcs_slice WCS

The resulting WCS slice