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 – Spacing at which the exam’s phantom is sampled as tissue, in metres.

  • 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 is simulated on, as FourierPlayer takes it.

  • motion – How the subject moves during every scan, from each scan’s start.

  • girf – The impulse response every scan’s gradients play through.

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.