check#
- pulserver.ir.check()[source]#
Return the problems of a chain under a scanner’s limits, in the physical frame.
Each file of the
NextSequencechain is rotated byrotation, composed after each block’s own rotation with blocks labelledNOROTexempt, as the scanner plays it. It is then checked withpypulseqpp.check_timing, gradient continuity included, and withpypulseqpp.safety.check_max_gradandcheck_max_slew, against the gradient limits, dead times and ringdown time ofsystem; the RF peaks against itsmax_b1where it has one, and each arbitrary gradient’s length againstlimits.wave_memory; and withcheck_pns,check_mech_resonanceandcheck_splwherelimitscarries a nerve model, forbidden bands or an acoustic transfer function; underlimits.follows_poses, a chain a file of which setsEnablePmcalso has its gradient amplitude and slew rate summed over the axes held to the per-axis limits, which is what every rotation the poses may bring keeps within them; the gradient spectrum is read over windows ofRESONANCE_WINDOW, a band stating no amplitude is held toRESONANCE_FLOOR, and a stated amplitude limits the axis’s gradient while the band holds a line. The waveforms are timed by the file’s own rasters. VOPs are not checked here: seesar_ratios().- Parameters:
seq_path (Path | str) – The first file of the chain.
system (pypulseqpp.Opts) – The scanner’s gradient limits, dead times and ringdown time.
rotation (np.ndarray, default=None) –
(3, 3)prescription rotation from logical to physical axes, a reflection included; the identity by default.limits (CheckLimits, default=None) – The nerve and resonance limits; none by default.
designed (list[tuple[Path, pypulseqpp.Sequence]], default=None) –
(path, sequence)pairs of the chain asmrd._sequence.designed_chainreturns them, checked in place of reading the files and rotated in place.spl_levels (Sequence[SplLevels], default=None) – One per file of the chain, as
spl_levels()returns them forrotation, held to the limits in place of computing them.readings (dict, default=None) – Filled, where given, with the largest reading over the chain of the gradient checks, each as a fraction of its limit:
"grad"and"slew", the gradient amplitude and slew rate on a physical axis;"vector_grad"and"vector_slew", the same summed over the axes, underlimits.follows_posesfor a chain that setsEnablePmc; and"pns", the nerve response overlimits.pns_limit, where a nerve model is given.
- Returns:
One line per problem, naming the file when the chain has more than one; empty when every check passes.
- Return type:
- Raises:
ValueError – If a file of the chain or the acoustic file cannot be read, or
rotationis not orthonormal.