Python API

This page contains a auto-generated summary of astropy-xarray’s API.

Dataset

xarray.Dataset.astropy.quantify([units])

Attach units to the variables of the Dataset.

xarray.Dataset.astropy.dequantify([format])

Convert units from the Dataset to string attributes.

xarray.Dataset.astropy.interp([coords, ...])

unit-aware version of interp

xarray.Dataset.astropy.interp_like(other[, ...])

unit-aware version of interp_like

xarray.Dataset.astropy.reindex([indexers, ...])

unit-aware version of reindex

xarray.Dataset.astropy.reindex_like(other[, ...])

unit-aware version of reindex_like

xarray.Dataset.astropy.drop_sel([labels, ...])

unit-aware version of drop_sel

xarray.Dataset.astropy.sel([indexers, ...])

unit-aware version of sel

xarray.Dataset.astropy.to([units, equivalencies])

convert the quantities in a Dataset

xarray.Dataset.astropy.chunk(chunks[, ...])

unit-aware version of chunk

xarray.Dataset.astropy.ffill(dim[, limit])

unit-aware version of ffill

xarray.Dataset.astropy.bfill(dim[, limit])

unit-aware version of bfill

xarray.Dataset.astropy.interpolate_na([dim, ...])

unit-aware version of interpolate_na

xarray.Dataset.astropy.to_skycoord()

Convert a SkyCoord-based Dataset with metadata attributes to a SkyCoord.

DataArray

xarray.DataArray.astropy.loc

Unit-aware attribute for indexing

xarray.DataArray.astropy.value

the value of the data or the data itself if not a quantity.

xarray.DataArray.astropy.quantify([units])

Attach units to the DataArray.

xarray.DataArray.astropy.dequantify([format])

Convert the units of the DataArray to string attributes.

xarray.DataArray.astropy.interp([coords, ...])

unit-aware version of interp

xarray.DataArray.astropy.interp_like(other)

unit-aware version of interp_like

xarray.DataArray.astropy.reindex([indexers, ...])

unit-aware version of reindex

xarray.DataArray.astropy.reindex_like(other)

unit-aware version of reindex_like

xarray.DataArray.astropy.drop_sel([labels, ...])

unit-aware version of drop_sel

xarray.DataArray.astropy.sel([indexers, ...])

unit-aware version of sel

xarray.DataArray.astropy.to([units, ...])

convert the quantities in a DataArray

xarray.DataArray.astropy.chunk(chunks[, ...])

unit-aware version of chunk

xarray.DataArray.astropy.ffill(dim[, limit])

unit-aware version of ffill

xarray.DataArray.astropy.bfill(dim[, limit])

unit-aware version of bfill

xarray.DataArray.astropy.interpolate_na([...])

unit-aware version of interpolate_na

Coordinates

astropy_xarray.coordinates.dataset_to_skycoord(ds)

Convert a SkyCoord-based Dataset with metadata attributes to a SkyCoord.

astropy_xarray.coordinates.skycoord_to_dataset(...)

Convert a SkyCoord object to an xarray Dataset.

astropy_xarray.coordinates.load_frame(frame_dict)

astropy_xarray.coordinates.load_representation(...)

Testing

astropy_xarray.testing.assert_units_equal(a, b)

assert that the units of two xarray objects are equal