with_subspace

Contents

with_subspace#

pygrog.gadgets.with_subspace(base_op, subspace_basis, encoding_axis=-4, *, toeplitz=None)[source]#

Wrap a SparseFFT or MaskedFFT operator with subspace projection.

Parameters:
  • base_op (SparseFFT | MaskedFFT) – Underlying operator with a multi-dim natural_shape containing the temporal axis.

  • subspace_basis (array-like, complex) – (K, T) subspace basis matrix.

  • encoding_axis (int) – Axis (in the full sparse-tensor layout) carrying T. Default -4 matches (*batch, C, T, k1, k0, kw).

  • toeplitz (bool | None, optional) – Use Toeplitz embedding for normal(). None inherits from base_op.toeplitz.