check_grad_continuity#
- pypulseqpp.safety.check_grad_continuity()[source]#
Check gradient amplitude continuity across block boundaries.
- Parameters:
seq (Sequence) – The sequence to check.
system (pypulseqpp.Opts, default=None) – System limits supplying the slew limit a discontinuity is compared with; the sequence’s own by default.
- Returns:
is_ok (bool) – True when no discontinuity is found and every gradient waveform ends at zero amplitude.
report (SimpleNamespace) –
limit; thediscontinuitiesfound, each naming theblock, theaxis, the amplitudesbeforeandafterthe boundary and theslewrate the step implies; andends_at_zero.
Notes
Endpoints are compared after each block’s rotation. An absent gradient contributes zero amplitude. A discontinuity is evaluated over one gradient raster period, and the final amplitude on every axis must be zero. Block indices are 1-based, axes are zero-based integers, amplitudes are in Hz/m and slew rates in Hz/m/s.