apply_system_derates#
- pypulseqpp.apply_system_derates()[source]#
Return a copy with gradient and slew limits scaled from their base values.
Base limits are retained on the copy, so repeated derating does not compound.
- Parameters:
- Returns:
The derated copy.
- Return type:
See also
cap_systemthe same copy-not-mutate contract, for an absolute ceiling.
Notes
The default fractions,
MAX_GRAD_DERATEandMAX_SLEW_DERATE, leave a margin below the gradient amplitude and slew-rate limits for a waveform designed on one axis at a time and played while other axes are active.Examples
>>> import pypulseqpp as pp >>> opts = pp.Opts(max_grad=40, grad_unit="mT/m", max_slew=150, slew_unit="T/m/s") >>> derated = pp.apply_system_derates(opts) >>> derated.max_grad == 0.9 * opts.max_grad True >>> derated is opts False
The caller’s own limits are untouched, and repeating does not compound:
>>> pp.apply_system_derates(derated).max_grad == derated.max_grad True