check_max_grad

Contents

check_max_grad#

pypulseqpp.safety.check_max_grad()[source]#

Check the peak gradient amplitude against max_grad.

Parameters:
  • seq (Sequence) – Sequence to check.

  • system (pypulseqpp.Opts, default=None) – System limits; defaults to seq.system.

Returns:

  • is_ok (bool) – True when the largest per-axis amplitude does not exceed max_grad.

  • report (SimpleNamespace) – limit; the per_axis and vector peaks; and axes, the peak of each of x, y and z on its own. Each peak carries value in Hz/m, the 1-based block containing it, and its axis.

Notes

Each block’s rotation is applied before per-axis peaks are evaluated. Only the largest per-axis peak is compared with the limit; a nonpositive limit disables the check. The vector peak is the largest simultaneous Euclidean magnitude over the three axes; it is reported but not compared with a limit, and it is not the norm of independently attained axis peaks.