scale_grad

Contents

scale_grad#

pypulseqpp.scale_grad()[source]#

Scales the gradient with the scalar.

Parameters:
  • grad (SimpleNamespace) – Gradient event to be scaled.

  • scale (float) – Scaling factor.

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

Returns:

grad – Scaled gradient.

Return type:

SimpleNamespace

Notes

A trapezoid or gradient event built here is scaled in C++: the copy has its amplitude multiplied, and an arbitrary waveform’s normalised samples are not touched. Given system, the scaled peak and slew are checked against system.max_grad and system.max_slew in the same call. A PyPulseq namespace goes through PyPulseq’s own function and comes back as an event.