Edit page History How do I edit this website?

Utilities

Summary:

Various abstract devices

Author:

Nico Stuurman

License:

LGPL

Platforms:

Linux, Mac, and Windows

Devices:

Multi-Shutter, Multi-Camera
DA-Shutter, DA-Z-Stage, DA--XY-Stage
Autofocus-Stage
State-Device-Shutter
Autofocus (controls hardware autofocus)


These abstract devices can be used to change the function of a real device or to combine multiple real devices into a single, logical device.

Multi-Shutter

Combines multiple shutters into a single logical shutter, opens and closes multiple shutters simultaneously. You will need to set the “Physical Shutter: properties (up to 5 shutters can be set). It is easiest to set these in the “System” “Startup” group so that they will be set automatically upon loading the configuration file.

Multi-Camera

Combines multiple cameras into a single logical camera. Snapping an image with a multi-camera device will result in a single multi-channel image, where each image is taken with one camera. Some cameras may not be fully supported (at this point in time, the demo and Andor cameras work with the adapter; at least Hamamatsu Flash4 and PCO Edge also work).

Setup

  1. The cameras must have the same width, height and pixeltype (or strange things may happen).
  2. For multiple cameras using the same DeviceAdapter, add that DeviceAdapter as many times as there are cameras.
  3. Assign the Multi-Camera “Physical Camera” properties to your cameras. Best practice is to also add these “Physical Camera” properties in the “System” group’s “Startup” preset, to set them automatically upon loading the configuration file as described in the Configuration Guide.
  4. Synchronizing cameras requires wiring the exposure digital output of one camera (namely, the “Main” camera) to the trigger input of other cameras (the “Follower” camera(s)).
  5. To rotate or mirror images, launch the Image Flipper plugin. The plugin only works while it is open. Also after restarting Micro-Manager, to apply mirror and flip settings, one has to click through the top listbox of the plugin and select each camera that has flip and/or rotate settings enabled to load its settings.

The Main camera must be the last numbered Physical Camera, since several frames can be acquired by one camera before the next camera starts acquiring. e.g. Set Physical Camera 1 to Follower, and Physical Camera 2 to Main.

Going “Live” using the Multi-Camera adapter controlling large sensor cameras can crash Micro-Manager in versions earlier than 1.4.16. Improvements to the core have fixed this issue.

Multi Stage

Combines two physical 1D stages into a single logical 1D stage. The scale factor and offset for both physical stages are specified as properties. When setting a position, all know stages will be moved using the formula:

physicalPos = stageScalings_[i] * position + stageTranslations_[i]; stage->SetPositionUm(physicalPos);

Make sure to specify the properties “PhysicalStage-1” and “PhysicalStage-2” (e.g. in System->Startup group preset).

Combo XY Stage

Combines two physical 1D stages into a single logical 2D stage. The scale factor and offset for both physical stages are specified as properties. Make sure to specify the properties “PhysicalStage-X” and “PhysicalStage-Y” (e.g. in System->Startup group preset).

Single Axis Stage

Takes a single axis of a 2D stage and treats it as a 1D stage. Make sure to specify the properties “PhysicalStage” and “PhysicalAxis” (e.g. in System->Startup group preset).

DA-Shutter

Uses a DA (digital to analogue) device as a shutter. Use the property “DA Device” to determine which DA device should act as the shutter. Closing the DA Shutter will result in 0V on the DA output, opening the DA shutter will result in the voltage set in the DA device itself to appear on the output. For this device to work correctly, some code needs to be implemented in the DA device adapter, which appears to be done for all DA devices currently supported by Micro-Manager.

DA-Z-Stage

Uses a DA device to set the position of a Z-stage that is connected to the DA device. This is especially useful for several piezo stages whose position can be controlled with a voltage. You will need to set pre-initialization properties determining the minimum and maximum voltage to be applied on the DA and the Z positions these correspond to. The DA device itself should be set after initialization and can best be added to the System Startup group.

DA-XY-Stage

Similar to the DA-Z-Stage adapter, but now sets to DA devices simultanuously, one corresponding to the X-stage, the other to the Y-stage.

DA-TTL-State-Device

Given 1 to 8 analog output (DA) devices, the DATTLStateDevice will provide a virtual device that combines the DA devices into a single 1- to 8-bit digital (TTL) output device. Each DA device works as a 1-bit digital output line. When using this device, the DA device itself will no longer report the “real” analog output, so you should ignore those settings, and only use the DA-TTL-State-Device. Also, do not combine this with the DA-Shutter or DA-Z-stage (this will easily lead to unexpected outcomes). You will need to set which DA devices are controlled by the DA-TTL-State-Device (best done in the System-Startup group). Other options are the “high” voltgae (3.3 or 5.0 V), and whether to invert the output (it can happen that a device is actived when the TTL is low, in principle you could configure the “state: to reflect this correctly, but the mental gymnastics are extreme, so it is often easier to use the “invert” property.

Autofocus Stage

Can be used to operate the ‘offset’ function of a hardware autofocus device (such as the Nikon Perfect Focus and Zeiss Definite Focus) as a Z-drive.

Autofocus

Combines a Shutter, camera and Z-Stage into a hardware autofocus. For this to work, the shutter must control a light source (such as an infra-red LED or laser) that reflects of the sample carrier and causes a reflection on the camera image that changes position when the Z-stage moves. Configuring this device involves multiple steps:

  1. Define the “Devices” (Devices-Camera, Devices_Shutter, Devices_FocusDrive). Add these properties to your System-Startup configuration as these will need to be set every time.

  2. Before you can use the autofocus it needs to be calibrated. First determine what Camera_ settings you want to use (ROI-X, ROI_Y, ROI_Height, ROI_Width, Binning, Exposure_Ms). You can do so by taking images with the autofocus camera and shutter while you are roughly in focus with the objective that you want to use and experimenting with these settings in the normal MM UI. Then, set the desired cliabration properties, such as Precision (distance in microns away from the ideal focus point that will be accepted as in focus), SpotSelection (Bottom: bottom of the sample vessel, Top: top of the sample vessel), Max_Z (maximum Z position of the ZStage, beyond which the autofocus will not venture). Select a number for “Settings” (you can have many calibrations, and switch between them, for instance when you switch objectives), and “SettingsDescription” which will provide a name for your to remember what these Settings were. Then, from the property “Calibrate”, select “Start”.

  3. Calibrations are stored in a file “Util-Autofocus.json”.

  4. The autofcous will operate in one-shot mode and in continuous focus mode, in which case it will update the status property of the autofocus automatically.

  5. You can use the Utilities-Autofcous-Offset device to set offsets from the in focus position.

  6. You can use the property “MeasureOffset” to measure the offset between the current position and the position that is in focus according to your calibration.

State-Device-Shutter

To be used to convert a state device (such as a filter wheel) into a shutter. To use it you will need to set the “State Device Shutter” property to the desired state device. The state device should have a property that sets the “closed” position.

Click here to search for Utilities on the Micro-Manager mailing list archive.