CheckLimits

Contents

CheckLimits#

class pulserver.ir.CheckLimits[source]#

Bases: object

Limits and models checked on a chain beyond those of pypulseqpp.Opts.

Nerve stimulation, mechanical resonance and acoustic limits, and the VOPs and SAR limits of sar_ratios().

Attributes:
  • pns (Any) – Nerve model of pypulseqpp.safety.check_pns: a ChronaxieModel or a SAFE description. None leaves out the PNS check.

  • pns_limit (float) – Largest PNS response allowed, as a fraction of the model’s threshold.

  • bands (tuple[pypulseqpp.safety._resonance.ForbiddenBand, …]) – Forbidden gradient bands of check_mech_resonance, on the physical axes. Without any, the resonance check is left out.

  • vops (pypulseqpp.safety._sar.VopModel | pathlib.Path | str | None) – VOPs and the global SAR matrices of their body models, or the .mat or .npz file holding them, which sar_ratios() reads; nothing is refused on SAR.

  • drive_per_hz (float | tuple[float, …]) – Channel drive per Hz of RF amplitude, in the VOPs’ drive unit: one value, or one per channel. A scale common to every channel cancels in the ratios.

  • default_shim (tuple[complex, …] | None) – Complex channel weights of a pulse played without an RF shim, and of the reference pulse; equal weights whose squares sum to 1 when None.

  • vop_coil (str | None) – The transmit configuration the scanner reports. When given, the VOP file’s metadata["transmit"] must name the same one.

  • vop_head_limit, vop_local_limit – The scanner’s head and local SAR limits, W/kg, in its current operating mode; sar_ratios() needs both.

  • adc_gap (float) – Least time in s from the end of one ADC to the start of the next: the receiver’s start packet for a readout must not fall inside, or just after, the previous readout’s window. 0 leaves the check out.

  • wave_memory (float) – Longest arbitrary gradient in s one axis’s waveform memory holds: its samples at the playout’s raster. 0 leaves the check out.

  • acoustic (pypulseqpp.safety._acoustic.AcousticResponse | pathlib.Path | str | None) – The gradient coil’s acoustic transfer function on the physical axes, or the HDF5 file pypulseqpp.safety.read_acoustic_response reads it from. None leaves out the sound pressure check.

  • acoustic_interval (float) – Sampling interval in s the bins of an acoustic file refer to.

  • spl_peak_limit (float) – Largest peak sound pressure level allowed, in dB re 20 µPa; that of IEC 60601-2-33 by default.

  • spl_average_limit (float) – Largest A-weighted average sound pressure level allowed, in dB(A); that of IEC 60601-2-33 by default.

  • follows_poses (bool) – Whether the scan follows the poses its reconstruction publishes. A chain that sets EnablePmc is then turned during the scan by rotations the check never sees, so its gradient amplitude and slew rate summed over the three axes are held to the per-axis limits: any rotation can put the whole vector on one axis.

  • sequencer_timing (Any) – How the playout’s sequencer plays segment instances, from which pulserver.ir.played_time() tells whether the scan keeps the time its file states; None where the scanner states none.

Raises:

ValueError – If the PNS limit or a SAR limit is not positive, or an acoustic file comes without its interval.

Methods

acoustic_response

Return the acoustic transfer function, read from its file where given as one.

Attributes