make_phase_encoding

make_phase_encoding#

pypulseqpp.make_phase_encoding()[source]#

Create a positive phase-encode template of area 1 / (2 * resolution).

This is the largest encode the resolution needs; scale it per view.

Parameters:
  • channel (str) – Gradient channel ("x", "y" or "z").

  • resolution (float) – Target resolution along channel (m) – fov / matrix for an in-plane encode, the partition spacing for a 3D slab encode.

  • system (pypulseqpp.Opts, default=None) – System limits.

  • duration (float, default=None) – Force a duration (s); the default is the shortest feasible.

Returns:

Trapezoid of area 1 / (2 * resolution) (1/m).

Return type:

TrapEvent

Raises:

ValueError – If resolution is not positive.

Examples

>>> import pypulseqpp as pp
>>> gy = pp.make_phase_encoding("y", 0.22 / 64, system=pp.Opts())
>>> round(gy.area, 3)
145.455

The same call encodes a 3D slab’s partitions, the resolution along z being the partition spacing:

>>> round(pp.make_phase_encoding("z", 1e-3, system=pp.Opts()).area, 1)
500.0

See also

make_phase_blip

the small step played between echoes of a train.