pycvcam.TransformModal._inverse_transform#
- TransformModal._inverse_transform(points, *, dx=False, dp=False, **kwargs)[source]#
Apply the inverse of the modal transformation to a set of input points.
This method delegates to the original transformation’s
_inverse_transformmethod, since the original parameters are already updated according to the modal coefficients.The Jacobian with respect to the modal coefficients can be computed as:
\[\frac{\partial T^{-1}}{\partial \alpha_i} = \frac{\partial T^{-1}}{\partial p} \cdot M^T\]where \(\frac{\partial T^{-1}}{\partial p}\) is the Jacobian with respect to the original parameters, and \(M\) is the modes matrix of shape (n_modes, n_params).
- Parameters:
points (numpy.ndarray) – Input points to be inverse transformed. Shape (n_points, output_dim).
dx (bool, optional) – If True, compute the Jacobian of the inverse transformed points with respect to the input points. Default is False.
dp (bool, optional) – If True, compute the Jacobian of the inverse transformed points with respect to the modal coefficients. Default is False.
**kwargs – Additional keyword arguments to be passed to the original transformation’s _inverse_transform method.
- Returns:
A tuple containing:
inverse_transformed_points: The inverse transformed points of shape (n_points, input_dim).
jacobian_dx: The Jacobian with respect to the input points, shape (n_points, input_dim, output_dim) if dx=True, otherwise None.
jacobian_dp: The Jacobian with respect to the modal coefficients, shape (n_points, input_dim, n_modes) if dp=True, otherwise None.
- Return type:
Tuple[numpy.ndarray, Optional[numpy.ndarray], Optional[numpy.ndarray]]