Rename multiplier to exposures_per_event and move to first dim of shape#726
Conversation
… dataset description" This reverts commit 488d7eb.
…ve-multiplier-to-first-dim
Just discussed in the collab call, and there was widespread concern about what else might break when these descriptors change from |
|
@jwlodek @coretl @genematx Please review the change of default behavior for single scalars, then we should be good to merge. Although either One final question is whether to say whether the |
|
Thank you, @thomashopkins32. LGTM! |
…ve-multiplier-to-first-dim
…ve-multiplier-to-first-dim
jwlodek
left a comment
There was a problem hiding this comment.
Just tested w/ two cameras, and it looks good:
In [11]: arr = tiled_client.values().last()['primary']['external']['manta-cam1'].read()
In [12]: arr.shape
Out[12]: (100, 544, 728)
In [13]: arr = tiled_client.values().last()['primary']['external']['manta-cam2'].read()
In [14]: arr.shape
Out[14]: (200, 1088, 1456)
Here had an exposures_per_event of 1 and 2 respectively, and saving into the same stream.
Going to go ahead and merge.
This PR does the following:
multiplier->frames_per_eventframes_per_eventas the first dimension ofDataKey.shapeDetectorWriter.get_indices_written()andDetectorWriter.observe_indices_written()is divided byframes_per_eventso that it actually captures the correct amount of exposures in each index (except for PandA which explicitly says it only has 1 "frame" per event)Add unit tests showing that stream resources are actually batches of exposuresself._writer.open()andself._writer.get_indices_written(). The writer needs to be opened in order to get the indices written. Otherwise, it has no idea whatframes_per_eventto use when returning the index last written.I could not actually add tests using bluesky plans and inspecting the data afterword because
TriggerInfois hardcoded inStandardDetector. I think it is a separate issue that should be raised since it would enhance the scope of this PR. I will open an issue for this soon and mention it below.Otherwise, I have a few open questions regarding my understanding of ophyd-async as well as the implementation which I will also leave as review comments. Please see below.
Closes #576
Closes #431