Open callumforrester opened 1 month ago
This is needed so we can use multipliers. Closing old issue #129 in favour of this.
Suggested changes to StandardDetector
:
TriggerInfo
should add:
#: How many triggers make up a single StreamDatum index, to allow multiple frames
#: from a faster detector to be zipped with a single frame from a slow detector
#: e.g. if num=10 and multiplier=5 then the detector will take 10 frames, but publish
#: 2 indices, and describe() will show a shape of (5, h, w)
multiplier: int = 1
stage()
should only call writer.close()
, not writer.open()
, and should set self._trigger_info
to None
_prepare()
will set multipliers based on the TriggerInfo
, then call writer.open()
with itself._trigger_info
if it has not already been set by prepare()
, and check that self._trigger_info.trigger==TriggerInfo.internal
Should be done with knowledge of how the interface between StandardDetector
and DetectorController
will change in #405
Calling in
prepare
/trigger
rather thanstage
would mean we can tie the file path into contextual information about the run.stage
is normally called beforeopen_run
so creating the file instage
means the run does not exist at the time of creation. Any solution has to be mindful of pre-declare, the file must exist by the timedescribe
is called, i.e. thedeclare_stream
plan.