pysdic.TransformationResult#

The pysdic.TransformationResult provides a standardized way to manage the results of transformation operations: the transformed points x and the Jacobian matrices jacobian_dx and jacobian_dp (or None if not computed).

See also

  • pysdic.Transformation: The base class for transformations, which defines the interface for applying and inverting transformations.

TransformationResult class#

class TransformationResult(x, jacobian_dx=None, jacobian_dp=None)[source]#

A class to represent the result of a transformation.

This class is used to store the results of a transformation, including the transformed points and the Jacobian matrices.

See also

Lets \(T\) be a transformation that maps input points \(\vec{x_i}\) from an input space \(\mathbb{R}^{n_i}\) to output points \(\vec{x_o}\) in an output space \(\mathbb{R}^{n_o}\) with parameters \(\vec{p}\). Then the result of applying the transformation can be represented as a pysdic.TransformationResult object with the following attributes:

Parameters:
  • x (numpy.ndarray) – The transformed points \(\vec{x_o}\) after applying the transformation. Shape \((\dots, n_o)\).

  • jacobian_dx (Optional[numpy.ndarray]) – The Jacobian matrix with respect to the input points \(\vec{x_i}\), or None if not computed. Shape \((\dots, n_o, n_i)\).

  • jacobian_dp (Optional[numpy.ndarray]) – The Jacobian matrix with respect to the parameters of the transformation \(\vec{p}\), or None if not computed. Shape \((\dots, n_o, n_p)\).

  • note:: (..) – For the result of the invert method, the roles of the input and output spaces are swapped: x has shape \((\dots, n_i)\), jacobian_dx has shape \((\dots, n_i, n_o)\) and jacobian_dp has shape \((\dots, n_i, n_p)\).