mr2.algorithms.dcf.dcf_pipe
- mr2.algorithms.dcf.dcf_pipe(traj: Tensor, encoding_matrix: Sequence[int], n_iterations: int = 10, oversampling: float = 2.0) Tensor[source]
Calculate positive real Pipe density compensation.
Iterate \(w \leftarrow w / |G^H G w|\), starting from ones, where \(G\) spreads samples onto a periodic Cartesian grid. Only spreading and interpolation are used, without FFTs or deconvolution.
- Parameters:
traj (
Tensor) – Coordinates in encoded-grid units, shaped(..., directions, k2, k1, k0). Leading dimensions describe independent trajectories. One to three coordinate directions are supported. Unbatched inputs can omit leading singleton sample axes, for example(directions, k1, k0).encoding_matrix (
Sequence[int]) – Encoded matrix sizes in the same order as the coordinate directions. Coordinates have period equal to these sizes. Every supplied direction contributes to the normalization, including constant directions.n_iterations (
int, default:10) – Number of reciprocal iterations, at least one.oversampling (
float, default:2.0) – Grid size relative to the encoding matrix, at least one. Each grid axis hasmax(32, ceil(oversampling * size))points. The minimum accommodates the kernel support. FINUFFT does not oversample a spread-only grid.
- Returns:
Real weights shaped
(..., k2, k1, k0), on the input device and with its dtype. Omitted singleton sample axes stay omitted. Each trajectory’s weights sum to the product ofencoding_matrix. This normalization does not estimate the volume of a partially sampled region.
Notes
Trajectory gradients are not supported by the FINUFFT spread-only backend.
References