Description
The Machine data file is a MATLAB .m file that contains parameters that describe the hardware configuration of your microscope. These parameters are expected to rarely change.
It is only read when ScanImage starts; any change during an experiment requires a Matlab restart.
It is required for ScanImage to start. If the file is missing, you'll be asked to configure or locate one. For a fresh installation, choose to create a new file. A new file will be opened in the Matlab editor, and parameters will be added with default values for you to customize. Be sure to save the file after editing each section.
Sections
Section | Description |
---|---|
ScanImage | General ScanImage behavior (for example, simulated mode). |
Shutters | Shutter(s) used to prevent any beam exposure from reaching specimen during idle periods. |
Beams | Beam control and calibration channels. Typically used to control Pockels cells. |
ResScan | Resonant scanning imaging system |
LinScan | Linear scanning imaging system (galvo/galvo scanning) |
FastZ | FastZ hardware used for fast axial motion, supporting fast stacks and/or volume imaging. |
Motors | Motor used for X/Y/Z motion, including stacks. |
Parameters
ScanImage
Parameter | Description |
---|---|
scannerNames | Cell array of scannerNames, names must follow convention of Matlab variables (avoid spaces and special characters) |
scannerTypes | Cell array indicating the type of scanner for each name. Current options: {'Resonant' 'Linear'} |
simulated | allows starting ScanImage 2015 without any physical hardware present. Note: Simulated DAQ-hardware in MAX is still required. |
components | activate plugins for specific hardware configurations (ThorECU1, ThorBScope2) |
dataDir | Directory to store persistent configuration and calibration data. |
Example
Shutters
Parameter | Description |
---|---|
shutterDaqDevices | DAQ device name where the pin for the shutter is located |
shutterChannelIDs | Channel ID for each shutter. Default: 'PFI12' |
shutterOpenLevel | logic level that opens the shutter. Default: true |
shutterOpenTime | time in seconds it takes the shutter to fully open |
Example
Beams
Parameter | Description |
---|---|
beamDaqDevices | Cell array of DAQ device names {'PXI1Slot4','Dev1',...} that control the shutters. For each device listed in the cell array, the section below needs to be duplicated, and x needs to be replaced by the index of the DAQ device (PXI1Slot4 has index 1, Dev1 has index 2) |
beamDaqs(x).modifiedLineClockIn | an empty string ('') or one of PFI0..15 to which external beam trigger is connected. Leave empty if DAQ device is in main PXI chassis* |
beamDaqs(x).frameClockIn | an empty string ('') or one of PFI0..15 to which external frame trigger is connected. Leave empty if DAQ device is in main PXI chassis* |
beamDaqs(x).referenceClockIn | an empty string ('') or PFI14 to which external beam trigger is connected. Leave empty if DAQ device is in main PXI chassis* |
beamDaqs(x).chanIDs | Array of integers specifying AO channel IDs, one for each beam modulation channel. Length of array determines number of 'beams' on beamDaqDevice #x |
beamDaqs(x).displayNames | String or cell string array of device name(s) containing beam modulation channels. If single string, applies to all channels in beamChanIDs |
beamDaqs(x).voltageRanges | Scalar or array of values specifying voltage range to use for each beam. Scalar applies to each beam on beamDaqDevice #x |
beamDaqs(x).calInputChanIDs | Array of integers specifying AI channel IDs, one for each beam modulation channel on beamDaqDevice #x. Values of nan specify no calibration for particular beam |
beamDaqs(x).calOffsets | (optional) Array of beam calibration offset voltages for each beam calibration channel on beamDaqDevice #x |
beamDaqs(x).calUseRejectedLight | Boolean scalar or array for each calibration channel on beamDaqDevice #x, indicating if the photodiode measures the rejected light from the Pockels cell. |
beamDaqs(x).calOpenShutterIDs | Array of indices of shutters that need to be opened for the beam illuminating the photodiode. |
Example
ResScan
Configures the Resonant Scanning imaging system.
Parameter | Description |
---|---|
nominalResScanFreq | nominal frequency of the resonant scanner, in Hz |
beamDaqID | numeric beam DAQ ID (as configured in section 'Beams') that controls Pockels cell(s) to be used with ResScan |
shutterIDs | numeric shutter ID(s) (as configured in section 'Shutters') that need to open when imaging with ResScan |
primaryPxiChassisNum | PXI Chassis ID (as configured in NI MAX) TO BE REMOVED IN FUTURE VERSIONS |
digitalIODeviceName | device used to import/export triggers and clocks. can be a DAQ device (usually the same as galvoDevice) or the FPGA ('RIOx') |
fpgaModuleType | FlexRIO FPGA module used with ResScan (usually 'NI7961' or 'NI7975') |
digitizerModuleType | FlexRIO Adapter module used with ResScan (usually 'NI5732' or 'NI5734') |
rioDeviceID | name of FlexRIO FPGA adapter module as configured in NI-MAX (usually 'RIO0') |
channelsInvert | true/false indicating if polarity of PMT output is inverted |
externalSampleClock | true/false indicating if FlexRIO FPGA adapter module is synchronized to external clock (i.e. laser sync clock) |
externalSampleClockRate | if externalSampleClock = true nominal rate of external clock in Hz (e.g. 80MHz) |
galvoDeviceName | Name of DAQ device controlling the (x/)y galvo(s) |
galvoDeviceFrameClockIn | if galvo device is outside PXI chassis, configure terminal that imports the frame clock (e.g. 'PFI0') |
galvoAOChanIDX | (optional, for multi-ROI mode) AO channel number on Galvo DAQ device that controls the X-Galvo |
galvoAOChanIDY | AO channel number on Galvo DAQ device that controls the Y-Galvo |
xGalvoAngularRange | (optional, for multi-ROI mode) full range of x-Galvo in optical degrees (find value) |
yGalvoAngularRange | full range of y-Galvo in optical degrees (find value) |
galvoVoltsPerOpticalDegreeX | (optional, for multi-ROI mode) galvo conversion factor from optical degrees to volts (find value) |
galvoVoltsPerOpticalDegreeY | galvo conversion factor from optical degrees to volts (find value) |
galvoParkDegreesX | (optional, for multi-ROI mode) Park angle for X-Galvo in optical degrees |
galvoParkDegreesY | Park angle for Y-Galvo in optical degrees |
resonantAngularRange | full range of resonant scanner in optical degrees (find value) |
resonantZoomDeviceName | Name of DAQ device controlling the resonant scanner amplitude (zoom) |
resonantZoomAOChanID | AO channel number on resonant scanner DAQ device that controls the resonant scanner amplitude zoom) |
rScanVoltsPerOpticalDegree | full range of resonant scanner in optical degrees (find value) |
resonantScannerSettleTime | time in seconds needed for the resonant scanner to reach a stable oscillation |
Example
LinScan
Configures the LinScan imaging system (galvo/galvo scanning). Please review Configuring LinScan (Galvo Galvo scanning) for setup instructions.
Parameter | Description |
---|---|
deviceNameAcq | DAQ device name used for PMT inputs |
deviceNameGalvo | DAQ device name used for Galvo control |
deviceNameAux | DAQ device name used for trigger import/output and clock generatione |
channelsInvert | logical scalar or array indicating if the polarity of the PMT outputs is inverted |
beamDaqID | numeric beam DAQ ID (as configured in section 'Beams') that controls Pockels cell(s) to be used with LinScan |
shutterIDs | numeric shutter ID(s) (as configured in section 'Shutters') that need to open when imaging with ResScan |
resScanframeClockIn | PFI line for importing the resonant scanning frame clock. Required for simultaneous imaging and photo stimulation monitoring/logging. Leave empty if galvo control DAQ is installed in PXI chassis. |
referenceClockIn | PFI line for importing a 10MHz reference clock. Required for simultaneous imaging and photo stimulation monitoring/logging. Leave empty if galvo control DAQ is installed in PXI chassis. |
XMirrorChannelID | AO channel ID on the Galvo control DAQ board that controls the X-Galvo |
YMirrorChannelID | AO channel ID on the Galvo control DAQ board that controls the Y-Galvo |
xGalvoAngularRange | Full range of the X-Galvo in optical degrees |
yGalvoAngularRange | Full range of the Y-Galvo in optical degrees |
scanParkAngleX | Park position of the X-Galvo in optical degrees |
scanParkAngleY | Park position of the Y-Galvo in optical degrees |
voltsPerOpticalDegreeX | galvo conversion factor from optical degrees to volts |
voltsPerOpticalDegreeY | galvo conversion factor from optical degrees to volts |
scanOffsetAngleX | galvo scan offset in optical degrees (can correct for small alignment issues) |
scanOffsetAngleY | galvo scan offset in optical degrees (can correct for small alignment issues) |
channelIDs | Array of AI IDs on Acquisition DAQ board for PMT input. Leave empty for default value of [0,1,2,3] |
Example
FastZ
Parameter | Description |
---|---|
fastZControllerType | If supplied, one of {'useMotor2', 'pi.e665', 'pi.e816', 'npoint.lc40x'} |
fastZCOMPort | Integer identifying COM port for controller, if using serial communication |
fastZBaudRate | Value identifying baud rate of serial communication. If empty, default value for controller used. |
fastZDeviceName | String specifying device name containig AI channel used for FastZ position sensor |
frameClockIn | an empty string ("") or one of PFI0..15 to which external beam trigger is connected. Leave empty if the DAQ device is in the main PXI chassis. |
fastZAOChanID | Scalar integer indicating AO channel used for FastZ control on the FastZ DAQ device |
fastZAIChanID | Scalar integer indicating AI channel used for FastZ sensor on the FastZ DAQ device |
Example
Motors
Parameters | Description |
---|---|
motorControllerType | If supplied, one of {'thorlabs.bscope', 'sutter.mp285', 'sutter.mpc200', 'scientifica', 'pi.e665', 'pi.e816'} |
motorDimensions | If supplied, one of {'XYZ', 'XY', 'Z'}. Defaults to 'XYZ'. |
motorStageType | Some controller require a valid stageType be specified |
motorCOMPort | Integer identifying COM port for controller, if using serial communication |
motorBaudRate | Value identifying baud rate of serial communication. If empty, default value for controller used. |
motorZDepthPositive | Logical indicating if larger Z values correspond to greater depth |
motorPositionDeviceUnits | 1x3 array specifying, in meters, raw units in which motor controller reports position. If unspecified, default positionDeviceUnits for stage/controller type presumed. |
motorVelocitySlow | Velocity to use for moves smaller than motorFastMotionThreshold value. If unspecified, default value used for controller. Specified in units appropriate to controller type. |
motorVelocityFast | Velocity to use for moves larger than motorFastMotionThreshold value. If unspecified, default value used for controller. Specified in units appropriate to controller type. |
motor2ControllerType | If supplied, one of {'thorlabs.bscope', 'sutter.mp285', 'sutter.mpc200', 'scientifica', 'pi.e665', 'pi.e816'} |
motor2StageType | Some controller require a valid stageType be specified |
motor2COMPort | Integer identifying COM port for controller, if using serial communication |
motor2BaudRate | Value identifying baud rate of serial communication. If empty, default value for controller used |
motor2ZDepthPositive | Logical indicating if larger Z values correspond to greater depth |
motor2PositionDeviceUnits | 1x3 array specifying, in meters, raw units in which motor controller reports position. If unspecified, default positionDeviceUnits for stage/controller type presumed. |
motor2VelocitySlow | Velocity to use for moves smaller than motorFastMotionThreshold value. If unspecified, default value used for controller. Specified in units appropriate to controller type. |
motor2VelocityFast | Velocity to use for moves larger than motorFastMotionThreshold value. If unspecified, default value used for controller. Specified in units appropriate to controller type. |
moveCompleteDelay | Delay in sceonds from when stage controller reports move is complete until move is actually considered complete. Allows settling time for motor |