linear_projection#
- mrinufft.trajectories.projection.linear_projection(x: ndarray[tuple[int, ...], dtype[_ScalarType_co]], target: ndarray[tuple[int, ...], dtype[_ScalarType_co]], A: LinearOperator | None = None, mask: ndarray[tuple[int, ...], dtype[_ScalarType_co]] | tuple | None = None) ndarray[tuple[int, ...], dtype[_ScalarType_co]][source]#
Implement the projection on linear constraints set given by Eq 10 in_[Proj].
- Parameters:
x (NDArray) – The input vector to project
target (NDArray) – The target values for the linear constraints.
A (LinearOperator, optional) – The linear operator defining the constraints.
mask (NDArray, optional) – A boolean mask indicating the indices of the input vector to be projected onto v. If provided, the projection is performed by directly setting z[mask] = v.
- Return type:
Notes
The linear constraint set defined by the linear operator A and the target v is given by:
\[\mathcal{C} = \{ x \in \mathbb{R}^n : Ax = v \}\]The projection of an input vector z onto this set is thus:
\[s = z + A^\dagger (v - Az)\]Alternatively, the constraint set can also be provided by a mask:
\[\mathcal{C} = \{ x \in \mathbb{R}^n : x[mask] = v \}\]References
[Proj]N. Chauffert, P. Weiss, J. Kahn and P. Ciuciu, “A Projection Algorithm for Gradient Waveforms Design in Magnetic Resonance Imaging,” in IEEE Transactions on Medical Imaging, vol. 35, no. 9, pp. 2026-2039, Sept. 2016, doi: 10.1109/TMI.2016.2544251.