Console.scan

Contents

Console.scan#

Console.scan()[source]#

Scan a stored design on the exam’s phantom; return the status of the reconstruction.

emit receives the scan clock after each span played, a span lasting at least _SPAN, as {"clock": s, "duration": s}, then the reconstruction’s images as DICOM, {"dicom": base64, "name": file name}, converting those it returns as MRD, and its texts as {"text": ...}. With sound, each span’s sound comes before its clock, once the clock reaches the span’s start, as {"sound": base64, "rate": Hz, "start": s}: 16-bit little-endian stereo samples, the first at start on the scan clock. At a speed, the scan is simulated ahead of its clock, and until the clock starts emit receives {"preparing": s} about twice a second, with the wall-clock time left before it does, or null before there is an estimate. The status is 1 when a text reports a refused or failed series, or when the scan is cancelled.

The Fourier engine simulates the scan on the phantom’s tissue, sampled at spacing once per exam, where the excitation pulses excite it.

recon names the reconstruction plugin. Without it, a design of a shipped scanner sequence is reconstructed with the shipped reconstruction paired with it in pulserver._zoo.ZOO_PAIRS. A console that reconstructs nothing ignores it.

Raises:

ValueError – If the console reconstructs, recon is None and the design is not of a shipped scanner sequence, as an imported design is not.