tools.estimate_shot_phases

tools.estimate_shot_phases#

bartorch.tools.estimate_shot_phases()#

Phase each shot of a segmented acquisition adds to image, relative to the first shot’s.

Shot \(s\) reads kspace on the lines masks[s] of image times \(e^{i\phi_s}\), through the SENSE encoding of maps. Each \(\phi_s\) is moved, from phases, by its closed-form constant and then by steps Levenberg-damped Gauss-Newton steps over the smooth basis (shot_phase_basis()): the residual’s Jacobian along term \(k\) is the encoding of \(i B_k e^{i\phi_s} x\). The phases are then taken relative to the first shot’s.

Parameters:
  • kspace (torch.Tensor) – (coils, z, y, x) centred k-space and coil maps.

  • maps (torch.Tensor) – (coils, z, y, x) centred k-space and coil maps.

  • masks (torch.Tensor) – (shots, z, y) booleans, the lines each shot placed.

  • image (torch.Tensor) – (z, y, x) complex image the shots are fitted against.

  • phases (torch.Tensor) – (shots, z, y, x) starting phases, in rad.

  • basis (torch.Tensor) – (terms, z, y, x) real functions the phases move along.

  • steps (int, default=2) – Gauss-Newton steps per shot.

  • damping (float, default=1e-3) – Levenberg damping, a fraction of the mean curvature.

  • terms_at_once (int, default=28) – Basis functions carried through the encoding at once while the curvature is built; each holds the coils times the volume.

Returns:

(shots, z, y, x) float32 phases, the first zero.

Return type:

torch.Tensor