Summary: |
Hardware autofocus device combining shutter, camera, and Z-stage |
Author: |
Nico Stuurman |
License: |
BSD |
Platforms: |
Linux, Mac, and Windows |
ReflectorFocus
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:
-
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.
-
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”.
-
Calibrations are stored in a file “Util-Autofocus.json”.
-
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.
-
You can use the Utilities-Autofcous-Offset device to set offsets from the in focus position.
-
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.