Skip to content

StandardDetector.stage behavior with writer and trigger info #825

Description

@thopkins32

Hello, while implementing #726, I ran into an issue where you can't really set the TriggerInfo for a simple count plan easily.

For example, if I try to do

trigger_info = TriggerInfo(number_of_events=1, exposures_per_event=5)
# Prepare the detector to use capture 5 exposures in a single event
RE(bps.prepare(det, trigger_info))
# EXPECTED: Gather data for 5 events. 5 events x 5 exposures per event = 25 total
# ACTUAL: 5 total since trigger_info is unset in stage()
RE(bp.count([det], num=5))

The only way around this is to create a custom plan that calls stage() before bps.prepare and make it into a single RE call.

This begs the question, should we really be unsetting TriggerInfo during stage()?
Should we be closing the file writer during stage()?

https://github.com/bluesky/ophyd-async/blob/main/src/ophyd_async/core/_detector.py#L230-L231

Acceptance Criteria

  • My example above runs and produces 25 exposures as output

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions