qblox_scheduler.analysis.helpers#
Helper functions for analysis.
Functions#
Reshapes the acquisitions dataset or dataarray |
Module Contents#
- acq_coords_to_dims(data: xarray.Dataset, coords: list[collections.abc.Hashable], acq_channels: collections.abc.Iterable[collections.abc.Hashable] | None = None) xarray.Dataset[source]#
- acq_coords_to_dims(data: xarray.DataArray, coords: list[collections.abc.Hashable], acq_channels: collections.abc.Iterable[collections.abc.Hashable] | None = None) xarray.DataArray
Reshapes the acquisitions dataset or dataarray so that the given coords become dimensions. It can also reshape from a 1 dimensional data to a multi-dimensional data along the given coords. If a dataset is given, all acquisition channels are reshaped, unless acq_channels are given.
- Parameters:
data – The data to be converted to multi-dimensions. Can be a Dataset or a DataArray.
coords – The coords keys that needs to be converted to dimensions.
acq_channels – In case of a Dataset, these acquisition channels need to be converted.
- Returns:
A DataArray or Dataset that has multi-dimensional dimensions along the specified coords.
- Raises:
ValueError – If there are no coords or if the data does not contain the acquisition index dimension name.