tv_gauge_residual ================= .. py:function:: t3toolbox.backend.tv_operations.tv_gauge_residual(frame, variations) .. code-block:: python def tv_gauge_residual( frame: typ.Tuple[ typ.Sequence[NDArray], # up_tucker_cores typ.Sequence[NDArray], # down_tt_cores typ.Sequence[NDArray], # left_tt_cores typ.Sequence[NDArray], # right_tt_cores ], variations: typ.Tuple[ typ.Sequence[NDArray], # tucker_variations typ.Sequence[NDArray], # tt_variations ], ) -> NDArray: # shape = variation stack_shape (K+C); per stack element (scalar/0-d when unstacked) Max violation of the gauge conditions for a tangent vector, **per stack element**. The gauged tangent space requires each tucker variation orthogonal to its up-core, and each left-interior tt variation orthogonal to its left-core (see :py:func:`tv_orthogonal_gauge_projection`). Returns the max absolute gauge inner product reduced over the **non-stack** axes (shape = the variation stack ``K+C``); a caller thresholds it (``<= atol``).