cap_system

Contents

cap_system#

pypulseqpp.cap_system()[source]#

Return a copy with gradient and slew limits lowered to the specified ceilings.

Parameters:
  • opts (Opts) – System limits. Not modified.

  • max_grad (float, default=None) – Amplitude ceiling, in grad_unit.

  • max_slew (float, default=None) – Slew ceiling, in slew_unit.

  • grad_unit (str, default='mT/m') – The units those two are given in.

  • slew_unit (str, default='T/m/s') – The units those two are given in.

Returns:

The capped copy.

Return type:

Opts

Examples

>>> import pypulseqpp as pp
>>> from pypulseq.convert import convert
>>> system = pp.Opts(max_grad=80, grad_unit="mT/m", max_slew=200, slew_unit="T/m/s")
>>> capped = pp.cap_system(system, max_grad=40, max_slew=150)
>>> capped is system
False
>>> round(convert(from_value=capped.max_grad, from_unit="Hz/m", to_unit="mT/m", gamma=capped.gamma))
40