coil_maps

Contents

coil_maps#

pulserver.recon.coil_maps()[source]#

Return the coil sensitivities of a unit from the first source that has them.

The sources, in order:

  1. The unit’s calibration k-space, data.ref: the maps are estimated from it and stored in context.coil_maps under the unit’s slice counter, replacing the maps stored there.

  2. context.coil_maps for the unit’s slice.

  3. The exam’s COIL_SENSITIVITIES.

Stored maps serve only where CoilSensitivities.incompatibility() finds nothing. The location is the slice counter, not the encoding space, so maps estimated from a calibration unit in an encoding space of its own serve the imaging units of its slice.

Parameters:
  • context – Scan context; its device is where the estimate runs and the maps are returned.

  • data – The unit that needs maps; data.counters["slice"] is its slice, 0 when the unit has no such counter.

  • estimate – estimate(kspace) -> maps, such as bartorch.apps.nlinv_maps(). kspace is the calibration k-space of the unit as a torch tensor (coils, [z,] y, x), zero outside the lines it holds, on the grid of its encoding space; maps are the sensitivities on the same grid.

  • required – Return None, rather than raise, when no source has usable maps.

Returns:

A copy of the maps (coils, [z,] y, x), complex64, on context.device.

Return type:

torch.Tensor or None

Raises:
  • MissingCalibration – If no source has usable maps and required is true. The message names each source and why it was rejected.

  • ValueError – If the unit’s calibration k-space is of a non-Cartesian space, varies along an axis other than the partition and phase-encode axes, or the estimate returns maps on another grid than it was given.