版本发布 8
## Breaking Change: `StandardDetector` rewrite All detector implementations in `ophyd-async` are updated, external detector implementations need updating: #### Detector Controller → Trigger Logic + Arm Logic ```python # old class SimController(DetectorController): def __init__(self, driver: ADBaseIO): self.driver = driver async def prepare(self, trigger_info: TriggerInfo): assert trigger_info.trigger == TriggerInfo.INTERNAL, "Can only do internal" await self.driver.num_images.set(trigger_info.number_of_events) async def arm(self): await self.driver.acquire.set(True) async def wait_for_idle(self): await wait_for_value(self.driver.acquire, False, timeout=DEFAULT_TIMEOUT) async def disarm(self): await self.driver.acquire.set(False) # new class SimTriggerLogic(DetectorTriggerLogic): def __init__(self, driver: ADBaseIO): self.driver = driver # Also prepare_edge and prepare_level if hardware triggering supported async def prepare_internal(self, num: int, livetime: float, deadtime: float): await self.driver.num_images.set(num) # if ADArmLogic is not suitable class SimArmLogic(DetectorArmLogic): def __init__(self, driver: ADBaseIO): self.driver = driver async def arm(self): await self.driver.acquire.set(True) async def wait_for_idle(self): await wait_for_value(self.driver.acquire, False, timeout=DEFAULT_TIMEOUT) async def disarm(self): await self.driver.acquire.set(False) ``` #### Detector Writer → Data Logic ```python # old class ADHDFWriter(DetectorWriter): async def open(self, name: str, exposures_per_event: int = 1): # Setup file writing return describe_dict # new class ADHDFDataLogic(DetectorDataLogic): async def prepare_unbounded(self, detector_name: str): # Setup file writing return StreamResourceDataProvider(...) ``` #### TriggerInfo Updates ```python # old TriggerInfo( number_of_events=10, trigger=DetectorTrigger.EDGE_TRIGGER, livetime=0.1, deadtime=0.01, ) # new TriggerInfo( number_of_events=10, trigger=DetectorTrigger.EXTERNAL_EDGE, livetime=0.1, deadtime=0.01, ) ``` #### Complete SimDetector Example ```python # old - controller and writer_cls.with_io from ophyd_async.epics import adcore class SimDetector(adcore.AreaDetector[SimController]): def __init__( self, prefix: str, path_provider: PathProvider, drv_suffix="cam1:", writer_cls: type[adcore.ADWriter] = adcore.ADHDFWriter, fileio_suffix: str | None = None, name="", config_sigs: Sequence[SignalR] = (), plugins: dict[str, adcore.NDPluginBaseIO] | None = None, ): driver = adcore.ADBaseIO(prefix + drv_suffix) controller = SimController(driver) writer = writer_cls.with_io( prefix, path_provider, dataset_source=driver, fileio_suffix=fileio_suffix, plugins=plugins, ) super().__init__( controller=controller, writer=writer, plugins=plugins, name=name, config_sigs=config_sigs, ) # new - handled by the baseclass from ophyd_async.epics import adcore class SimDetector(adcore.AreaDetector[adcore.ADBaseIO]): """Create an ADSimDetector AreaDetector instance.""" def __init__( self, prefix: str, path_provider: PathProvider | None = None, driver_suffix="cam1:", writer_type: ADWriterType | None = ADWriterType.HDF, writer_suffix: str | None = None, plugins: dict[str, NDPluginBaseIO] | None = None, config_sigs: Sequence[SignalR] = (), name: str = "", ) -> None: driver = adcore.ADBaseIO(prefix + driver_suffix) super().__init__( prefix=prefix, driver=driver, arm_logic=adcore.ADArmLogic(driver), trigger_logic=SimDetectorTriggerLogic(driver), path_provider=path_provider, writer_type=writer_type, writer_suffix=writer_suffix, plugins=plugins, config_sigs=config_sigs, name=name, ) ``` #### Reading Stats Without Files ```python # old - not easily supported # new - use PluginSignalDataLogic detector = SimDetector(prefix, writer_type=None) detector.add_detector_logics(PluginSignalDataLogic(driver, stats.total)) # Now stats.total appears in read() without file writing ``` #### Multiple Data Streams ```python # old - required complex inheritance # new - add multiple data logics detector = AreaDetector( driver=driver, arm_logic=ADArmLogic(driver), writer_type=None, # Don't create default writer ) # Add separate HDF writers for different ROIs detector.add_detector_logics( ADHDFDataLogic(..., datakey_suffix="-roi1"), ADHDFDataLogic(..., datakey_suffix="-roi2"), ) ``` ### All changes * Rewrite StandardDetector by @coretl in https://github.com/bluesky/ophyd-async/pull/1177 * Pass detector name + datakey suffix to providers instead of writer name to match filenames to datakeys. by @jwlodek in https://github.com/bluesky/ophyd-async/pull/1205 * fix(deps): update dependency pytango to v10.1.3 by @renovate[bot] in https://github.com/bluesky/ophyd-async/pull/1195 * chore(deps): lock file maintenance by @renovate[bot] in https://github.com/bluesky/ophyd-async/pull/1206 * Add ADMerlin support by @coretl in https://github.com/bluesky/ophyd-async/pull/1203 * chore(deps): lock file maintenance by @renovate[bot] in https://github.com/bluesky/ophyd-async/pull/1207 * Remove pytango pin by @coretl in https://github.com/bluesky/ophyd-async/pull/1210 * Fix DeviceVector introspection by @shihab-dls in https://github.com/bluesky/ophyd-async/pull/1198 **Full Changelog**: https://github.com/bluesky/ophyd-async/compare/v0.16...v0.17
## What's Changed * 1163 support signal[t] | none syntax in devicefiller by @LuisFSegalla in https://github.com/bluesky/ophyd-async/pull/1165 * Make test_observe more verbose by @coretl in https://github.com/bluesky/ophyd-async/pull/1167 * Improve error when raw2derived argument has no type by @Villtord in https://github.com/bluesky/ophyd-async/pull/1135 **Full Changelog**: https://github.com/bluesky/ophyd-async/compare/v0.14.1...v0.14.2
## What's Changed * Allow mock signals to have different readback to setpoint values by @DominicOram in https://github.com/bluesky/ophyd-async/pull/1096 * Lock file maintenance by @renovate[bot] in https://github.com/bluesky/ophyd-async/pull/1109 * Quantize calculated turnaround points in pmac by @shihab-dls in https://github.com/bluesky/ophyd-async/pull/1105 * Add enable signal to panda PulseBlock by @shihab-dls in https://github.com/bluesky/ophyd-async/pull/1115 * Update dependency https://github.com/DiamondLightSource/python-copier-template to v5.0.0a4 by @renovate[bot] in https://github.com/bluesky/ophyd-async/pull/1112 **Full Changelog**: https://github.com/bluesky/ophyd-async/compare/v0.13.5...v0.13.6
## What's Changed * Only allow subscribe within event loop by @coretl in https://github.com/bluesky/ophyd-async/pull/970 * Adsim system tests by @callumforrester in https://github.com/bluesky/ophyd-async/pull/1000 * Create PmacTrajectoryTriggerLogic by @LuisFSegalla in https://github.com/bluesky/ophyd-async/pull/1004 * Add docs on when to use Movable by @olliesilvester in https://github.com/bluesky/ophyd-async/pull/1026 * Document PvSuffix by @EmsArnold in https://github.com/bluesky/ophyd-async/pull/1025 * Add fastcs jungfrau by @olliesilvester in https://github.com/bluesky/ophyd-async/pull/999 * Add limit checking to motor.set by @teoching0705 in https://github.com/bluesky/ophyd-async/pull/1032 * Add pmac trajectory gap support by @shihab-dls in https://github.com/bluesky/ophyd-async/pull/1023 * Make merge_gathered_dicts public by @oliwenmandiamond in https://github.com/bluesky/ophyd-async/pull/1041 * Enhance SimMotor initialization with initial_value and units parameters by @fajinyuan in https://github.com/bluesky/ophyd-async/pull/1040 ## New Contributors * @LuisFSegalla made their first contribution in https://github.com/bluesky/ophyd-async/pull/1004 * @EmsArnold made their first contribution in https://github.com/bluesky/ophyd-async/pull/1025 * @teoching0705 made their first contribution in https://github.com/bluesky/ophyd-async/pull/1032 * @fajinyuan made their first contribution in https://github.com/bluesky/ophyd-async/pull/1040 **Full Changelog**: https://github.com/bluesky/ophyd-async/compare/v0.13.1...v0.13.2
## What's Changed * If number of frames in a chunk is set to zero, set it to 1 by @jwlodek in https://github.com/bluesky/ophyd-async/pull/1003 * Fixed value of onoff enum in vimba module by @RobertSchaffer1 in https://github.com/bluesky/ophyd-async/pull/1007 * Check that there are no imports from core._* by @coretl in https://github.com/bluesky/ophyd-async/pull/995 * Update assert configuration to use mapping by @oliwenmandiamond in https://github.com/bluesky/ophyd-async/pull/1014 * Fix docstring on trigger info by @olliesilvester in https://github.com/bluesky/ophyd-async/pull/1015 * fix: Drop python 3.10 by allow copier automated updates and updating copier template by @DiamondJoseph in https://github.com/bluesky/ophyd-async/pull/935 **Full Changelog**: https://github.com/bluesky/ophyd-async/compare/v0.13.0...v0.13.1
## What's Changed * Make pmac util file with PmacMotorInfo class by @gkalua in https://github.com/bluesky/ophyd-async/pull/985 * Add feature flag and ADR for `all_updates` change by @callumforrester in https://github.com/bluesky/ophyd-async/pull/990 * Create common enums and update devices to use by @oliwenmandiamond in https://github.com/bluesky/ophyd-async/pull/993 * Allow trigger info deadtime to be lower than safe detector deadtime by @olliesilvester in https://github.com/bluesky/ophyd-async/pull/988 * Move xml generation portion of setup ndattributes plan stub to adcore/_utils.py by @jwlodek in https://github.com/bluesky/ophyd-async/pull/982 * Create pmac._util.calculate_run_up by @shihab-dls in https://github.com/bluesky/ophyd-async/pull/979 * Parse gapless pmac trajectory from slice by @shihab-dls in https://github.com/bluesky/ophyd-async/pull/986 * Create composer after ndattributes during ADHDFWriter.open() by @canismarko in https://github.com/bluesky/ophyd-async/pull/997 * Add implementation for NDROIStats plugin by @douglaswinter in https://github.com/bluesky/ophyd-async/pull/975 **Full Changelog**: https://github.com/bluesky/ophyd-async/compare/v0.12.3...v0.13.0
## What's Changed * Change the way Axis IO is done by @gkalua in https://github.com/bluesky/ophyd-async/pull/973 * Amend FastCS-Eiger and ADOdin logic by @shihab-dls in https://github.com/bluesky/ophyd-async/pull/911 **Full Changelog**: https://github.com/bluesky/ophyd-async/compare/v0.12.2...v.0.12.3
## What's Changed * fix!: Prevent timeout in stop_busy_record by @DiamondJoseph in https://github.com/bluesky/ophyd-async/pull/972 **Full Changelog**: https://github.com/bluesky/ophyd-async/compare/v0.12.1...v0.12.2