split_gradient_at

split_gradient_at#

pypulseqpp.split_gradient_at()[source]#

Splits a trapezoidal gradient into two extended trapezoids defined by the cut line. Returns the two gradient parts by cutting the original ‘grad’ at ‘time_point’. For the input type ‘trapezoid’ the results are returned as extended trapezoids, for ‘arb’ as arbitrary gradient objects. The delays in the individual gradient events are adapted such that add_gradients(…) produces a gradient equivalent to ‘grad’.

See also

-, -, -, -, -

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

  • time_point (float) – Time point at which grad will be split into two gradient waveforms.

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

Returns:

grad1, grad2 – Gradient waveforms after splitting.

Return type:

SimpleNamespace

Raises:

ValueError – 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.