split_gradient

Contents

split_gradient#

pypulseqpp.split_gradient()[source]#

Splits a trapezoidal gradient into slew up, flat top and slew down. Returns the individual gradient parts (slew up, flat top and slew down) as extended trapezoid gradient objects. The delays in the individual gradient events are adapted such that addGradients(…) produces an gradient equivalent to ‘grad’.

See also

-, -, -, -, -

Parameters:
  • grad (SimpleNamespace) – Gradient event to be split into two gradient waveforms.

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

Returns:

grad1, grad2 – Split gradient waveforms.

Return type:

SimpleNamespace

Raises:

ValueError – If arbitrary gradients are passed. If non-gradient event is passed.

Notes

This is PyPulseq’s function. Events go in as the namespaces it expects and come back with their fields in slots.