pystra.transformation.Transformation#

class Transformation(transform_type=None)[source]#

Bases: object

Nataf 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

Compute the Isoprobabilistic Transformation using the chosen method

jacobian

Jacobian of the u-to-x transformation, J_{u,x}.

u_to_x

Transformation from u (standard normal) to x (physical) space.

x_to_u

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 that x[i] yields a scalar, which is what the marginal x_to_u methods 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 marginal u_to_x calls.

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 marginal jacobian(z_i, x_i) returns a diagonal np.ndarray via np.diag(), even when called with scalar arguments — in that case the result is a (1, 1) matrix. We wrap the scalar inputs with np.atleast_1d so that np.diag receives a 1-D array (it raises ValueError on 0-d input), and then extract the single element with .item() for assignment into the composite Jacobian.

compute(Ro)[source]#

Compute the Isoprobabilistic Transformation using the chosen method