Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Defer creation of HDF5 file until prepare/trigger #314

Closed
callumforrester opened this issue May 17, 2024 · 2 comments · Fixed by #466
Closed

Defer creation of HDF5 file until prepare/trigger #314

callumforrester opened this issue May 17, 2024 · 2 comments · Fixed by #466
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@callumforrester
Copy link
Contributor

Calling in prepare/trigger rather than stage would mean we can tie the file path into contextual information about the run. stage is normally called before open_run so creating the file in stage 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 time describe is called, i.e. the declare_stream plan.

@abbiemery
Copy link
Collaborator

This is needed so we can use multipliers. Closing old issue #129 in favour of this.

@coretl
Copy link
Collaborator

coretl commented Jun 24, 2024

Suggested changes to StandardDetector:

    #: 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 it
  • As per Add step scan support into the prepare for the standard detector #123, only set self._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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants