This is rough/broken draft of the general idea for a protocol of event modifiers/adders that I mentioned in #41
The crux of it is in the docstring of the EventModifiers class:
Callable object that can modify the yielding of events in a sequence.
During iteration of an MDASequence, this object will be called with the event
about to be yielded (event), and the upcoming event in the sequence
(next_event), which may be None if this is the last event in the sequence.
It should return:
MDAEvent: A possibly-modified event to replace this event. The input
event may be returned unmodified to keep the event unchanged.
Sequence[MDAEvent]: event(s) to be inserted before event. (The events
will NOT be passed to other event modifiers in the chain).
None: to skip this event altogether (i.e. "block" the event.)
It's a generalization of (and would replace) autofocus and keep shutter open plans. but it still needs some work, and feedback, so marking as draft
This is rough/broken draft of the general idea for a protocol of event modifiers/adders that I mentioned in #41
The crux of it is in the docstring of the EventModifiers class:
It's a generalization of (and would replace) autofocus and keep shutter open plans. but it still needs some work, and feedback, so marking as draft