xarray_cube.cube module

class xarray_cube.cube.Cube(data: Union[xarray_dataclasses.typing.Collection[Tuple[Literal['s'], Literal['y'], Literal['x']], Any], Any], header: Union[xarray_dataclasses.typing.Collection[Tuple[()], str], str] = '', type: str = '', units: str = '', s: Union[xarray_cube.cube.SAxis, Any] = 0, y: Union[xarray_cube.cube.YAxis, Any] = 0, x: Union[xarray_cube.cube.XAxis, Any] = 0)[source]

Bases: xarray_dataclasses.dataarray.AsDataArray

Spectral cube in astronomy.

data: Union[xarray_dataclasses.typing.Collection[Tuple[Literal['s'], Literal['y'], Literal['x']], Any], Any]

Cube data as a three-dimensional array.

header: Union[xarray_dataclasses.typing.Collection[Tuple[()], str], str] = ''

Cube header. Defaults to an empty FITS header.

s: Union[xarray_cube.cube.SAxis, Any] = 0

Pixel coordinate of the spectral axis.

type: str = ''

Cube type. Defaults to BTYPE in the header.

units: str = ''

Cube units. Defaults to BUNIT in the header.

x: Union[xarray_cube.cube.XAxis, Any] = 0

Pixel coordinate of the longitude axis.

y: Union[xarray_cube.cube.YAxis, Any] = 0

Pixel coordinate of the latitude axis.