odatse.util.mapping module

class odatse.util.mapping.Affine(A: ndarray | None = None, b: ndarray | None = None)[source]

Bases: MappingBase

An affine mapping defined by a matrix A and a vector b.

Initialize the affine mapping.

Parameters:
  • A (np.ndarray, optional) – Transformation matrix.

  • b (np.ndarray, optional) – Translation vector.

__init__(A: ndarray | None = None, b: ndarray | None = None)[source]

Initialize the affine mapping.

Parameters:
  • A (np.ndarray, optional) – Transformation matrix.

  • b (np.ndarray, optional) – Translation vector.

classmethod from_dict(d)[source]

Create an Affine instance from a dictionary.

Parameters:

d (dict) – Dictionary containing ‘A’ and ‘b’ keys.

Returns:

An instance of the Affine class.

Return type:

Affine

class odatse.util.mapping.MappingBase[source]

Bases: object

Base class for mapping operations.

class odatse.util.mapping.TrivialMapping[source]

Bases: MappingBase

A trivial mapping that returns the input array unchanged.