PlayedWaveforms

Contents

PlayedWaveforms#

class pulserver.validate.PlayedWaveforms[source]#

Bases: object

What a scanner played, as its plotter recorded it.

One pair of arrays per channel: the time of each sample in microseconds, and its amplitude in the unit that channel is stored in. The gradients are in gauss per centimetre, and gradient_mt_per_m() converts them. The transmit channels are stored as the converter’s own numbers. phase_rad() converts the phase, whose converter spans a turn. The magnitude’s scale is the peak transmit field of the scan being played, which is not in the file, so nothing here invents one: a magnitude is compared by its shape.

Attributes:
  • end_time_us (float) – The length of the recording, as the file states it.

  • channels (dict[str, tuple[numpy._typing._array_like.NDArray[numpy.int64], numpy._typing._array_like.NDArray[numpy.float64]]]) – (time_us, amplitude) per channel: gx, gy and gz, ssp, and the transmit rho, theta and omega.

  • titles (dict[str, str]) – What the file calls each sequencer, which names its core and hardware.

Methods

get

Return a channel, or a pair of empty arrays where it played nothing.

gradient_mt_per_m

Return a gradient channel in millitesla per metre.

phase_rad

Return the transmit phase in radians, wrapped to one turn.

Attributes