deepmr.sensmap

Contents

deepmr.sensmap#

deepmr.sensmap(shape, coil_width=2.0, shift=None, dphi=0.0, nrings=None, mask=None)[source]#

Simulate birdcage coils.

Adapted from SigPy [1].

Parameters:
  • shape (Iterable[int]) – Size of the matrix (ncoils, ny, nx) (2D) or (ncoils, nz, ny, nx) (3D) for the sensitivity coils.

  • shift (Iterable[int], optional) – Displacement of the coil center with respect to matrix center. The default is (0, 0) / (0, 0, 0).

  • dphi (float) – Bulk coil angle in [deg]. The default is 0.0°.

  • coil_width (float, optional) – Width of the coil, with respect to image dimension. The default is 2.0.

  • nrings (int, optional) – Number of rings for a cylindrical hardware set-up. The default is ncoils // 4.

  • mask (np.ndarray | torch.Tensor, optional) – Region of support of the object of shape (ny, nx) (2D) or (nz, ny, nx) (3D). The default is None.

Returns:

smap – Complex spatially varying sensitivity maps of shape (nmodes, ny, nx) (2D) or (nmodes, nz, ny, nx) (3D). If nmodes = 1, the first dimension is squeezed.

Return type:

torch.Tensor

Example

>>> import deepmr

We can generate a set of nchannels=8 2D sensitivity maps of shape (ny=128, nx=128) by:

>>> smap = deepmr.sensmap((8, 128, 128))

Coil center and rotation can be modified by shift and dphi arguments:

>>> smap = deepmr.sensmap((8, 128, 128), shift=(-3, 5), dphi=30.0) # center shifted by (dy, dx) = (-3, 5) pixels and rotated by 30.0 degrees.

Similarly, nchannels=8 3D sensitivity maps can be generated as:

>>> smap = deepmr.sensmap((8, 128, 128, 128))

Beware that this will require more memory.

References

[1] mikgroup/sigpy