make_trapezoid

Contents

make_trapezoid#

pypulseqpp.make_trapezoid()[source]#

Create a trapezoidal gradient event.

The user must supply any of the following sets of parameters: Area based: - area - area and duration - area and duration and rise_time - flat_time, area and rise_time Amplitude based: - amplitude and duration - amplitude and flat_time Flat area based: - flat_area and flat_time Additional options may be supplied with the above.

See also

-, -

Parameters:
  • channel (str) – Orientation of trapezoidal gradient event. Must be one of x, y or z.

  • amplitude (float, default=None) – Peak amplitude (Hz/m).

  • area (float, default=None) – Area (1/m).

  • delay (float, default=0) – Delay in seconds (s).

  • duration (float, default=None) – Duration in seconds (s). Duration is defined as rise_time + flat_time + fall_time.

  • fall_time (float, default=None) – Fall time in seconds (s).

  • flat_area (float, default=None) – Flat area (1/m).

  • flat_time (float, default=None) – Flat duration in seconds (s). Default is -1 to allow for triangular pulses.

  • max_grad (float, default=None) – Maximum gradient strength (Hz/m).

  • max_slew (float, default=None) – Maximum slew rate (Hz/m/s).

  • rise_time (float, default=0) – Rise time in seconds (s).

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

Returns:

grad – Trapezoidal gradient event created based on the supplied parameters.

Return type:

SimpleNamespace

Raises:
  • ValueError – If none of area, flat_area and amplitude are passed If requested area is too large for this gradient If flat_time, duration and area are not supplied. Amplitude violation

  • NotImplementedError – If an input set that might be valid but not implemented is passed.

Notes

This is PyPulseq’s factory; the event it builds is returned with its fields in slots.