ophyd.areadetector.trigger_mixins.MultiTrigger

class ophyd.areadetector.trigger_mixins.MultiTrigger(*args, trigger_cycle=None, **kwargs)

This trigger mixin class can take multiple acquisitions per trigger.

This can be used to give more control to the detector. One call to ‘trigger’ can be interpreted by the detector as a call to take several acquisitions with, for example, different gain settings or shutter positions.

The are two levels of nesting here:

  • cycling through different actions on successive calls to trigger

  • within each trigger, executing a list of acquisitions with different settings

See the example below, which takes and 3 and 1 acquisitions in alternation.

Examples

>>> class MyDetector(SimDetector, MultiTrigger):
...     pass
# EXAMPLE:
# 1. On the first trigger, close the shutter and acquire three images
# with different gain settings on the detector. Then open the shutter
# and take a light frame.
# 2. On the next trigger, just take a light frame.
# Repeat.
#
# Each element of this list specifies one acquisition. It gives a
# a label for each kind of image that will be taken and a dictionary
# mapping signals to values that must be set for that acquisition.
>>> dark_and_light = [('gain1', {'shutter': 'close', 'image_gain': 1}),
...                   ('gain2', {'image_gain': 2}),
...                   ('gain8', {'image_gain': 8}),
...                   ('light', {'shutter': 'open'})],
# This list only has one element; it will only take one acquisition.
>>> light_only = [('light', {'shutter': 'open'}]]
# Finally, put the lists together. The detector will cycle through
# this list as it is triggered.
>>> trigger_cycle = [dark_and_light, light_only]
>>> det = MyDetector(trigger_cycle=trigger_cycle)
# Note: for simplicity, the settings were specified as dictionaries. If
# you need to control the order that they are processed, use
# OrderedDict instead.
__init__(*args, trigger_cycle=None, **kwargs)

Methods

__init__(*args[, trigger_cycle])

describe()

Provide schema and meta-data for read().

pause()

Attempt to ‘pause’ the device.

read()

Read data from the device.

resume()

Resume a device from a ‘paused’ state.

stage()

Stage the device for data collection.

trigger()

Trigger one or more acquisitions.

unstage()

Unstage the device.

Attributes

trigger_cycle