make_extended_trapezoid_area#
- pypulseqpp.make_extended_trapezoid_area()[source]#
Make the shortest possible extended trapezoid for given area and gradient start and end point.
- Parameters:
area (float) – Area of extended trapezoid.
channel (str) – Orientation of extended trapezoidal gradient event. Must be one of ‘x’, ‘y’ or ‘z’.
grad_start (float) – Starting non-zero gradient value.
grad_end (float) – Ending non-zero gradient value.
convert_to_arbitrary (bool, default=False) – Boolean flag to enable converting the extended trapezoid gradient into an arbitrary gradient.
- Returns:
grad (SimpleNamespace) – Extended trapezoid event.
times (numpy.ndarray) – Time points of the extended trapezoid.
amplitude (numpy.ndarray) – Amplitude values of the extended trapezoid.
- Raises:
ValueError if no solution was found that satisfies the constraints and the desired area. –
Notes
This is PyPulseq’s function. Events go in as the namespaces it expects and come back with their fields in slots.