# calc_toeplitz_kernel¶

calc_toeplitz_kernel(omega, im_size, weights=None, norm=None, grid_size=None, numpoints=6, n_shift=None, table_oversamp=1024, kbwidth=2.34, order=0.0)[source]

Calculates an FFT kernel for Toeplitz embedding.

The kernel is calculated using a adjoint NUFFT object. If the adjoint applies $$A'$$, then this script calculates $$D$$ where $$F'DF \approx A'WA$$, where $$F$$ is a DFT matrix and $$W$$ is a set of non-Cartesian k-space weights. $$D$$ can then be used to approximate $$A'WA$$ without any interpolation operations.

For details on Toeplitz embedding, see Efficient numerical methods in non-uniform sampling theory (Feichtinger et al.).

This function has optional parameters for initializing a NUFFT object. See KbNufftAdjoint for details.

Note

This function is intended to be used in conjunction with ToepNufft for forward operations.

• omega should be of size (len(im_size), klength) or (N, len(im_size), klength), where klength is the length of the k-space trajectory.

Parameters
• omega (Tensor) – k-space trajectory (in radians/voxel).

• im_size (Sequence[int]) – Size of image with length being the number of dimensions.

• weights (Optional[Tensor]) – Non-Cartesian k-space weights (e.g., density compensation). Default: torch.ones(omega.shape[1])

• norm (Optional[str]) – Whether to apply normalization with the FFT operation. Options are "ortho" or None.

• grid_size (Optional[Sequence[int]]) – Size of grid to use for interpolation, typically 1.25 to 2 times im_size. Default: 2 * im_size

• numpoints (Union[int, Sequence[int]]) – Number of neighbors to use for interpolation in each dimension.

• n_shift (Optional[Sequence[int]]) – Size for fftshift. Default: im_size // 2.

• table_oversamp (Union[int, Sequence[int]]) – Table oversampling factor.

• kbwidth (float) – Size of Kaiser-Bessel kernel.

• order (Union[float, Sequence[float]]) – Order of Kaiser-Bessel kernel.

Return type

Tensor

Returns

The FFT kernel for approximating the forward/adjoint operation.

Examples

>>> image = torch.randn(1, 1, 8, 8) + 1j * torch.randn(1, 1, 8, 8)
>>> omega = torch.rand(2, 12) * 2 * np.pi - np.pi
>>> toep_ob = tkbn.ToepNufft()
>>> kernel = tkbn.calc_toeplitz_kernel(omega, im_size=(8, 8))
>>> image = toep_ob(image, kernel)