Andor Solis Cameras¶
A labscript device for controlling Andor scientific cameras via the Andor SDK3 interface.
Presently, this device is hard-coded for use with the iXon camera. Minor modifications can allow use with other Andor cameras, so long as they are compatible with the Andor SDK3 library.
The Andor SDK is available from Andor as a paid product (typically purchased with the camera). It must be installed with the SDK directory added to the system path.
AndorSolis(name, parent_device, connection, serial_number, orientation=None, trigger_edge_type='rising', trigger_duration=None, minimum_recovery_time=0.0, camera_attributes=None, manual_mode_camera_attributes=None, stop_acquisition_timeout=5.0, exception_on_failed_shot=True, saved_attribute_visibility_level='intermediate', mock=False, **kwargs)¶
A camera to be controlled using NI IMAQdx and triggered with a digital edge.
name (str) – device name
parent_device (IntermediateDevice) – Device with digital outputs to be used to trigger acquisition
connection (str) – Name of digital output port on parent device.
orientation (str, optional) –
<name>Description of the camera’s location or orientation. This will be used to determine the location in the shot file where the images will be saved. If not given, the device name will be used instead.
trigger_edge_type (str) –
'rising'The direction of the desired edges to be generated on the parent devices’s digital output used for triggering. Must be ‘rising’ or ‘falling’. Note that this only determines the edges created on the parent device, it does not program the camera to expect this type of edge. If required, one must configure the camera separately via
camera_attributesto ensure it expects the type of edge being generated. Default:
trigger_duration (float or None) –
NoneDuration of digital pulses to be generated by the parent device. This can also be specified as an argument to
expose()- the value given here will be used only if nothing is passed to
minimum_recovery_time (float) –
0Minimum time between frames. This will be used for error checking during compilation.
camera_attributes (dict, optional) – Dictionary of camera attribute names and values to be programmed into the camera. The meaning of these attributes is model-specific. Attributes will be programmed in the order they appear in this dictionary. This can be important as some attributes may not be settable unless another attrbiute has been set first. After adding this device to your connection table, a dictionary of the camera’s default attributes can be obtained from the BLACS tab, appropriate for copying and pasting into your connection table to customise the ones you are interested in.
manual_mode_camera_attributes (dict, optional) – Dictionary of attributes that will be programmed into the camera during manual mode, that differ from their values in
camera_attributes. This can be useful for example, to have software triggering during manual mode (allowing the acquisition of frames from the BLACS manual mode interface) but hardware triggering during buffered runs. Any attributes in this dictionary must also be present in
stop_acquisition_timeout (float) –
5.0How long, in seconds, to wait during
transition_to_bufferedfor the acquisition of images to complete before giving up. Whilst all triggers should have been received, this can be used to allow for slow image download time.
exception_on_failed_shot (bool) –
True. If acquisition does not complete within the given timeout after the end of a shot, whether to raise an exception. If False, instead prints a warning to stderr (visible in the terminal output pane in the BLACS tab), saves the images acquired so far, and continues. In the case of such a ‘failed shot’, the HDF5 attribute f[‘images’][orientation/name].attrs[‘failed_shot’] will be set to
True(otherwise it is set to
False). This attribute is acessible in the lyse dataframe as
saved_attribute_visibility_level (str or None) – ‘intermediate’ The detail level of the camera attributes saved to the HDF5 file at the end of each shot. If None, no attributes will be saved. Must be one of
None, no attributes will be saved.
mock (bool, optional) – False For testing purpses, simulate a camera with fake data instead of communicating with actual hardware.
**kwargs – Further keyword arguments to be passed to the
__init__method of the parent class (TriggerableDevice).
description= 'Andor scientific camera'¶
AndorSolisTab(notebook, settings, restart=False)¶
Grab last/single image
grab_multiple(n_images, images, waitForNextBuffer=True)¶
Grab n_images into images array during buffered acquistion.
Acquire a single image and return it
Return a dict of the attributes of the camera for the given visibility level
Andor cameras may not be specified by serial numbers