Device Classes
dabs.resources.devices holds the abstract device classes: one per kind of hardware
ScanImage® knows how to use. A vendor driver derives from the class matching its function and
implements a handful of abstract members; everything above the driver - components, GUIs,
widgets - is written against the abstract class, never against the vendor.
This page documents those abstract interfaces, which is what you need both to drive a device from a script and to write a new driver.
MotorController
dabs.resources.devices.MotorController. Used by hSI.hMotors.
Member |
Description |
|---|---|
|
Number of axes. |
|
|
|
True while a move started with |
|
True when the absolute position is known relative to home. |
|
Timeout used when a move does not specify one. |
|
True when |
|
Blocking move. |
|
Non-blocking move; |
|
Stop motion. |
|
Begin the homing sequence. |
|
Query the controller. |
|
Query motion state. |
dabs.resources.devices.StreamableMotor extends this for controllers that can stream a
position trajectory.
LinearScanner
dabs.resources.devices.LinearScanner models an analog-controlled actuator with optional
position feedback: galvos (GalvoAnalog) and analog FastZ actuators (FastZAnalog) both
derive from it.
Member |
Description |
|---|---|
|
The IO channels used for control, offset and feedback. Assigning a name resolves it through the resource store. |
|
Mechanical and electrical limits. |
|
Linear command scaling. |
|
Lookup tables for non-linear command and feedback response. |
|
Applied to the control AO on |
|
Updated by |
|
Updated by the read methods. |
|
Whether the corresponding channels are configured. |
Method |
Description |
|---|---|
|
Drive the actuator to a position. |
|
Drive it to a raw voltage. |
|
Move to the park position or to zero. |
|
Ramp rather than step to a new position. |
|
Read the feedback channel, in position units. |
|
Read back the commanded position. |
|
Motion state. |
|
Unit conversions that honor the LUTs. |
|
Calibration routines. |
|
Plot the position lookup table. |
|
Output a waveform and capture the feedback. |
|
Iteratively optimize a waveform against the measured feedback. An |
|
The optimized waveform cache that hSI.hWaveformManager sits on top of. |
SyncedScanner, ResonantScanner and PolygonalScanner
dabs.resources.devices.SyncedScanner is the base for scanners whose sync signal is the
master clock for the acquisition.
Member |
Description |
|---|---|
|
Digital input carrying the sync signal. |
|
Nominal and measured line frequency. |
|
Full angular range. |
|
Start-up transient, and a blocking wait for it. |
|
Park the scanner. |
ResonantScanner adds amplitude control and the calibration maps that make a resonant
scanner usable across zoom levels:
Member |
Description |
|---|---|
|
Command the amplitude. |
|
Read-only current amplitude. |
|
|
|
|
|
|
|
Interpolate the maps. |
|
Apply the amplitude LUT. |
|
Add a measured point. A near-duplicate amplitude is replaced by the new entry. |
|
Plot the maps. |
PolygonalScanner covers polygonal scanners, which are synced scanners with a different
amplitude model.
PMT
dabs.resources.devices.PMT. Used by hSI.hPmts.
Member |
Description |
|---|---|
|
Read-only state, updated by |
|
Read-only trip state. |
|
Wavelength the PMT is being used at. Default 700. |
|
Power the PMT with the acquisition. |
|
Command the controller. |
|
Clear a trip. |
|
Refresh the properties from the controller. Called automatically on the resource store’s 1 Hz beacon. |
Shutter
dabs.resources.devices.Shutter. Used by hSI.hShutters.
Member |
Description |
|---|---|
|
Read-only state. |
|
Time the shutter needs to open fully. |
|
|
|
Blocking transitions. |
|
The non-blocking pair. |
BeamModulator
dabs.resources.devices.BeamModulator, with BeamModulatorFast (Pockels cells and
similar) and BeamModulatorSlow (motorized half-wave plates) beneath it. Used by
hSI.hBeams.
Member |
Description |
|---|---|
|
Observable. Listen to this rather than |
|
Last known power in watts. |
|
Upper limit on the commanded fraction. |
|
Measured calibration from fraction to watts. |
|
Command the modulator. |
|
Convert using the LUT. |
|
Run the power calibration. |
FastZ
dabs.resources.devices.FastZ is the minimal interface - moveBlocking(position,timeout)
plus the Device lifecycle. FastZAnalog combines it with LinearScanner for
analog-controlled actuators, and FastZDiscrete covers actuators that only support a fixed
set of positions and therefore have no native waveform.
SLM
dabs.resources.devices.SLM. Used by scanimage.mroi.scanners.SLM and
SlmScan.
Member |
Description |
|---|---|
|
Panel resolution. |
|
Pixel pitch and gap in meters; |
|
Bit depth, and the corresponding MATLAB integer type. |
|
Maximum refresh rate in Hz. |
|
Whether the SLM supports a frame queue. |
|
The last phase mask written. |
|
Whether the phase mask is computed transposed. |
|
Write a phase mask. |
|
Write a blank mask. |
|
Frame queue control. All three assert that |
See also
SLM Optogenetics and the SLM coordinate systems in ScanImage Coordinate System Instances.
Camera
dabs.resources.devices.Camera. Wrapped by
hSI.hCameraManager.
Member |
Description |
|---|---|
|
Immutable name. |
|
Frame resolution. |
|
Constant. Whether frame data is row-major. |
|
Exposure time. |
|
Pixel type, as |
|
Read-only. True during a buffered continuous acquisition. |
|
The most recent frame. |
|
Start and stop a continuous buffered acquisition. |
|
Single frame. Also updates |
|
Drain the acquisition buffer. |
|
Discard buffered frames. |
Driver inventory
Concrete drivers live in the vendor packages under +dabs. The generic package is the one
to reach for when a device is driven purely through DAQ channels.
Package |
Drivers |
|---|---|
|
|
|
ECU1 / ECU2 resonant scanners and PMTs, MCM3000 / MCM301 / MCM6000 / MCM5000
controllers and their shutters and mirrors, Kinesis motors, MFF101 flipper,
|
|
|
|
MP285 / MP285A / MPC200 controllers, resonant and galvo-galvo scan boxes. |
|
C867, E727_D, E753_D, E861, C413A and its scanner. |
|
|
|
SLM 1024 / 1920, |
|
RMR8kHz and RMR12kHz resonant scanners, VCAM. |
|
Simulated motor, camera, SLM, slow beam modulator, vDAQ and FlexRIO. Everything needed to run ScanImage without hardware. |
|
Stage and actuator controllers. |
|
Specialty scanners, adaptive optics, timing electronics, illumination, the MINI2P system, Micro-Manager cameras and remote / messaging transports. |
% list every instantiable device class the installation knows about
classNames = dabs.resources.Device.findAllDevices();
See also
Devices for the configuration side of each of these.