Repository navigation
Draft
Conversation
This was referenced Nov 10, 2026
Rework StandardMovable and StandardFlyable around a single logic, add fly() and ensure_stopped()
#21
Draft
coretl
force-pushed
the
split/G3
branch
2 times, most recently
from
November 10, 2026 15:01
caf4f21 to
2817fa5
Compare
Split cut G3 (bluesky#1408) of detector-rederive (d0872e185): every file at its tip content (merged with origin/main), including the readable suppression hook moved here from bluesky#1400, minus the AD stats time series, which is the next PR. Deletes the unreleased ADWriterFactory.stats and ADWriterFactory.hdf(enable_callbacks=) shims rather than splitting them. ADRs 0025 and 0026. Assisted-by: Claude Opus 5.5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fifth of six stacked draft PRs, based on #23. It rewrites the detector core around a
DetectorLogicand splits data logics into bounded and unbounded tiers. Next: #25Supersedes bluesky#1367
Fixes bluesky#1309
Fixes bluesky#1364
For Jakub Wlodek's attention: switches decide. Whether a plugin is used for a scan is decided by the switches on the plugin itself, not by Python arguments:
ADDataFactoryfollows the plugin'sEnableCallbacksPV. If it is off at the firstprepare()afterstage(), the plugin sits out the scans of that stage so another data logic can serve them. This is a behaviour change: the HDF writer used to be switched on whatever the PV said.always_enable=Trueforces the plugin on, and restores the old behaviour. The default isFalse.read(),describe()andhints.compute_*PVs.Please check that those defaults match how you would configure a real IOC.
What changes
StandardDetectoris now aStandardFlyablewhoselogicis aDetectorLogicholding the trigger, acquire and data logics (ADR 0026). Data logics areBoundedDataLogic(told the number of collections) orUnboundedDataLogic, and implement onestart_provider()that sets up and arms the writer and returns aStreamableDataProvider, aPageableDataProviderorNone(ADR 0025).logiccached property;StandardDetector.__init__()takes no arguments andadd_detector_logics()is removed.DetectorLogic.with_device()makes an ad-hoc detector.DetectorAcquireLogic.start_acquiring()andwait_for_idle()are replaced by oneacquire()async generator that starts, yields once armed, then waits until idle, and is closed if the scan is cancelled.stage(),prepare(),kickoff(),complete()ordering of any flyer.unstage()cancels a runningtrigger(), and closes an acquisition that an externally triggeredprepare()armed and nothing ran.prepare()afterstage()and holds untilunstage(). No two serving providers may make the same datakey.StandardDetectorexposescollect_asset_docs()orcollect_pages(), whichever the serving providers produce, as an instance attribute bound byprepare(), because bluesky picks the collect verb from the static type.make_stream_docs(index)replacesmake_stream_docs(collections_written, collections_per_event);StreamResourceDataProvider.last_emittedis removed.EventPageDataProvideris a concrete provider in core for any device that fills fixed-length arrays as it acquires. It waits up toARRAY_WAIT_TIMEOUTfor each array to hold the page's collections, and takes an optionalrefresh.DetectorSuppressLogicreturns the names of the readables the detector's data hides;TriggerInfo.number_of_eventsmust be positive.TriggerInfo.flush_periodis new, andADHDFDataLogicsizes its HDF chunks from it (Discusschunk sizeconfiguration bluesky/ophyd-async#1309).adcore.ADWriterFactoryis renamedADDataFactory(the old name warns).Breaking changes
Out-of-tree detectors must move their logics into a
logiccached property, and data logics must implementstart_provider(); acquire logics must implementacquire();ADDataFactory'salways_enabledefault changes behaviour as above. The full list is in the CHANGELOG diff.How to review
Read ADR 0025 and ADR 0026 first, then
core/_detector.pyandcore/_data_providers.py, then the areaDetector data logics. Tests drive one happy path throughstage(),prepare(),kickoff()andcomplete()and then check the error cases.Position in the stack
Previous: #23. Next: #25
AI Disclaimer
The code and this description were generated with AI and reviewed/tweaked by the author.