cedalion.typing

Type aliases for Cedalion dataclasses.

Cedalion relies as much as possible on generic data types (like xarray DataArrays). We then use type aliases and annotations to augment these data types with additional information about the data they carry. For DataArrays there is a basic mechanism to specify and validate data schemas that specify dimension and coordinate names. This way we can distinguish between time series DataArrays (NDTimeSeries) and DataArrays representing points in space (LabeledPointCloud). By using these aliases in type hints we indicate to user which kind of DataArray is expected.

Parameters with physical units are represented by cedalion.Quantity. Aliases are defined to indicate the dimensionality of quantities.

Module Attributes

LabeledPointCloud

DataArrays representing labeled points in space.

NDTimeSeries

DataArrays representing time series.

AffineTransform

4x4 DataArrays representing affine transformations.

QTime

Quantities with units of time

QLength

Quantities with units of length

QFrequency

Quantities with units of frequency

cedalion.typing.LabeledPointCloud[source]

DataArrays representing labeled points in space.

alias of Annotated[DataArray, DataArraySchema(dims=(‘label’,), coords=((‘label’, (‘label’, ‘type’)),))]

cedalion.typing.NDTimeSeries[source]

DataArrays representing time series.

alias of Annotated[DataArray, DataArraySchema(dims=(‘time’,), coords=((‘time’, (‘time’, ‘samples’)),))]

cedalion.typing.AffineTransform[source]

4x4 DataArrays representing affine transformations.

cedalion.typing.QTime[source]

Quantities with units of time

alias of Annotated[Quantity, ‘[time]’]

cedalion.typing.QLength[source]

Quantities with units of length

alias of Annotated[Quantity, ‘[length]’]

cedalion.typing.QFrequency[source]

Quantities with units of frequency

alias of Annotated[Quantity, ‘[frequency]’]