pysdic.AffineParametrization._decode#

AffineParametrization._decode(p_o, *, dp=False)[source]#

Apply the inverse affine map to output parameters \(\vec{p_o}\).

\[\vec{p_i} = \mathbf{M}^{-1} (\vec{p_o} - \vec{p_0})\]
\[\mathbf{J}_p = \mathbf{M}^{-1}\]

Note

This method is only available if \(\mathbf{M}\) is invertible (i.e. has_decode is True).

Parameters:
  • p_o (numpy.ndarray) – A 1D array of shape \((n_o,)\) containing the output parameters to decode.

  • dp (bool, optional (default: False)) – Whether to compute the Jacobian with respect to the output parameters.

Returns:

A tuple containing:

  • The decoded input parameters as a 1D array of shape \((n_i,)\).

  • The Jacobian matrix with respect to the output parameters as a 2D array of shape \((n_i, n_o)\), or None if not computed.

Return type:

Tuple[numpy.ndarray, Optional[numpy.ndarray]]