check_max_slew

Contents

check_max_slew#

pypulseqpp.safety.check_max_slew()[source]#

Check the within-block slew rate against max_slew.

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

  • system (pypulseqpp.Opts, default=None) – Source of max_slew (Hz/m/s) and grad_raster_time (s); seq.system when None.

Returns:

  • is_ok (bool) – True when the largest per-axis slew rate does not exceed max_slew. Always True when max_slew is not positive.

  • report (SimpleNamespace) – limit; the per_axis and vector slew-rate peaks in Hz/m/s; and axes, the peak of each of x, y and z on its own. Peaks carry the same fields as in check_max_grad().

Raises:

ValueError – If neither system nor seq.system is available.

Notes

Slew rates are evaluated within each block after its rotation; boundaries between blocks are not covered. Only the largest per-axis peak is compared with the limit; a nonpositive limit disables the check. The vector slew rate is the largest simultaneous Euclidean magnitude, reported but not compared with a limit. Use check_grad_continuity() for transitions between blocks.