-
Notifications
You must be signed in to change notification settings - Fork 6
Description
Description of the feature
@Cathyhjj was working on the dispersive XAS technique, and is in need of a plan to trigger multiple frames on a detector.
Right now, we have bp.count(), but this resets the area detector with each count, making it way too slow. We need a plan that produces 1 acquisition, and >1 frames per trigger.
Requirements
- Plan should match the call signature of
bp.count(), with optional argument exposures_per_event - Plan should instruct the detectors to record multiple frames per trigger
Suggested Solution
Maybe we can re-use bp.count() and provide it with a per_step argument that prepare's the detectors.
Question: What does it mean for a scaler to record multiple exposures for one trigger event?
Justification
One of the main benefits of dispersive XAS is the speed with which frames can be collected. If some process is happening really fast, we want to measure a bunch of frames successively. With bp.count(), we have ~1 s of overhead due to the detector needing to reset every frame. This negates the speed benefit of dispersive XAS.
Additional context
Here's the current description of ophyd-async TriggerInfo. This will likely need to be set up and given to each detector using bps.prepare().
number_of_events: NonNegativeInt | list[NonNegativeInt] = Field(default=1)
"""Number of events that will be processed, (0 means infinite).
Can be:
- A single integer or
- A list of integers for multiple events
Example for tomography: ``TriggerInfo(number_of_events=[2,3,100,3])``.
This would process:
- 2 events for dark field images
- 3 events for initial flat field images
- 100 events for projections
- 3 events for final flat field images
"""
trigger: DetectorTrigger = Field(default=DetectorTrigger.INTERNAL)
"""Sort of triggers that will be sent"""
deadtime: float = Field(default=0.0, ge=0)
"""What is the minimum deadtime between exposures"""
livetime: float | None = Field(default=None, ge=0)
"""What is the maximum high time of the exposures"""
exposure_timeout: float | None = Field(default=None, gt=0)
"""What is the maximum timeout on waiting for an exposure"""
exposures_per_event: PositiveInt = 1