Console

Contents

Console#

class pulserver.virtual.Console[source]#

Bases: object

What a scanner console asks of pulserver, answered in this process.

A console lists a plugin’s protocol, validates and generates designs with the text blocks the interpreter sends, starts an exam on a subject with one of the virtual scanner’s coils, and scans a stored design on it. Images return as DICOM from the reconstruction proxy at recon, or from the plugins of recon_plugins run in this process as the proxy runs them; with neither, a scan returns no images. A scan names its reconstruction plugin; without one, the design’s shipped scanner sequence is reconstructed with the shipped reconstruction paired with it.

Parameters:
  • plugins – Directories of the scanner-sequence plugins, in search order: a name is the plugin of the first directory holding <name>.py.

  • limits – Text of the [Limits] block every design is made under; its B0 is the virtual magnet’s field.

  • store – Design store.

  • recon – (host, port) of the reconstruction proxy.

  • recon_plugins – Directories of reconstruction plugin files, <plugin>.py, in search order, which reconstruct each scan in this process (LocalReconstruction).

  • push – Recon-side intake each design is pushed to.

  • spacing – Finest isochromat spacing of the phantom, in metres.

  • max_isochromats – Most isochromats a scan is simulated on. A scan is simulated on the isochromats in the slabs its excitation pulses excite (excited()), at the finest spacing, from spacing up in steps of 1 mm, that keeps no more of them than this; at spacing without it.

  • coil – Name of the coil an exam is started with unless it names another.

  • fields – Directory of the coils’ field maps, <coil>.npz, and of the VOPs of those that transmit, <coil>_vops.npz, as mariepy writes them for BrainWeb’s head. Every exam is then on BrainWeb, and every design is made under the VOPs of the exam’s transmit coil. Without it, the coils are COILS.

  • speed – Scan time elapsed per wall-clock second once the scan’s simulation is far enough ahead of its clock; as fast as it is simulated without it.

  • device – Device a scan’s ADC windows are read and its runs of repetitions carried on, as Isochromats takes it; the engine does both itself without one.

  • spins – Isochromats per voxel, spread over the T2’ line of its tissue.

  • voxel – Where a voxel’s isochromats lie: "point", at its centre, or "box", over it, as the phantom’s isochromats places them.

  • diffusion – Whether BrainWeb’s tissue classes diffuse, as DIFFUSION gives them.

  • motion – The subject’s motion, as Isochromats takes it, on the clock of each scan; at rest without one. Moving isochromats play every block alone.

Methods

answer

Answer one request of a console, handing reply each message of the answer.

coils

Return each coil an exam can be started with: its name and its transmit and receive channels.

design

Answer a design call; a generated or imported design's id is design.

exam

Start an exam on the phantom subject names, in the coil coil names; return its three-plane localizer as DICOM files.

plugin_names

Return the names of the plugins a console can list.

recon_names

Return the names of the reconstruction plugins a scan can name.

scan

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