ophyd-async 0.4.0__tar.gz → 0.5.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {ophyd_async-0.4.0 → ophyd_async-0.5.1}/.github/workflows/_release.yml +1 -1
- {ophyd_async-0.4.0 → ophyd_async-0.5.1}/PKG-INFO +4 -2
- {ophyd_async-0.4.0 → ophyd_async-0.5.1}/docs/examples/foo_detector.py +19 -21
- ophyd_async-0.5.1/docs/explanations/decisions/0007-subpackage-structure.md +95 -0
- {ophyd_async-0.4.0 → ophyd_async-0.5.1}/docs/how-to/compound-devices.rst +2 -2
- {ophyd_async-0.4.0 → ophyd_async-0.5.1}/docs/how-to/make-a-simple-device.rst +4 -4
- {ophyd_async-0.4.0 → ophyd_async-0.5.1}/docs/how-to/make-a-standard-detector.rst +7 -7
- {ophyd_async-0.4.0 → ophyd_async-0.5.1}/docs/reference/api.rst +1 -1
- {ophyd_async-0.4.0 → ophyd_async-0.5.1}/pyproject.toml +9 -1
- {ophyd_async-0.4.0 → ophyd_async-0.5.1}/src/ophyd_async/_version.py +2 -2
- {ophyd_async-0.4.0 → ophyd_async-0.5.1}/src/ophyd_async/core/__init__.py +86 -73
- ophyd_async-0.4.0/src/ophyd_async/core/detector.py → ophyd_async-0.5.1/src/ophyd_async/core/_detector.py +42 -36
- ophyd_async-0.4.0/src/ophyd_async/core/device.py → ophyd_async-0.5.1/src/ophyd_async/core/_device.py +1 -1
- ophyd_async-0.4.0/src/ophyd_async/core/device_save_loader.py → ophyd_async-0.5.1/src/ophyd_async/core/_device_save_loader.py +3 -3
- ophyd_async-0.4.0/src/ophyd_async/core/flyer.py → ophyd_async-0.5.1/src/ophyd_async/core/_flyer.py +6 -8
- ophyd_async-0.4.0/src/ophyd_async/epics/areadetector/writers/general_hdffile.py → ophyd_async-0.5.1/src/ophyd_async/core/_hdf_dataset.py +4 -8
- ophyd_async-0.4.0/src/ophyd_async/log.py → ophyd_async-0.5.1/src/ophyd_async/core/_log.py +11 -3
- ophyd_async-0.4.0/src/ophyd_async/core/mock_signal_backend.py → ophyd_async-0.5.1/src/ophyd_async/core/_mock_signal_backend.py +3 -3
- ophyd_async-0.4.0/src/ophyd_async/core/mock_signal_utils.py → ophyd_async-0.5.1/src/ophyd_async/core/_mock_signal_utils.py +7 -7
- ophyd_async-0.4.0/src/ophyd_async/protocols.py → ophyd_async-0.5.1/src/ophyd_async/core/_protocol.py +1 -1
- {ophyd_async-0.4.0 → ophyd_async-0.5.1}/src/ophyd_async/core/_providers.py +24 -37
- ophyd_async-0.4.0/src/ophyd_async/core/standard_readable.py → ophyd_async-0.5.1/src/ophyd_async/core/_readable.py +6 -16
- ophyd_async-0.4.0/src/ophyd_async/core/signal.py → ophyd_async-0.5.1/src/ophyd_async/core/_signal.py +79 -35
- ophyd_async-0.4.0/src/ophyd_async/core/signal_backend.py → ophyd_async-0.5.1/src/ophyd_async/core/_signal_backend.py +4 -13
- ophyd_async-0.4.0/src/ophyd_async/core/soft_signal_backend.py → ophyd_async-0.5.1/src/ophyd_async/core/_soft_signal_backend.py +3 -12
- ophyd_async-0.4.0/src/ophyd_async/core/async_status.py → ophyd_async-0.5.1/src/ophyd_async/core/_status.py +3 -11
- ophyd_async-0.5.1/src/ophyd_async/epics/adaravis/__init__.py +9 -0
- ophyd_async-0.4.0/src/ophyd_async/epics/areadetector/aravis.py → ophyd_async-0.5.1/src/ophyd_async/epics/adaravis/_aravis.py +9 -11
- ophyd_async-0.4.0/src/ophyd_async/epics/areadetector/controllers/aravis_controller.py → ophyd_async-0.5.1/src/ophyd_async/epics/adaravis/_aravis_controller.py +7 -10
- ophyd_async-0.4.0/src/ophyd_async/epics/areadetector/drivers/aravis_driver.py → ophyd_async-0.5.1/src/ophyd_async/epics/adaravis/_aravis_io.py +6 -3
- ophyd_async-0.5.1/src/ophyd_async/epics/adcore/__init__.py +47 -0
- ophyd_async-0.5.1/src/ophyd_async/epics/adcore/_core_io.py +138 -0
- ophyd_async-0.4.0/src/ophyd_async/epics/areadetector/drivers/ad_base.py → ophyd_async-0.5.1/src/ophyd_async/epics/adcore/_core_logic.py +16 -52
- ophyd_async-0.4.0/src/ophyd_async/epics/areadetector/writers/hdf_writer.py → ophyd_async-0.5.1/src/ophyd_async/epics/adcore/_hdf_writer.py +54 -29
- ophyd_async-0.4.0/src/ophyd_async/epics/areadetector/single_trigger_det.py → ophyd_async-0.5.1/src/ophyd_async/epics/adcore/_single_trigger.py +5 -6
- ophyd_async-0.5.1/src/ophyd_async/epics/adcore/_utils.py +132 -0
- ophyd_async-0.5.1/src/ophyd_async/epics/adkinetix/__init__.py +9 -0
- ophyd_async-0.4.0/src/ophyd_async/epics/areadetector/kinetix.py → ophyd_async-0.5.1/src/ophyd_async/epics/adkinetix/_kinetix.py +9 -11
- ophyd_async-0.4.0/src/ophyd_async/epics/areadetector/controllers/kinetix_controller.py → ophyd_async-0.5.1/src/ophyd_async/epics/adkinetix/_kinetix_controller.py +6 -9
- ophyd_async-0.4.0/src/ophyd_async/epics/areadetector/drivers/kinetix_driver.py → ophyd_async-0.5.1/src/ophyd_async/epics/adkinetix/_kinetix_io.py +9 -5
- ophyd_async-0.5.1/src/ophyd_async/epics/adpilatus/__init__.py +11 -0
- ophyd_async-0.4.0/src/ophyd_async/epics/areadetector/pilatus.py → ophyd_async-0.5.1/src/ophyd_async/epics/adpilatus/_pilatus.py +10 -14
- ophyd_async-0.4.0/src/ophyd_async/epics/areadetector/controllers/pilatus_controller.py → ophyd_async-0.5.1/src/ophyd_async/epics/adpilatus/_pilatus_controller.py +15 -17
- ophyd_async-0.4.0/src/ophyd_async/epics/areadetector/drivers/pilatus_driver.py → ophyd_async-0.5.1/src/ophyd_async/epics/adpilatus/_pilatus_io.py +6 -4
- ophyd_async-0.5.1/src/ophyd_async/epics/adsimdetector/__init__.py +7 -0
- ophyd_async-0.4.0/src/ophyd_async/epics/demo/demo_ad_sim_detector.py → ophyd_async-0.5.1/src/ophyd_async/epics/adsimdetector/_sim.py +10 -11
- ophyd_async-0.4.0/src/ophyd_async/epics/areadetector/controllers/ad_sim_controller.py → ophyd_async-0.5.1/src/ophyd_async/epics/adsimdetector/_sim_controller.py +8 -14
- ophyd_async-0.5.1/src/ophyd_async/epics/advimba/__init__.py +9 -0
- ophyd_async-0.4.0/src/ophyd_async/epics/areadetector/vimba.py → ophyd_async-0.5.1/src/ophyd_async/epics/advimba/_vimba.py +9 -9
- ophyd_async-0.4.0/src/ophyd_async/epics/areadetector/controllers/vimba_controller.py → ophyd_async-0.5.1/src/ophyd_async/epics/advimba/_vimba_controller.py +9 -17
- ophyd_async-0.4.0/src/ophyd_async/epics/areadetector/drivers/vimba_driver.py → ophyd_async-0.5.1/src/ophyd_async/epics/advimba/_vimba_io.py +11 -8
- ophyd_async-0.5.1/src/ophyd_async/epics/demo/__init__.py +54 -0
- ophyd_async-0.4.0/src/ophyd_async/epics/demo/__init__.py → ophyd_async-0.5.1/src/ophyd_async/epics/demo/_mover.py +6 -86
- ophyd_async-0.5.1/src/ophyd_async/epics/demo/_sensor.py +36 -0
- {ophyd_async-0.4.0/src/ophyd_async/epics/motion → ophyd_async-0.5.1/src/ophyd_async/epics}/motor.py +28 -14
- ophyd_async-0.5.1/src/ophyd_async/epics/pvi/__init__.py +3 -0
- ophyd_async-0.4.0/src/ophyd_async/epics/pvi/pvi.py → ophyd_async-0.5.1/src/ophyd_async/epics/pvi/_pvi.py +17 -14
- {ophyd_async-0.4.0 → ophyd_async-0.5.1}/src/ophyd_async/epics/signal/__init__.py +7 -1
- {ophyd_async-0.4.0/src/ophyd_async/epics/_backend → ophyd_async-0.5.1/src/ophyd_async/epics/signal}/_aioca.py +15 -7
- ophyd_async-0.4.0/src/ophyd_async/epics/_backend/common.py → ophyd_async-0.5.1/src/ophyd_async/epics/signal/_common.py +2 -2
- {ophyd_async-0.4.0 → ophyd_async-0.5.1}/src/ophyd_async/epics/signal/_epics_transport.py +3 -3
- {ophyd_async-0.4.0/src/ophyd_async/epics/_backend → ophyd_async-0.5.1/src/ophyd_async/epics/signal}/_p4p.py +18 -14
- ophyd_async-0.4.0/src/ophyd_async/epics/signal/signal.py → ophyd_async-0.5.1/src/ophyd_async/epics/signal/_signal.py +10 -9
- {ophyd_async-0.4.0/src/ophyd_async → ophyd_async-0.5.1/src/ophyd_async/fastcs}/panda/__init__.py +20 -15
- ophyd_async-0.4.0/src/ophyd_async/panda/_common_blocks.py → ophyd_async-0.5.1/src/ophyd_async/fastcs/panda/_block.py +5 -3
- ophyd_async-0.4.0/src/ophyd_async/panda/_panda_controller.py → ophyd_async-0.5.1/src/ophyd_async/fastcs/panda/_control.py +2 -1
- {ophyd_async-0.4.0/src/ophyd_async → ophyd_async-0.5.1/src/ophyd_async/fastcs}/panda/_hdf_panda.py +5 -10
- {ophyd_async-0.4.0/src/ophyd_async → ophyd_async-0.5.1/src/ophyd_async/fastcs}/panda/_trigger.py +3 -7
- ophyd_async-0.4.0/src/ophyd_async/panda/writers/_hdf_writer.py → ophyd_async-0.5.1/src/ophyd_async/fastcs/panda/_writer.py +36 -28
- {ophyd_async-0.4.0 → ophyd_async-0.5.1}/src/ophyd_async/plan_stubs/__init__.py +5 -2
- ophyd_async-0.4.0/src/ophyd_async/plan_stubs/ensure_connected.py → ophyd_async-0.5.1/src/ophyd_async/plan_stubs/_ensure_connected.py +1 -2
- ophyd_async-0.4.0/src/ophyd_async/plan_stubs/fly.py → ophyd_async-0.5.1/src/ophyd_async/plan_stubs/_fly.py +13 -9
- ophyd_async-0.5.1/src/ophyd_async/plan_stubs/_nd_attributes.py +63 -0
- ophyd_async-0.5.1/src/ophyd_async/sim/demo/__init__.py +19 -0
- ophyd_async-0.5.1/src/ophyd_async/sim/demo/_pattern_detector/__init__.py +13 -0
- ophyd_async-0.4.0/src/ophyd_async/sim/sim_pattern_generator.py → ophyd_async-0.5.1/src/ophyd_async/sim/demo/_pattern_detector/_pattern_detector.py +8 -8
- ophyd_async-0.4.0/src/ophyd_async/sim/sim_pattern_detector_control.py → ophyd_async-0.5.1/src/ophyd_async/sim/demo/_pattern_detector/_pattern_detector_controller.py +9 -7
- ophyd_async-0.4.0/src/ophyd_async/sim/sim_pattern_detector_writer.py → ophyd_async-0.5.1/src/ophyd_async/sim/demo/_pattern_detector/_pattern_detector_writer.py +4 -4
- ophyd_async-0.4.0/src/ophyd_async/sim/pattern_generator.py → ophyd_async-0.5.1/src/ophyd_async/sim/demo/_pattern_detector/_pattern_generator.py +13 -11
- ophyd_async-0.4.0/src/ophyd_async/sim/demo/sim_motor.py → ophyd_async-0.5.1/src/ophyd_async/sim/demo/_sim_motor.py +7 -5
- {ophyd_async-0.4.0 → ophyd_async-0.5.1}/src/ophyd_async.egg-info/PKG-INFO +4 -2
- ophyd_async-0.5.1/src/ophyd_async.egg-info/SOURCES.txt +205 -0
- {ophyd_async-0.4.0 → ophyd_async-0.5.1}/src/ophyd_async.egg-info/requires.txt +4 -1
- {ophyd_async-0.4.0 → ophyd_async-0.5.1}/tests/conftest.py +19 -4
- {ophyd_async-0.4.0 → ophyd_async-0.5.1}/tests/core/test_device.py +4 -4
- {ophyd_async-0.4.0 → ophyd_async-0.5.1}/tests/core/test_device_collector.py +8 -3
- {ophyd_async-0.4.0 → ophyd_async-0.5.1}/tests/core/test_device_save_loader.py +4 -4
- {ophyd_async-0.4.0 → ophyd_async-0.5.1}/tests/core/test_flyer.py +7 -7
- ophyd_async-0.5.1/tests/core/test_log.py +81 -0
- {ophyd_async-0.4.0 → ophyd_async-0.5.1}/tests/core/test_mock_signal_backend.py +10 -6
- ophyd_async-0.4.0/tests/protocols/test_protocols.py → ophyd_async-0.5.1/tests/core/test_protocol.py +9 -11
- {ophyd_async-0.4.0 → ophyd_async-0.5.1}/tests/core/test_providers.py +4 -4
- ophyd_async-0.4.0/tests/core/test_standard_readable.py → ophyd_async-0.5.1/tests/core/test_readable.py +13 -5
- {ophyd_async-0.4.0 → ophyd_async-0.5.1}/tests/core/test_signal.py +65 -38
- {ophyd_async-0.4.0 → ophyd_async-0.5.1}/tests/core/test_soft_signal_backend.py +1 -2
- {ophyd_async-0.4.0 → ophyd_async-0.5.1}/tests/core/test_subset_enum.py +5 -3
- {ophyd_async-0.4.0 → ophyd_async-0.5.1}/tests/core/test_utils.py +6 -3
- {ophyd_async-0.4.0 → ophyd_async-0.5.1}/tests/core/test_watchable_async_status.py +7 -4
- ophyd_async-0.5.1/tests/epics/adaravis/test_aravis.py +167 -0
- {ophyd_async-0.4.0/tests/epics/areadetector → ophyd_async-0.5.1/tests/epics/adcore}/test_drivers.py +23 -20
- {ophyd_async-0.4.0/tests/epics/areadetector → ophyd_async-0.5.1/tests/epics/adcore}/test_scans.py +17 -17
- ophyd_async-0.4.0/tests/epics/areadetector/test_single_trigger_det.py → ophyd_async-0.5.1/tests/epics/adcore/test_single_trigger.py +11 -9
- ophyd_async-0.5.1/tests/epics/adcore/test_writers.py +221 -0
- ophyd_async-0.5.1/tests/epics/adkinetix/test_kinetix.py +132 -0
- ophyd_async-0.5.1/tests/epics/adpilatus/test_pilatus.py +145 -0
- ophyd_async-0.5.1/tests/epics/adpilatus/test_pilatus_controller.py +44 -0
- ophyd_async-0.5.1/tests/epics/adsimdetector/test_adsim_controller.py +30 -0
- ophyd_async-0.4.0/tests/epics/demo/test_demo_ad_sim_detector.py → ophyd_async-0.5.1/tests/epics/adsimdetector/test_sim.py +87 -45
- ophyd_async-0.5.1/tests/epics/advimba/test_vimba.py +144 -0
- {ophyd_async-0.4.0 → ophyd_async-0.5.1}/tests/epics/demo/test_demo.py +1 -1
- {ophyd_async-0.4.0/tests/epics/_backend → ophyd_async-0.5.1/tests/epics/signal}/test_common.py +9 -3
- {ophyd_async-0.4.0/tests/epics → ophyd_async-0.5.1/tests/epics/signal}/test_records.db +14 -0
- {ophyd_async-0.4.0/tests/epics → ophyd_async-0.5.1/tests/epics/signal}/test_signals.py +45 -12
- ophyd_async-0.5.1/tests/epics/test_areadetector_subclass_naming.py +32 -0
- {ophyd_async-0.4.0/tests/epics/motion → ophyd_async-0.5.1/tests/epics}/test_motor.py +39 -22
- {ophyd_async-0.4.0/tests → ophyd_async-0.5.1/tests/fastcs}/panda/test_hdf_panda.py +21 -8
- {ophyd_async-0.4.0/tests → ophyd_async-0.5.1/tests/fastcs}/panda/test_panda_connect.py +18 -7
- ophyd_async-0.4.0/tests/panda/test_panda_controller.py → ophyd_async-0.5.1/tests/fastcs/panda/test_panda_control.py +3 -3
- {ophyd_async-0.4.0/tests → ophyd_async-0.5.1/tests/fastcs}/panda/test_panda_utils.py +6 -7
- {ophyd_async-0.4.0/tests → ophyd_async-0.5.1/tests/fastcs}/panda/test_table.py +1 -1
- {ophyd_async-0.4.0/tests → ophyd_async-0.5.1/tests/fastcs}/panda/test_trigger.py +3 -4
- {ophyd_async-0.4.0/tests → ophyd_async-0.5.1/tests/fastcs}/panda/test_writer.py +52 -20
- {ophyd_async-0.4.0 → ophyd_async-0.5.1}/tests/plan_stubs/test_ensure_connected.py +1 -3
- {ophyd_async-0.4.0 → ophyd_async-0.5.1}/tests/plan_stubs/test_fly.py +15 -14
- ophyd_async-0.5.1/tests/sim/__init__.py +0 -0
- ophyd_async-0.5.1/tests/sim/conftest.py +15 -0
- ophyd_async-0.5.1/tests/sim/demo/__init__.py +0 -0
- {ophyd_async-0.4.0 → ophyd_async-0.5.1}/tests/sim/demo/test_sim_motor.py +2 -2
- {ophyd_async-0.4.0 → ophyd_async-0.5.1}/tests/sim/test_pattern_generator.py +1 -1
- {ophyd_async-0.4.0 → ophyd_async-0.5.1}/tests/sim/test_sim_detector.py +6 -7
- {ophyd_async-0.4.0 → ophyd_async-0.5.1}/tests/sim/test_sim_writer.py +7 -8
- {ophyd_async-0.4.0 → ophyd_async-0.5.1}/tests/sim/test_streaming_plan.py +4 -4
- ophyd_async-0.4.0/src/ophyd_async/epics/areadetector/__init__.py +0 -23
- ophyd_async-0.4.0/src/ophyd_async/epics/areadetector/controllers/__init__.py +0 -5
- ophyd_async-0.4.0/src/ophyd_async/epics/areadetector/drivers/__init__.py +0 -23
- ophyd_async-0.4.0/src/ophyd_async/epics/areadetector/utils.py +0 -104
- ophyd_async-0.4.0/src/ophyd_async/epics/areadetector/writers/__init__.py +0 -5
- ophyd_async-0.4.0/src/ophyd_async/epics/areadetector/writers/nd_file_hdf.py +0 -43
- ophyd_async-0.4.0/src/ophyd_async/epics/areadetector/writers/nd_plugin.py +0 -68
- ophyd_async-0.4.0/src/ophyd_async/epics/motion/__init__.py +0 -3
- ophyd_async-0.4.0/src/ophyd_async/epics/pvi/__init__.py +0 -3
- ophyd_async-0.4.0/src/ophyd_async/panda/writers/__init__.py +0 -3
- ophyd_async-0.4.0/src/ophyd_async/sim/__init__.py +0 -11
- ophyd_async-0.4.0/src/ophyd_async/sim/demo/__init__.py +0 -3
- ophyd_async-0.4.0/src/ophyd_async.egg-info/SOURCES.txt +0 -199
- ophyd_async-0.4.0/tests/epics/areadetector/test_aravis.py +0 -158
- ophyd_async-0.4.0/tests/epics/areadetector/test_controllers.py +0 -75
- ophyd_async-0.4.0/tests/epics/areadetector/test_kinetix.py +0 -122
- ophyd_async-0.4.0/tests/epics/areadetector/test_pilatus.py +0 -132
- ophyd_async-0.4.0/tests/epics/areadetector/test_utils.py +0 -19
- ophyd_async-0.4.0/tests/epics/areadetector/test_vimba.py +0 -132
- ophyd_async-0.4.0/tests/epics/areadetector/test_writers.py +0 -57
- ophyd_async-0.4.0/tests/sim/conftest.py +0 -15
- ophyd_async-0.4.0/tests/test_log.py +0 -88
- {ophyd_async-0.4.0 → ophyd_async-0.5.1}/.codecov.yml +0 -0
- {ophyd_async-0.4.0 → ophyd_async-0.5.1}/.copier-answers.yml +0 -0
- {ophyd_async-0.4.0 → ophyd_async-0.5.1}/.devcontainer/devcontainer.json +0 -0
- {ophyd_async-0.4.0 → ophyd_async-0.5.1}/.git-blame-ignore-revs +0 -0
- {ophyd_async-0.4.0 → ophyd_async-0.5.1}/.github/CONTRIBUTING.md +0 -0
- {ophyd_async-0.4.0 → ophyd_async-0.5.1}/.github/actions/install_requirements/action.yml +0 -0
- {ophyd_async-0.4.0 → ophyd_async-0.5.1}/.github/dependabot.yml +0 -0
- {ophyd_async-0.4.0 → ophyd_async-0.5.1}/.github/pages/index.html +0 -0
- {ophyd_async-0.4.0 → ophyd_async-0.5.1}/.github/pages/make_switcher.py +0 -0
- {ophyd_async-0.4.0 → ophyd_async-0.5.1}/.github/workflows/_check.yml +0 -0
- {ophyd_async-0.4.0 → ophyd_async-0.5.1}/.github/workflows/_dist.yml +0 -0
- {ophyd_async-0.4.0 → ophyd_async-0.5.1}/.github/workflows/_docs.yml +0 -0
- {ophyd_async-0.4.0 → ophyd_async-0.5.1}/.github/workflows/_pypi.yml +0 -0
- {ophyd_async-0.4.0 → ophyd_async-0.5.1}/.github/workflows/_test.yml +0 -0
- {ophyd_async-0.4.0 → ophyd_async-0.5.1}/.github/workflows/_tox.yml +0 -0
- {ophyd_async-0.4.0 → ophyd_async-0.5.1}/.github/workflows/ci.yml +0 -0
- {ophyd_async-0.4.0 → ophyd_async-0.5.1}/.github/workflows/periodic.yml +0 -0
- {ophyd_async-0.4.0 → ophyd_async-0.5.1}/.gitignore +0 -0
- {ophyd_async-0.4.0 → ophyd_async-0.5.1}/.mailmap +0 -0
- {ophyd_async-0.4.0 → ophyd_async-0.5.1}/.pre-commit-config.yaml +0 -0
- {ophyd_async-0.4.0 → ophyd_async-0.5.1}/Dockerfile +0 -0
- {ophyd_async-0.4.0 → ophyd_async-0.5.1}/LICENSE +0 -0
- {ophyd_async-0.4.0 → ophyd_async-0.5.1}/README.md +0 -0
- {ophyd_async-0.4.0 → ophyd_async-0.5.1}/docs/_templates/README +0 -0
- {ophyd_async-0.4.0 → ophyd_async-0.5.1}/docs/_templates/custom-class-template.rst +0 -0
- {ophyd_async-0.4.0 → ophyd_async-0.5.1}/docs/_templates/custom-module-template.rst +0 -0
- {ophyd_async-0.4.0 → ophyd_async-0.5.1}/docs/conf.py +0 -0
- {ophyd_async-0.4.0 → ophyd_async-0.5.1}/docs/examples/epics_demo.py +0 -0
- {ophyd_async-0.4.0 → ophyd_async-0.5.1}/docs/explanations/decisions/0001-record-architecture-decisions.md +0 -0
- {ophyd_async-0.4.0 → ophyd_async-0.5.1}/docs/explanations/decisions/0002-switched-to-python-copier-template.md +0 -0
- {ophyd_async-0.4.0 → ophyd_async-0.5.1}/docs/explanations/decisions/0003-ophyd-async-migration.rst +0 -0
- {ophyd_async-0.4.0 → ophyd_async-0.5.1}/docs/explanations/decisions/0004-repository-structure.rst +0 -0
- {ophyd_async-0.4.0 → ophyd_async-0.5.1}/docs/explanations/decisions/0005-respect-black-line-length.rst +0 -0
- {ophyd_async-0.4.0 → ophyd_async-0.5.1}/docs/explanations/decisions/0006-procedural-device-definitions.rst +0 -0
- {ophyd_async-0.4.0 → ophyd_async-0.5.1}/docs/explanations/decisions/COPYME +0 -0
- {ophyd_async-0.4.0 → ophyd_async-0.5.1}/docs/explanations/decisions.md +0 -0
- {ophyd_async-0.4.0 → ophyd_async-0.5.1}/docs/explanations/design-goals.rst +0 -0
- {ophyd_async-0.4.0 → ophyd_async-0.5.1}/docs/explanations/event-loop-choice.rst +0 -0
- {ophyd_async-0.4.0 → ophyd_async-0.5.1}/docs/explanations/flyscanning.rst +0 -0
- {ophyd_async-0.4.0 → ophyd_async-0.5.1}/docs/explanations.md +0 -0
- {ophyd_async-0.4.0 → ophyd_async-0.5.1}/docs/genindex.rst +0 -0
- {ophyd_async-0.4.0 → ophyd_async-0.5.1}/docs/how-to/choose-interfaces-for-devices.md +0 -0
- {ophyd_async-0.4.0 → ophyd_async-0.5.1}/docs/how-to/contribute.md +0 -0
- {ophyd_async-0.4.0 → ophyd_async-0.5.1}/docs/how-to/write-tests-for-devices.rst +0 -0
- {ophyd_async-0.4.0 → ophyd_async-0.5.1}/docs/how-to.md +0 -0
- {ophyd_async-0.4.0 → ophyd_async-0.5.1}/docs/images/bluesky_ophyd_epics_devices_logo.svg +0 -0
- {ophyd_async-0.4.0 → ophyd_async-0.5.1}/docs/images/bluesky_ophyd_logo.svg +0 -0
- {ophyd_async-0.4.0 → ophyd_async-0.5.1}/docs/images/ophyd_favicon.svg +0 -0
- {ophyd_async-0.4.0 → ophyd_async-0.5.1}/docs/index.md +0 -0
- {ophyd_async-0.4.0 → ophyd_async-0.5.1}/docs/reference.md +0 -0
- {ophyd_async-0.4.0 → ophyd_async-0.5.1}/docs/tutorials/installation.md +0 -0
- {ophyd_async-0.4.0 → ophyd_async-0.5.1}/docs/tutorials/using-existing-devices.rst +0 -0
- {ophyd_async-0.4.0 → ophyd_async-0.5.1}/docs/tutorials.md +0 -0
- {ophyd_async-0.4.0 → ophyd_async-0.5.1}/setup.cfg +0 -0
- {ophyd_async-0.4.0 → ophyd_async-0.5.1}/src/ophyd_async/__init__.py +0 -0
- {ophyd_async-0.4.0 → ophyd_async-0.5.1}/src/ophyd_async/__main__.py +0 -0
- /ophyd_async-0.4.0/src/ophyd_async/core/utils.py → /ophyd_async-0.5.1/src/ophyd_async/core/_utils.py +0 -0
- {ophyd_async-0.4.0 → ophyd_async-0.5.1}/src/ophyd_async/epics/__init__.py +0 -0
- {ophyd_async-0.4.0 → ophyd_async-0.5.1}/src/ophyd_async/epics/demo/mover.db +0 -0
- {ophyd_async-0.4.0 → ophyd_async-0.5.1}/src/ophyd_async/epics/demo/sensor.db +0 -0
- {ophyd_async-0.4.0/src/ophyd_async/epics/_backend → ophyd_async-0.5.1/src/ophyd_async/fastcs}/__init__.py +0 -0
- {ophyd_async-0.4.0/tests/epics/areadetector → ophyd_async-0.5.1/src/ophyd_async/fastcs/odin}/__init__.py +0 -0
- {ophyd_async-0.4.0/src/ophyd_async → ophyd_async-0.5.1/src/ophyd_async/fastcs}/panda/_table.py +0 -0
- {ophyd_async-0.4.0/src/ophyd_async → ophyd_async-0.5.1/src/ophyd_async/fastcs}/panda/_utils.py +0 -0
- {ophyd_async-0.4.0/tests/epics/motion → ophyd_async-0.5.1/src/ophyd_async/sim}/__init__.py +0 -0
- {ophyd_async-0.4.0/tests/sim → ophyd_async-0.5.1/src/ophyd_async/sim/testing}/__init__.py +0 -0
- {ophyd_async-0.4.0/tests/sim/demo → ophyd_async-0.5.1/src/ophyd_async/tango}/__init__.py +0 -0
- {ophyd_async-0.4.0 → ophyd_async-0.5.1}/src/ophyd_async.egg-info/dependency_links.txt +0 -0
- {ophyd_async-0.4.0 → ophyd_async-0.5.1}/src/ophyd_async.egg-info/entry_points.txt +0 -0
- {ophyd_async-0.4.0 → ophyd_async-0.5.1}/src/ophyd_async.egg-info/top_level.txt +0 -0
- /ophyd_async-0.4.0/tests/core/test_async_status.py → /ophyd_async-0.5.1/tests/core/test_status.py +0 -0
- {ophyd_async-0.4.0/tests/epics → ophyd_async-0.5.1/tests/epics/pvi}/test_pvi.py +0 -0
- {ophyd_async-0.4.0/tests → ophyd_async-0.5.1/tests/fastcs}/panda/db/panda.db +0 -0
- {ophyd_async-0.4.0 → ophyd_async-0.5.1}/tests/test_cli.py +0 -0
- {ophyd_async-0.4.0 → ophyd_async-0.5.1}/tests/test_data/test_yaml_save.yml +0 -0
|
@@ -23,7 +23,7 @@ jobs:
|
|
|
23
23
|
- name: Create GitHub Release
|
|
24
24
|
# We pin to the SHA, not the tag, for security reasons.
|
|
25
25
|
# https://docs.github.com/en/actions/learn-github-actions/security-hardening-for-github-actions#using-third-party-actions
|
|
26
|
-
uses: softprops/action-gh-release@
|
|
26
|
+
uses: softprops/action-gh-release@c062e08bd532815e2082a85e87e3ef29c3e6d191 # v2.0.8
|
|
27
27
|
with:
|
|
28
28
|
prerelease: ${{ contains(github.ref_name, 'a') || contains(github.ref_name, 'b') || contains(github.ref_name, 'rc') }}
|
|
29
29
|
files: "*"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: ophyd-async
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.5.1
|
|
4
4
|
Summary: Asynchronous Bluesky hardware abstraction code, compatible with control systems like EPICS and Tango
|
|
5
5
|
Author-email: Tom Cobb <tom.cobb@diamond.ac.uk>
|
|
6
6
|
License: BSD 3-Clause License
|
|
@@ -55,14 +55,16 @@ Provides-Extra: ca
|
|
|
55
55
|
Requires-Dist: aioca>=1.6; extra == "ca"
|
|
56
56
|
Provides-Extra: pva
|
|
57
57
|
Requires-Dist: p4p; extra == "pva"
|
|
58
|
+
Provides-Extra: sim
|
|
59
|
+
Requires-Dist: h5py; extra == "sim"
|
|
58
60
|
Provides-Extra: dev
|
|
59
61
|
Requires-Dist: ophyd_async[pva]; extra == "dev"
|
|
62
|
+
Requires-Dist: ophyd_async[sim]; extra == "dev"
|
|
60
63
|
Requires-Dist: ophyd_async[ca]; extra == "dev"
|
|
61
64
|
Requires-Dist: black; extra == "dev"
|
|
62
65
|
Requires-Dist: flake8; extra == "dev"
|
|
63
66
|
Requires-Dist: flake8-isort; extra == "dev"
|
|
64
67
|
Requires-Dist: Flake8-pyproject; extra == "dev"
|
|
65
|
-
Requires-Dist: h5py; extra == "dev"
|
|
66
68
|
Requires-Dist: inflection; extra == "dev"
|
|
67
69
|
Requires-Dist: ipython; extra == "dev"
|
|
68
70
|
Requires-Dist: ipywidgets; extra == "dev"
|
|
@@ -3,22 +3,20 @@ from typing import Optional
|
|
|
3
3
|
|
|
4
4
|
from bluesky.protocols import HasHints, Hints
|
|
5
5
|
|
|
6
|
-
from ophyd_async.core import
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
start_acquiring_driver_and_ensure_status,
|
|
6
|
+
from ophyd_async.core import (
|
|
7
|
+
AsyncStatus,
|
|
8
|
+
DetectorControl,
|
|
9
|
+
DetectorTrigger,
|
|
10
|
+
PathProvider,
|
|
11
|
+
StandardDetector,
|
|
13
12
|
)
|
|
14
|
-
from ophyd_async.epics
|
|
15
|
-
from ophyd_async.epics.
|
|
16
|
-
from ophyd_async.epics.areadetector.writers.nd_file_hdf import NDFileHDF
|
|
13
|
+
from ophyd_async.epics import adcore
|
|
14
|
+
from ophyd_async.epics.signal import epics_signal_rw_rbv
|
|
17
15
|
|
|
18
16
|
|
|
19
|
-
class FooDriver(
|
|
17
|
+
class FooDriver(adcore.ADBaseIO):
|
|
20
18
|
def __init__(self, prefix: str, name: str = "") -> None:
|
|
21
|
-
self.trigger_mode =
|
|
19
|
+
self.trigger_mode = epics_signal_rw_rbv(str, prefix + "TriggerMode")
|
|
22
20
|
super().__init__(prefix, name)
|
|
23
21
|
|
|
24
22
|
|
|
@@ -38,40 +36,40 @@ class FooController(DetectorControl):
|
|
|
38
36
|
) -> AsyncStatus:
|
|
39
37
|
await asyncio.gather(
|
|
40
38
|
self._drv.num_images.set(num),
|
|
41
|
-
self._drv.image_mode.set(ImageMode.multiple),
|
|
39
|
+
self._drv.image_mode.set(adcore.ImageMode.multiple),
|
|
42
40
|
self._drv.trigger_mode.set(f"FOO{trigger}"),
|
|
43
41
|
)
|
|
44
42
|
if exposure is not None:
|
|
45
43
|
await self._drv.acquire_time.set(exposure)
|
|
46
|
-
return await start_acquiring_driver_and_ensure_status(self._drv)
|
|
44
|
+
return await adcore.start_acquiring_driver_and_ensure_status(self._drv)
|
|
47
45
|
|
|
48
46
|
async def disarm(self):
|
|
49
|
-
await stop_busy_record(self._drv.acquire, False, timeout=1)
|
|
47
|
+
await adcore.stop_busy_record(self._drv.acquire, False, timeout=1)
|
|
50
48
|
|
|
51
49
|
|
|
52
50
|
class FooDetector(StandardDetector, HasHints):
|
|
53
51
|
_controller: FooController
|
|
54
|
-
_writer:
|
|
52
|
+
_writer: adcore.ADHDFWriter
|
|
55
53
|
|
|
56
54
|
def __init__(
|
|
57
55
|
self,
|
|
58
56
|
prefix: str,
|
|
59
|
-
|
|
57
|
+
path_provider: PathProvider,
|
|
60
58
|
drv_suffix="cam1:",
|
|
61
59
|
hdf_suffix="HDF1:",
|
|
62
60
|
name="",
|
|
63
61
|
):
|
|
64
62
|
# Must be children to pick up connect
|
|
65
63
|
self.drv = FooDriver(prefix + drv_suffix)
|
|
66
|
-
self.hdf =
|
|
64
|
+
self.hdf = adcore.NDFileHDFIO(prefix + hdf_suffix)
|
|
67
65
|
|
|
68
66
|
super().__init__(
|
|
69
67
|
FooController(self.drv),
|
|
70
|
-
|
|
68
|
+
adcore.ADHDFWriter(
|
|
71
69
|
self.hdf,
|
|
72
|
-
|
|
70
|
+
path_provider,
|
|
73
71
|
lambda: self.name,
|
|
74
|
-
ADBaseShapeProvider(self.drv),
|
|
72
|
+
adcore.ADBaseShapeProvider(self.drv),
|
|
75
73
|
),
|
|
76
74
|
config_sigs=(self.drv.acquire_time,),
|
|
77
75
|
name=name,
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# 7. Sub-package Structure
|
|
2
|
+
|
|
3
|
+
Date: 2024-04-22
|
|
4
|
+
|
|
5
|
+
## Status
|
|
6
|
+
|
|
7
|
+
Accepted
|
|
8
|
+
|
|
9
|
+
## Context
|
|
10
|
+
|
|
11
|
+
[](./0004-repository-structure) proposed a top level repository structure. This builds upon it, suggesting a top level structure divided into:
|
|
12
|
+
|
|
13
|
+
- `ophyd_async.core`: Core classes like `Device`, `Signal` and `AsyncStatus`
|
|
14
|
+
- `ophyd_async.epics`: Epics specific signals and devices
|
|
15
|
+
- `ophyd_async.tango`: Tango specific signals and devices
|
|
16
|
+
- `ophyd_async.fastcs`: FastCS (EPICS or Tango) devices like PandA
|
|
17
|
+
- `ophyd_async.planstubs`: Plan stubs for various flyscan functionality
|
|
18
|
+
- `ophyd_async.sim`: Simulated devices for demos and tests
|
|
19
|
+
|
|
20
|
+
This ADR proposes a public sub-package structure. The internal private structure should be flat, but can change according to the number of classes in a public package.
|
|
21
|
+
|
|
22
|
+
## Decision
|
|
23
|
+
|
|
24
|
+
### core
|
|
25
|
+
|
|
26
|
+
There will be a flat public namespace under core, with contents reimported from an underscore prefixed python files, e.g.:
|
|
27
|
+
|
|
28
|
+
- `_status.py` for `AsyncStatus`, `WatchableAsyncStatus`, etc.
|
|
29
|
+
- `_protocol.py` for `AsyncReadable`, `AsyncStageable`, etc.
|
|
30
|
+
- `_device.py` for `Device`, `DeviceVector`, etc.
|
|
31
|
+
- `_signal.py` for `Signal`, `SignalBackend`, `observe_signal`, etc.
|
|
32
|
+
- `_mock.py` for `MockSignalBackend`, `get_mock_put`, etc.
|
|
33
|
+
- `_readable.py` for `StandardReadable`, `ConfigSignal`, `HintedSignal`, etc.
|
|
34
|
+
- `_detector.py` for `StandardDetector`, `DetectorWriter`, `DetectorControl`, `TriggerInfo`, etc.
|
|
35
|
+
- `_flyer.py` for `StandardFlyer`, `FlyerControl`, etc.
|
|
36
|
+
|
|
37
|
+
There are some renames that will be required, e.g. `HardwareTriggeredFlyable` -> `StandardFlyer`
|
|
38
|
+
|
|
39
|
+
### epics
|
|
40
|
+
|
|
41
|
+
Epics modules consist of 2 sorts of classes:
|
|
42
|
+
- `IO` classes, which are `Device` subclasses containing `Signals` that map as closely as possible to the EPICS template hierarchy. Their name matches the EPICS template with the suffix `IO`.
|
|
43
|
+
- `Control` and `Writer` classes that plug into `StandardDetector` and `StandardFlyer` telling them which logic to use during various bluesky verbs.
|
|
44
|
+
|
|
45
|
+
There should be an additional level of packages that correspond to the epics support module, and contain classes that map to the EPICS database and logic classes e.g.:
|
|
46
|
+
|
|
47
|
+
- `epics.signal`: containing `epics_signal_rw`, `CaSignalBackend`, etc.
|
|
48
|
+
- `epics.adcore`: containing `ADDriverIO`, `NDFileHdfIO`, `ADHdfWriter` etc.
|
|
49
|
+
- `epics.adpilatus`: containing `ADPilatusIO`, `PilatusControl` etc.
|
|
50
|
+
|
|
51
|
+
The name of the module is the EPICS module lowercased with dashes and other special characters converted to underscores.
|
|
52
|
+
|
|
53
|
+
They can be imported from modules:
|
|
54
|
+
|
|
55
|
+
```python
|
|
56
|
+
from ophyd_async.epics import adcore, adpilatus
|
|
57
|
+
|
|
58
|
+
drv = adpilatus.ADPilatusIO(prefix + "DRV:")
|
|
59
|
+
hdf = adcore.NDFileHDFIO(prefix + "HDF:")
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
The structure is left to an individual module's size. For instance `motor` will probably be a single `motor.py`, while `ADCore` will likely be an `ADCore/` directory with `_io.py`, `_writer.py`, `_control.py`.
|
|
63
|
+
|
|
64
|
+
Detector modules should include a reference `StandardDetector` subclass, but without making any site specific decisions about PV naming.
|
|
65
|
+
|
|
66
|
+
### tango
|
|
67
|
+
|
|
68
|
+
This has not been created at the time of writing, but it is envisioned that it will follow the EPICS structure where it makes sense.
|
|
69
|
+
|
|
70
|
+
### fastcs
|
|
71
|
+
|
|
72
|
+
There will be one subpackage for each FastCS Device. At the time of writing there are none of these, but PandA and Odin will shortly be converted to FastCS, so it makes sense to make:
|
|
73
|
+
|
|
74
|
+
- `fastcs.panda`
|
|
75
|
+
- `fastcs.odin`
|
|
76
|
+
|
|
77
|
+
in preparation.
|
|
78
|
+
|
|
79
|
+
For PandA its namespace should contain `CommonPandaBlocks`, `SeqBlock`, `PandaHdfWriter`, `PandaPcapController`, etc. These should be included in files like `_control.py`, `_writer.py`, `_block.py`, `_table.py` and imported into the `panda` namespace.
|
|
80
|
+
|
|
81
|
+
### planstubs
|
|
82
|
+
|
|
83
|
+
There will be some planstubs for shared setup that may reach across modules like `epics` and `fastcs/panda`, these should live in a `planstubs/` package.
|
|
84
|
+
|
|
85
|
+
### sim
|
|
86
|
+
|
|
87
|
+
There will be 2 subpackages:
|
|
88
|
+
- `sim.demo` for demo devices like `PatternDetector` and `SimMotor` used in tutorials.
|
|
89
|
+
- `sim.testing` for devices that will support tests in `ophyd-async` and `bluesky`. Some test fixtures could be moved here
|
|
90
|
+
|
|
91
|
+
There should probably be one file per Device, in an underscore prefixed file reimported into the public namespace, e.g. `demo/_sim_motor.py` and `demo/_pattern_detector.py`.
|
|
92
|
+
|
|
93
|
+
## Consequences
|
|
94
|
+
|
|
95
|
+
The public import paths are fixed, but the underlying implementation can move from modules to packages without change to the public interface.
|
|
@@ -11,7 +11,7 @@ Assembly
|
|
|
11
11
|
|
|
12
12
|
Compound assemblies can be used to group Devices into larger logical Devices:
|
|
13
13
|
|
|
14
|
-
.. literalinclude:: ../../src/ophyd_async/epics/demo/
|
|
14
|
+
.. literalinclude:: ../../src/ophyd_async/epics/demo/_mover.py
|
|
15
15
|
:pyobject: SampleStage
|
|
16
16
|
|
|
17
17
|
This applies prefixes on construction:
|
|
@@ -35,7 +35,7 @@ Grouping by Index
|
|
|
35
35
|
|
|
36
36
|
Sometimes, it makes sense to group devices by number, say an array of sensors:
|
|
37
37
|
|
|
38
|
-
.. literalinclude:: ../../src/ophyd_async/epics/demo/
|
|
38
|
+
.. literalinclude:: ../../src/ophyd_async/epics/demo/_sensor.py
|
|
39
39
|
:pyobject: SensorGroup
|
|
40
40
|
|
|
41
41
|
:class:`~ophyd-async.core.DeviceVector` allows writing maintainable, arbitrary-length device groups instead of fixed classes for each possible grouping. A :class:`~ophyd-async.core.DeviceVector` can be accessed via indices, for example: ``my_sensor_group.sensors[2]``. Here ``sensors`` is a dictionary with integer indices rather than a list so that the most semantically sensible indices may be used, the sensor group above may be 1-indexed, for example, because the sensors' datasheet calls them "sensor 1", "sensor 2" etc.
|
|
@@ -22,14 +22,14 @@ For a simple :external+bluesky:py:class:`bluesky.protocols.Readable` object like
|
|
|
22
22
|
define some signals, then tell the superclass which signals should contribute to
|
|
23
23
|
``read()`` and ``read_configuration()``:
|
|
24
24
|
|
|
25
|
-
.. literalinclude:: ../../src/ophyd_async/epics/demo/
|
|
25
|
+
.. literalinclude:: ../../src/ophyd_async/epics/demo/_sensor.py
|
|
26
26
|
:pyobject: Sensor
|
|
27
27
|
|
|
28
28
|
First some Signals are constructed and stored on the Device. Each one is passed
|
|
29
29
|
its Python type, which could be:
|
|
30
30
|
|
|
31
31
|
- A primitive (`str`, `int`, `float`)
|
|
32
|
-
- An array (`numpy.typing.NDArray` or ``Sequence[str]``)
|
|
32
|
+
- An array (`numpy.typing.NDArray` ie. ``numpy.typing.NDArray[numpy.uint16]`` or ``Sequence[str]``)
|
|
33
33
|
- An enum (`enum.Enum`) which **must** also extend `str`
|
|
34
34
|
- `str` and ``EnumClass(str, Enum)`` are the only valid ``datatype`` for an enumerated signal.
|
|
35
35
|
|
|
@@ -54,7 +54,7 @@ Movable
|
|
|
54
54
|
For a more complicated device like a `Mover`, you can still use `StandardReadable`
|
|
55
55
|
and implement some addition protocols:
|
|
56
56
|
|
|
57
|
-
.. literalinclude:: ../../src/ophyd_async/epics/demo/
|
|
57
|
+
.. literalinclude:: ../../src/ophyd_async/epics/demo/_mover.py
|
|
58
58
|
:pyobject: Mover
|
|
59
59
|
|
|
60
60
|
The ``set()`` method implements :external+bluesky:py:class:`bluesky.protocols.Movable`. This
|
|
@@ -71,7 +71,7 @@ Assembly
|
|
|
71
71
|
|
|
72
72
|
Compound assemblies can be used to group Devices into larger logical Devices:
|
|
73
73
|
|
|
74
|
-
.. literalinclude:: ../../src/ophyd_async/epics/demo/
|
|
74
|
+
.. literalinclude:: ../../src/ophyd_async/epics/demo/_mover.py
|
|
75
75
|
:pyobject: SampleStage
|
|
76
76
|
|
|
77
77
|
This applies prefixes on construction:
|
|
@@ -9,7 +9,7 @@ Make a StandardDetector
|
|
|
9
9
|
`StandardDetector` is an abstract class to assist in creating Device classes for hardware that writes its own data e.g. an AreaDetector implementation, or a PandA writing motor encoder positions to file.
|
|
10
10
|
The `StandardDetector` is a simple compound device, with 2 standard components:
|
|
11
11
|
|
|
12
|
-
- `DetectorWriter` to handle data persistence, i/o and pass information about data to the RunEngine (usually an instance of :py:class:`
|
|
12
|
+
- `DetectorWriter` to handle data persistence, i/o and pass information about data to the RunEngine (usually an instance of :py:class:`ADHDFWriter`)
|
|
13
13
|
- `DetectorControl` with logic for arming and disarming the detector. This will be unique to the StandardDetector implementation.
|
|
14
14
|
|
|
15
15
|
Writing an AreaDetector StandardDetector
|
|
@@ -17,11 +17,11 @@ Writing an AreaDetector StandardDetector
|
|
|
17
17
|
|
|
18
18
|
For an AreaDetector implementation of the StandardDetector, two entity objects which are subdevices of the `StandardDetector` are used to map to AreaDetector plugins:
|
|
19
19
|
|
|
20
|
-
- An NDPluginFile instance (for :py:class:`
|
|
21
|
-
- An :py:class:`
|
|
20
|
+
- An NDPluginFile instance (for :py:class:`ADHDFWriter` an instance of :py:class:`NDFileHDFIO`)
|
|
21
|
+
- An :py:class:`ADBaseIO` instance mapping to NDArray for the "driver" of the detector implementation
|
|
22
22
|
|
|
23
23
|
|
|
24
|
-
Define a :py:class:`FooDriver` if the NDArray requires fields in addition to those on :py:class:`
|
|
24
|
+
Define a :py:class:`FooDriver` if the NDArray requires fields in addition to those on :py:class:`ADBaseIO` to be exposed. It should extend :py:class:`ADBaseIO`.
|
|
25
25
|
Enumeration fields should be named to prevent namespace collision, i.e. for a Signal named "TriggerSource" use the enum "FooTriggerSource"
|
|
26
26
|
|
|
27
27
|
.. literalinclude:: ../examples/foo_detector.py
|
|
@@ -50,15 +50,15 @@ Writing a non-AreaDetector StandardDetector
|
|
|
50
50
|
A non-AreaDetector `StandardDetector` should implement `DetectorControl` and `DetectorWriter` directly.
|
|
51
51
|
Here we construct a `DetectorControl` that co-ordinates signals on a PandA PositionCapture block - a child device "pcap" of the `StandardDetector` implementation, analogous to the :py:class:`FooDriver`.
|
|
52
52
|
|
|
53
|
-
.. literalinclude:: ../../src/ophyd_async/panda/
|
|
53
|
+
.. literalinclude:: ../../src/ophyd_async/fastcs/panda/_control.py
|
|
54
54
|
:pyobject: PandaPcapController
|
|
55
55
|
|
|
56
56
|
The PandA may write a number of fields, and the :py:class:`PandaHDFWriter` co-ordinates those, configures the filewriter and describes the data for the RunEngine.
|
|
57
57
|
|
|
58
|
-
.. literalinclude:: ../../src/ophyd_async/panda/
|
|
58
|
+
.. literalinclude:: ../../src/ophyd_async/fastcs/panda/_writer.py
|
|
59
59
|
:pyobject: PandaHDFWriter
|
|
60
60
|
|
|
61
61
|
The PandA StandardDetector implementation simply ties the component parts and its child devices together.
|
|
62
62
|
|
|
63
|
-
.. literalinclude:: ../../src/ophyd_async/panda/_hdf_panda.py
|
|
63
|
+
.. literalinclude:: ../../src/ophyd_async/fastcs/panda/_hdf_panda.py
|
|
64
64
|
:pyobject: HDFPanda
|
|
@@ -32,14 +32,15 @@ requires-python = ">=3.10"
|
|
|
32
32
|
[project.optional-dependencies]
|
|
33
33
|
ca = ["aioca>=1.6"]
|
|
34
34
|
pva = ["p4p"]
|
|
35
|
+
sim = ["h5py"]
|
|
35
36
|
dev = [
|
|
36
37
|
"ophyd_async[pva]",
|
|
38
|
+
"ophyd_async[sim]",
|
|
37
39
|
"ophyd_async[ca]",
|
|
38
40
|
"black",
|
|
39
41
|
"flake8",
|
|
40
42
|
"flake8-isort",
|
|
41
43
|
"Flake8-pyproject",
|
|
42
|
-
"h5py",
|
|
43
44
|
"inflection",
|
|
44
45
|
"ipython",
|
|
45
46
|
"ipywidgets",
|
|
@@ -146,4 +147,11 @@ lint.select = [
|
|
|
146
147
|
"F", # pyflakes rules - https://beta.ruff.rs/docs/rules/#pyflakes-f
|
|
147
148
|
"W", # pycodestyle warnings - https://beta.ruff.rs/docs/rules/#warning-w
|
|
148
149
|
"I001", # isort
|
|
150
|
+
"SLF", # self - https://docs.astral.sh/ruff/settings/#lintflake8-self
|
|
149
151
|
]
|
|
152
|
+
|
|
153
|
+
[tool.ruff.lint.per-file-ignores]
|
|
154
|
+
# By default, private member access is allowed in tests
|
|
155
|
+
# See https://github.com/DiamondLightSource/python-copier-template/issues/154
|
|
156
|
+
# Remove this line to forbid private member access in tests
|
|
157
|
+
"tests/**/*" = ["SLF001"]
|
|
@@ -1,26 +1,13 @@
|
|
|
1
|
-
from .
|
|
2
|
-
AutoIncrementFilenameProvider,
|
|
3
|
-
AutoIncrementingPathProvider,
|
|
4
|
-
FilenameProvider,
|
|
5
|
-
NameProvider,
|
|
6
|
-
PathInfo,
|
|
7
|
-
PathProvider,
|
|
8
|
-
ShapeProvider,
|
|
9
|
-
StaticFilenameProvider,
|
|
10
|
-
StaticPathProvider,
|
|
11
|
-
UUIDFilenameProvider,
|
|
12
|
-
YMDPathProvider,
|
|
13
|
-
)
|
|
14
|
-
from .async_status import AsyncStatus, WatchableAsyncStatus
|
|
15
|
-
from .detector import (
|
|
1
|
+
from ._detector import (
|
|
16
2
|
DetectorControl,
|
|
17
3
|
DetectorTrigger,
|
|
18
4
|
DetectorWriter,
|
|
19
5
|
StandardDetector,
|
|
20
6
|
TriggerInfo,
|
|
21
7
|
)
|
|
22
|
-
from .
|
|
23
|
-
from .
|
|
8
|
+
from ._device import Device, DeviceCollector, DeviceVector
|
|
9
|
+
from ._device_save_loader import (
|
|
10
|
+
all_at_once,
|
|
24
11
|
get_signal_values,
|
|
25
12
|
load_device,
|
|
26
13
|
load_from_yaml,
|
|
@@ -29,9 +16,11 @@ from .device_save_loader import (
|
|
|
29
16
|
set_signal_values,
|
|
30
17
|
walk_rw_signals,
|
|
31
18
|
)
|
|
32
|
-
from .
|
|
33
|
-
from .
|
|
34
|
-
from .
|
|
19
|
+
from ._flyer import StandardFlyer, TriggerLogic
|
|
20
|
+
from ._hdf_dataset import HDFDataset, HDFFile
|
|
21
|
+
from ._log import config_ophyd_async_logging
|
|
22
|
+
from ._mock_signal_backend import MockSignalBackend
|
|
23
|
+
from ._mock_signal_utils import (
|
|
35
24
|
callback_on_mock_put,
|
|
36
25
|
get_mock_put,
|
|
37
26
|
mock_puts_blocked,
|
|
@@ -40,7 +29,22 @@ from .mock_signal_utils import (
|
|
|
40
29
|
set_mock_value,
|
|
41
30
|
set_mock_values,
|
|
42
31
|
)
|
|
43
|
-
from .
|
|
32
|
+
from ._protocol import AsyncConfigurable, AsyncReadable, AsyncStageable
|
|
33
|
+
from ._providers import (
|
|
34
|
+
AutoIncrementFilenameProvider,
|
|
35
|
+
AutoIncrementingPathProvider,
|
|
36
|
+
FilenameProvider,
|
|
37
|
+
NameProvider,
|
|
38
|
+
PathInfo,
|
|
39
|
+
PathProvider,
|
|
40
|
+
ShapeProvider,
|
|
41
|
+
StaticFilenameProvider,
|
|
42
|
+
StaticPathProvider,
|
|
43
|
+
UUIDFilenameProvider,
|
|
44
|
+
YMDPathProvider,
|
|
45
|
+
)
|
|
46
|
+
from ._readable import ConfigSignal, HintedSignal, StandardReadable
|
|
47
|
+
from ._signal import (
|
|
44
48
|
Signal,
|
|
45
49
|
SignalR,
|
|
46
50
|
SignalRW,
|
|
@@ -51,98 +55,107 @@ from .signal import (
|
|
|
51
55
|
assert_reading,
|
|
52
56
|
assert_value,
|
|
53
57
|
observe_value,
|
|
58
|
+
set_and_wait_for_other_value,
|
|
54
59
|
set_and_wait_for_value,
|
|
55
60
|
soft_signal_r_and_setter,
|
|
56
61
|
soft_signal_rw,
|
|
57
62
|
wait_for_value,
|
|
58
63
|
)
|
|
59
|
-
from .
|
|
60
|
-
from .
|
|
61
|
-
from .
|
|
62
|
-
from .
|
|
64
|
+
from ._signal_backend import RuntimeSubsetEnum, SignalBackend, SubsetEnum
|
|
65
|
+
from ._soft_signal_backend import SignalMetadata, SoftSignalBackend
|
|
66
|
+
from ._status import AsyncStatus, WatchableAsyncStatus
|
|
67
|
+
from ._utils import (
|
|
63
68
|
DEFAULT_TIMEOUT,
|
|
64
69
|
CalculatableTimeout,
|
|
65
70
|
CalculateTimeout,
|
|
66
|
-
Callback,
|
|
67
71
|
NotConnected,
|
|
68
72
|
ReadingValueCallback,
|
|
69
73
|
T,
|
|
74
|
+
WatcherUpdate,
|
|
70
75
|
get_dtype,
|
|
71
76
|
get_unique,
|
|
72
|
-
|
|
77
|
+
in_micros,
|
|
73
78
|
wait_for_connection,
|
|
74
79
|
)
|
|
75
80
|
|
|
76
81
|
__all__ = [
|
|
77
|
-
"AsyncStatus",
|
|
78
|
-
"AutoIncrementFilenameProvider",
|
|
79
|
-
"AutoIncrementingPathProvider",
|
|
80
|
-
"CalculatableTimeout",
|
|
81
|
-
"CalculateTimeout",
|
|
82
|
-
"Callback",
|
|
83
|
-
"ConfigSignal",
|
|
84
|
-
"DEFAULT_TIMEOUT",
|
|
85
82
|
"DetectorControl",
|
|
86
83
|
"DetectorTrigger",
|
|
87
84
|
"DetectorWriter",
|
|
85
|
+
"StandardDetector",
|
|
86
|
+
"TriggerInfo",
|
|
88
87
|
"Device",
|
|
89
88
|
"DeviceCollector",
|
|
90
89
|
"DeviceVector",
|
|
91
|
-
"
|
|
92
|
-
"
|
|
93
|
-
"
|
|
90
|
+
"all_at_once",
|
|
91
|
+
"get_signal_values",
|
|
92
|
+
"load_device",
|
|
93
|
+
"load_from_yaml",
|
|
94
|
+
"save_device",
|
|
95
|
+
"save_to_yaml",
|
|
96
|
+
"set_signal_values",
|
|
97
|
+
"walk_rw_signals",
|
|
98
|
+
"StandardFlyer",
|
|
99
|
+
"TriggerLogic",
|
|
100
|
+
"HDFDataset",
|
|
101
|
+
"HDFFile",
|
|
102
|
+
"config_ophyd_async_logging",
|
|
94
103
|
"MockSignalBackend",
|
|
104
|
+
"callback_on_mock_put",
|
|
105
|
+
"get_mock_put",
|
|
106
|
+
"mock_puts_blocked",
|
|
107
|
+
"reset_mock_put_calls",
|
|
108
|
+
"set_mock_put_proceeds",
|
|
109
|
+
"set_mock_value",
|
|
110
|
+
"set_mock_values",
|
|
111
|
+
"AsyncConfigurable",
|
|
112
|
+
"AsyncReadable",
|
|
113
|
+
"AsyncStageable",
|
|
114
|
+
"AutoIncrementFilenameProvider",
|
|
115
|
+
"AutoIncrementingPathProvider",
|
|
116
|
+
"FilenameProvider",
|
|
95
117
|
"NameProvider",
|
|
96
|
-
"NotConnected",
|
|
97
118
|
"PathInfo",
|
|
98
119
|
"PathProvider",
|
|
99
|
-
"ReadingValueCallback",
|
|
100
|
-
"RuntimeSubsetEnum",
|
|
101
120
|
"ShapeProvider",
|
|
121
|
+
"StaticFilenameProvider",
|
|
122
|
+
"StaticPathProvider",
|
|
123
|
+
"UUIDFilenameProvider",
|
|
124
|
+
"YMDPathProvider",
|
|
125
|
+
"ConfigSignal",
|
|
126
|
+
"HintedSignal",
|
|
127
|
+
"StandardReadable",
|
|
102
128
|
"Signal",
|
|
103
|
-
"SignalBackend",
|
|
104
129
|
"SignalR",
|
|
105
130
|
"SignalRW",
|
|
106
131
|
"SignalW",
|
|
107
132
|
"SignalX",
|
|
108
|
-
"SoftSignalBackend",
|
|
109
|
-
"StandardDetector",
|
|
110
|
-
"StandardReadable",
|
|
111
|
-
"StaticFilenameProvider",
|
|
112
|
-
"StaticPathProvider",
|
|
113
|
-
"SubsetEnum",
|
|
114
|
-
"T",
|
|
115
|
-
"TriggerInfo",
|
|
116
|
-
"TriggerLogic",
|
|
117
|
-
"UUIDFilenameProvider",
|
|
118
|
-
"WatchableAsyncStatus",
|
|
119
|
-
"YMDPathProvider",
|
|
120
|
-
# Lower-cased imports
|
|
121
133
|
"assert_configuration",
|
|
122
134
|
"assert_emitted",
|
|
123
135
|
"assert_reading",
|
|
124
136
|
"assert_value",
|
|
125
|
-
"callback_on_mock_put",
|
|
126
|
-
"get_dtype",
|
|
127
|
-
"get_mock_put",
|
|
128
|
-
"get_signal_values",
|
|
129
|
-
"get_unique",
|
|
130
|
-
"load_device",
|
|
131
|
-
"load_from_yaml",
|
|
132
|
-
"merge_gathered_dicts",
|
|
133
|
-
"mock_puts_blocked",
|
|
134
137
|
"observe_value",
|
|
135
|
-
"reset_mock_put_calls",
|
|
136
|
-
"save_device",
|
|
137
|
-
"save_to_yaml",
|
|
138
138
|
"set_and_wait_for_value",
|
|
139
|
-
"
|
|
140
|
-
"set_mock_value",
|
|
141
|
-
"set_mock_values",
|
|
142
|
-
"set_signal_values",
|
|
139
|
+
"set_and_wait_for_other_value",
|
|
143
140
|
"soft_signal_r_and_setter",
|
|
144
141
|
"soft_signal_rw",
|
|
145
|
-
"wait_for_connection",
|
|
146
142
|
"wait_for_value",
|
|
147
|
-
"
|
|
143
|
+
"RuntimeSubsetEnum",
|
|
144
|
+
"SignalBackend",
|
|
145
|
+
"SubsetEnum",
|
|
146
|
+
"SignalMetadata",
|
|
147
|
+
"SoftSignalBackend",
|
|
148
|
+
"AsyncStatus",
|
|
149
|
+
"WatchableAsyncStatus",
|
|
150
|
+
"DEFAULT_TIMEOUT",
|
|
151
|
+
"CalculatableTimeout",
|
|
152
|
+
"CalculateTimeout",
|
|
153
|
+
"NotConnected",
|
|
154
|
+
"ReadingValueCallback",
|
|
155
|
+
"T",
|
|
156
|
+
"WatcherUpdate",
|
|
157
|
+
"get_dtype",
|
|
158
|
+
"get_unique",
|
|
159
|
+
"in_micros",
|
|
160
|
+
"wait_for_connection",
|
|
148
161
|
]
|