bluesky / ophyd-async

Hardware abstraction for bluesky written using asyncio
https://blueskyproject.io/ophyd-async
BSD 3-Clause "New" or "Revised" License
10 stars 23 forks source link

Decide the interface between `StandardDetector` and `DetectorController` w.r.t. the `TriggerInfo` that is passed down in `prepare` #405

Closed coretl closed 2 weeks ago

coretl commented 3 months ago

As mentioned in https://github.com/bluesky/ophyd-async/pull/401#discussion_r1644527435 and https://github.com/bluesky/ophyd-async/pull/401#discussion_r1644506670, we need to decide what StandardDetector does with the TriggerInfo passed down to prepare. We should also consider #162 and #357 while we're at it. I propose:

We should also document the various permutations of TriggerInfo and provide any common helpers like the one defined in #401. The cases we need to document:

We still need to work out if we should provide things like min_exposure and max_framerate as well as get_deadtime(exposure), but this will we tackled in a different issue

coretl commented 3 months ago

@callumforrester @abbiemery @evalott100 @DiamondJoseph thoughts?

callumforrester commented 3 months ago

I think there is a use case for keeping the detector to minimum deadtime while the system as a whole has a longer deadtime, which is what this diagram covers. Do any your permutations cover that?

image

coretl commented 3 months ago

Yes, as this is a property of the trigger generation system, rather than the detector. In the case above the TriggerInfo.deadtime (which the docstring describes as the minimum deadtime) will be the output of get_deadtime(exposure), while the trigger system will actually provide a bigger gap between triggers as shown by your diagram

coretl commented 2 months ago

Need a discussion with @jwlodek and @tomtrafford

ZohebShaikh commented 3 weeks ago

After future discussion,

We have decide to have

StandardDetector.prepare() -> DetectorController.prepare()

StandardDetector.kickoff() -> DetectorController.arm()

StandardDetector.trigger() -> DetectorController.arm()