pystra.transformation.Transformation#
- class Transformation(transform_type=None)[source]#
Bases:
objectNataf isoprobabilistic transformation between physical space (x) and standard normal space (u).
The transformation relies on a square-root factorisation of the modified correlation matrix Ro, such that Ro = inv_T @ inv_T^T. Two factorisations are available:
Cholesky (default): Ro = L @ L^T where L is lower-triangular.
SVD: Ro = (U sqrt(D)) @ (U sqrt(D))^T via the eigendecomposition of the symmetric positive-definite matrix Ro.
Both factorisations satisfy the same identity and therefore produce identical reliability results (design point, reliability index beta, failure probability). The intermediate correlated standard-normal vector z = inv_T @ u will in general differ between the two methods, but the final physical-space coordinates x are invariant because x_i = F_i^{-1}( Phi(z_i)) depends only on the marginal mapping.
The SVD factorisation is generally more robust because it avoids computing the explicit inverse of a triangular factor; instead it works with the orthogonal eigenstructure of Ro. It is recommended when Ro is near-singular or poorly conditioned.
Initialization of the Transformation class
Methods
Compute the Isoprobabilistic Transformation using the chosen method
Jacobian of the u-to-x transformation, J_{u,x}.
Transformation from u (standard normal) to x (physical) space.
Transformation from x (physical) to u (standard normal) space.
- x_to_u(x, marg)[source]#
Transformation from x (physical) to u (standard normal) space.
Callers (e.g. FORM, SORM) may pass x as a 1-D array or as a column vector of shape (nrv, 1). Flattening to 1-D with
ravel()ensures thatx[i]yields a scalar, which is what the marginalx_to_umethods expect.
- u_to_x(u, marg)[source]#
Transformation from u (standard normal) to x (physical) space.
As with
x_to_u, the input is flattened to 1-D so that element indexing always produces a scalar for the marginalu_to_xcalls.
- jacobian(u, x, marg)[source]#
Jacobian of the u-to-x transformation, J_{u,x}.
Inputs are flattened to 1-D (see
x_to_u). Each marginaljacobian(z_i, x_i)returns a diagonalnp.ndarrayvianp.diag(), even when called with scalar arguments — in that case the result is a (1, 1) matrix. We wrap the scalar inputs withnp.atleast_1dso thatnp.diagreceives a 1-D array (it raisesValueErroron 0-d input), and then extract the single element with.item()for assignment into the composite Jacobian.