Scan2D Subclasses
Scan2D: Imaging Systems documents the contract every imaging system honors. This page covers what each concrete subclass adds - the properties you need once you know which scanner you are actually driving.
Class |
|
Hardware |
|---|---|---|
|
varies |
Resonant plus galvo, on National Instruments hardware. |
|
|
Galvo-galvo, on National Instruments hardware. |
|
varies |
Resonant-galvo-galvo on the vDAQ. Switches between resonant, linear and stage scanning modes. |
|
|
Spatial light modulator, usually paired with a linear scanner. |
class(hSI.hScan2D)
hSI.hScan2D.scannerType
hSI.hScan2D.hasResonantMirror
hSI.hScan2D.hasXGalvo
RggScan
The vDAQ scanner, and the one most current systems use. Its distinguishing feature is
scanMode: one physical scanner is driven as a resonant, a linear or a stage scanning
system, and ScanImage caches the mode-specific settings so switching between them does not
lose your configuration.
Property |
Description |
|---|---|
|
|
|
The per-mode cache. Leaving a mode stores that mode’s properties; returning to it
restores them. Linear mode caches |
|
Digitizer rate. Settable only in linear mode; in resonant mode it is fixed by the hardware. |
|
Control (mirror output) sample rate, actual and requested. |
|
Feedback recording rate. |
|
Samples per pixel, applied in linear mode or when |
|
When true, every pixel is formed from the same number of samples, so the resonant scanner’s non-uniform velocity across the field is not corrected. |
|
The resonant scan mask - samples binned per pixel along a line. |
|
Leave the resonant scanner running between acquisitions, avoiding settle time and temperature drift. |
|
How line phase is estimated when it has not been measured at the current amplitude.
Default |
|
Per-axis actuator lag compensation. |
|
Display striping period, in seconds. |
|
Record galvo position feedback to disk. |
|
Which vDAQ acquisition engine to use. |
|
Skip the divide when averaging logged frames. |
|
Dark counts subtracted per channel. |
|
True when the Y galvo is currently acting as a motor. |
|
Attached VCAM, if configured. |
|
Read-only sample counts for arbitrary line scanning. |
RggScan also implements scanimage.components.scan2d.interfaces.SignalConditioning,
which is where the laser-trigger and signal-conditioning settings live.
See also
Stage Scanning for scanMode = 'stage'.
hSI.hScan2D.scanMode = 'linear'; % settings for resonant mode are cached
hSI.hScan2D.sampleRate = 1.25e6; % now settable
hSI.hScan2D.scanMode = 'resonant'; % resonant settings come back
ResScan
The National Instruments resonant scanner.
Property |
Description |
|---|---|
|
|
|
Read-only; fixed by the digitizer. |
|
Default 50. Applies when |
|
As for |
|
Per-channel: disable sample averaging within a pixel. |
|
As for |
|
Invert the sign of the acquired channels. |
|
Clock the digitizer externally. Default rate 80 MHz. |
|
Enable the auxiliary trigger inputs. |
|
Terminal carrying the laser trigger. |
|
Laser-gated sampling, for low repetition rate sources. |
|
Actuator lag compensation. |
See also
Acquisition Gating for low rep rate Lasers for the laser trigger settings in context.
LinScan
The National Instruments galvo-galvo scanner. hasXGalvo is true and
hasResonantMirror is false.
Property |
Description |
|---|---|
|
|
|
Digitizer and mirror control rate. Default 1.25 MHz, and settable. |
|
XY galvo control task rate. |
|
Default 4. |
|
For line scanning, record galvo position feedback to disk. |
|
Feedback recording rate. Default 50 kHz. |
|
Disable sample averaging within a pixel. |
|
Display rate limits, in Hz. |
|
Terminals the clocks and start trigger are exported on. |
|
Laser-gated sampling. |
|
The acquisition and auxiliary DAQ boards. |
SlmScan
SLM-based scanning. It reports hasXGalvo and hasResonantMirror as false, and pairs
with a linear scanner for beam positioning.
Property |
Description |
|---|---|
|
|
|
Excitation wavelength in meters. Default 635 nm. |
|
Point holography mode. |
|
XY reference angle of the paired galvos - the zero point for the SLM. |
|
Rate at which the SLM is repointed between samples. Clamped to the device’s
|
|
Read-only digitizer rate. Note this is not the SLM repointing rate; that is
|
|
Data-scope acquisition window per SLM pixel. On the laser-gated path the number of
pulses averaged per pixel is roughly |
|
Z of the plane the SLM scans, in reference-space microns - the SLM defocus from the
objective focal plane. Independent of |
|
Park position, in microns. |
|
|
|
Scale per-pixel beam power by |
|
Wavefront correction for the current wavelength, and the wavelength it was measured at. |
|
The SLM lookup table. |
|
vDAQ acquisition engine index. |
Warning
applyDiffractionEfficiencyToPower must be false while acquiring data for
a diffraction efficiency calibration - otherwise the calibration measures its own
correction.
See also
SLM Optogenetics, and the SLM branch of the coordinate system tree in ScanImage Coordinate System Instances.
DataScope
hSI.hScan2D.hDataScope gives access to raw digitizer samples, below the image formation
layer. It is the tool for checking what the PMT signal actually looks like - pulse shapes,
baseline, saturation - rather than what the image looks like after binning.
Property |
Description |
|---|---|
|
One of |
|
Which line or slice to trigger on. |
|
Delay after the trigger, in seconds. |
|
Channel to acquire. |
|
Medium-speed mode only. Return |
|
When false, samples come back raw, without the per-channel invert sign. |
|
Input range, in volts. |
|
Seconds to acquire. Default 0.1. |
|
Requested rate; empty uses the digitizer rate. |
|
Include the digital lines and the sync trigger in the returned data. |
|
Called with each acquisition. Defaults to |
|
Called on error. |
|
Read-only. True while acquiring. |
|
Read-only capability and rate information. |
Method |
Description |
|---|---|
|
Start a triggered acquisition. |
|
Start a free-running acquisition. |
|
Acquire once and hand the data to |
|
Stop. |
|
Translate a display hover position into a pixel, so the scope can be pointed at what the cursor is over. |
hDS = hSI.hScan2D.hDataScope;
hDS.channel = 1;
hDS.trigger = 'line';
hDS.acquisitionTime = 1e-3;
hDS.callbackFcn = @(src,evt) plot(evt.data);
hSI.startFocus();
hDS.start();
% ...
hDS.abort();
Note
The data scope is available on vDAQ-based scanners. hDataScope is empty on
imaging systems that do not provide one, so check before using it.