utv_orthogonal_gauge_projection#

t3toolbox.backend.utv_operations.utv_orthogonal_gauge_projection(frame_data, variations_data)#
def utv_orthogonal_gauge_projection(
        frame_data,       # UT3Frame .data
        variations_data,  # UT3Variations .data
):  # -> gauged variations .data (same masks; the tangent VECTOR changes)

Orthogonally project the variations onto the gauge-satisfying subspace (the uniform mirror of tv_operations.tv_orthogonal_gauge_projection()). Removes the component of each Tucker variation parallel to its up-core U and of each left-interior TT variation parallel to its left-core P – the gauge conditions (48)-(49), Appendix A.3 of Alger et al. (2026). The represented tangent vector CHANGES (orthogonal, not oblique).

Mask-once up front (the frame and variation padding zeroed), then mask-agnostic einsums vectorized over the leading mode axis d (a per-core map); the last TT variation is left unchanged (the [:-1] boundary). The output carries the variation’s masks unchanged (gauge preserves the rank structure).