validate

Contents

validate#

pulserver.validate.validate()[source]#

Check that a sequence plays as it was written.

Reads the gradients the sequence asks for, and compares them against a second rendering: a recording of a machine playing it, where one is given or can be made, and otherwise the waveforms its own cache holds.

Comparison.reference says which was compared. A recording establishes that the machine plays the sequence. The cache establishes only that the conversion kept it: a conversion and a playout that are wrong in the same way agree.

Parameters:
  • seq_path (Path | str) – The sequence file.

  • vendor (str, default=None) – Which machine played came from, one of VENDORS. None compares against the cache and ignores played.

  • played (Path | str, default=None) – A recording to compare against. Absent, and with a vendor named, one is asked for from that vendor’s tooling if it is installed here.

  • dead_time_us (float, default=0.0) – What a recording’s times run ahead of the sequence’s by, on every channel, in µs.

  • rf_wait_us (float, default=0.0) – What the transmit channels run ahead by on top of dead_time_us, in µs; a machine drives transmit and gradients on separate timelines and records each as driven.

  • tolerance_mt_per_m (float, default=None) – The largest gradient difference that still counts as agreement, in mT/m. Three raster steps of the slew rate of system when given (gradient_tolerance_mt_per_m()); 0.05 otherwise.

  • rf_tolerance_percent (float, default=1.0) – The largest transmit difference, as a percentage of the peak.

  • cache_ext (str, default='.pseg') – Extension of the cache read when comparing against it.

  • system (pypulseqpp.Opts, default=None) – pypulseqpp.Opts the cache is converted under when none exists; default pypulseqpp.Opts().

Return type:

Comparison

Raises: