Repository navigation
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/G4
branch
2 times, most recently
from
November 10, 2026 15:01
1ecea71 to
ca5b1b5
Compare
Split cut G4 (bluesky#1367) of detector-rederive (d0872e185): the StatsTimeSeriesDataLogic, the ADDataFactory.stats_time_series factory and their tests (UC6, UC7, HDF plus time series, two stats plugins, the adsim container tests). Together with the PRs below it and the next commit, the tree is the tip merged with origin/main, less the deleted ADWriterFactory shims. Round 3 of the stats naming review folded in: here the plugin snapshot is taken once at stage and also records NDArrayPort and ROIStat channel names (the next commit replaces it with a suppress logic asked at the first prepare, which does not check NDArrayPort), the plugins a trigger logic holds are not recorded, plugins= are registered as readables, data factories take plugins by reference, NDROIStatIO is a StandardReadable, and the writers no longer write EnableCallbacks at prepare. Assisted-by: Claude Opus 5.5
…switches 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.
Last of six stacked draft PRs, based on #24. It adds the areaDetector statistics and ROI statistics time series as a bounded data logic, and makes the plugins' switches decide which statistics are published.
Supersedes bluesky#1408
What changes
NDStatsIOhas one name, that of its scalar signal (for exampledet-stats-total), whether it is published as a readable, as a stats time series or as an HDF NDAttribute. The highest of these that serves a scan suppresses the others, and the hint of the scalar stays (ADR 0027).EnableCallbacksand itscompute_statistics/compute_centroidPVs decide which statistics are used.NDPluginBaseIO.get_enabled_params()returns theNDParams switched on;AreaDetectorasks each plugin at the firstprepare()afterstage()through aDetectorSuppressLogic, leaves out ofread(),describe()andhintsthe read signals of the ones that are off, and raises at a laterprepare()if a plugin now answers differently.adcore.TimeSeriesDataLogicandADDataFactory.time_series(plugin)publish the time series of anNDStatsIOorNDROIStatIOas event pages, for a detector that writes no file. The plugin must be in the detector'splugins.EventPageDataProvider(refresh=)asks the plugin to post its arrays before a page is read.ADDataFactory.hdf(ndattribute_sources=)lists plugins whose NDAttributes the HDF writer writes, replacingsetup_ndstats_sum.NDROIStatIOis aStandardReadablewhose channels are registered asCHILDreadables, named<plugin name>-<Name PV>atstage(), with unused channels left out. This changes the datakey of every ROI stat signal.AreaDetectorregisters every plugin as aCHILDreadable; opt one out withset_readable_format(plugin, None).ADDataFactoryis built with keywords only, withbuildreplacingwriter_cls,writer_suffixandwriter_name.ADHDFDataLogicandADMultipartDataLogicwithalways_enable=Trueswitch their plugin on atstage().ADHDFDataLogiccaps its HDF chunk at 4 MiB (a first guess for GPFS, open to reviewers).adcore.prepare_filtersetsenable_filterto False for a single exposure.NDParam,NDStatsTimeSeriesIO(theTS:sub-plugin ofNDStatsIO),NDROIStatTSControland thets_*array signals; ADR 0027 is new and ADR 0024 is marked partly superseded.For Jakub Wlodek: the switches-decide behaviour described in #24 is completed here with the
compute_*PVs and the suppression of the read signals that are off.Breaking changes
setup_ndstats_sumis removed (list the stats plugin inndattribute_sources, anddet-sumbecomesdet-stats-total);TimeSeriesDataLogicandADDataFactory.time_seriestake a plugin rather than making one and no longer write the plugin'sEnableCallbacksorComputeStatistics; a plugin used as a source must be inplugins;NDROIStatIOchannel datakeys change. Listed in the CHANGELOG diff.How to review
ADR 0027 and the how-to
docs/how-to/implement-ad-detector.mdgive the user-facing picture. In code, start withepics/adcore/_io.py(NDParam,get_enabled_params), thenepics/adcore/_data_logic.pyand_detector.py. The use-case tests undertests/unit_tests/epics/adcoreshow each publication route.Position in the stack
Top of the stack. Previous: #24
AI Disclaimer
The code and this description were generated with AI and reviewed/tweaked by the author.