closes #575
This pull request introduces significant changes to the TriggerInfo class and related logic in the ophyd_async package to support multiple trigger counts. The main changes include renaming the number field to number_of_triggers, updating associated logic, and modifying tests to accommodate these changes.
Core changes:
TriggerInfo Class:
Renamed number to number_of_triggers and updated its type to support both single integers and lists of integers. (src/ophyd_async/core/_detector.py)
Added a computed_field and cached_property to calculate the total number of triggers. (src/ophyd_async/core/_detector.py)
Detector Logic:
Updated prepare, kickoff, and complete methods to handle the new number_of_triggers logic. (src/ophyd_async/core/_detector.py)
Controller updates:
EPICS Controllers:
Updated prepare methods to use total_number_of_triggers instead of number. (src/ophyd_async/epics/adaravis/_aravis_controller.py, src/ophyd_async/epics/adkinetix/_kinetix_controller.py, src/ophyd_async/epics/adpilatus/_pilatus_controller.py, src/ophyd_async/epics/adsimdetector/_sim_controller.py, src/ophyd_async/epics/advimba/_vimba_controller.py, src/ophyd_async/epics/eiger/_eiger_controller.py)
Test updates:
Test Adjustments:
Modified tests to accommodate the new number_of_triggers field. (tests/core/test_flyer.py, tests/conftest.py, system_tests/epics/eiger/test_eiger_system.py)
Other changes:
Imports and Typing:
Added cached_property and updated imports for NonNegativeInt and computed_field. (src/ophyd_async/core/_detector.py)
Removed unused iteration parameter from prepare_static_seq_table_flyer_and_detectors_with_same_trigger. (src/ophyd_async/plan_stubs/_fly.py)
closes #575 This pull request introduces significant changes to the
TriggerInfo
class and related logic in theophyd_async
package to support multiple trigger counts. The main changes include renaming thenumber
field tonumber_of_triggers
, updating associated logic, and modifying tests to accommodate these changes.Core changes:
TriggerInfo Class:
number
tonumber_of_triggers
and updated its type to support both single integers and lists of integers. (src/ophyd_async/core/_detector.py
)computed_field
andcached_property
to calculate the total number of triggers. (src/ophyd_async/core/_detector.py
)Detector Logic:
prepare
,kickoff
, andcomplete
methods to handle the newnumber_of_triggers
logic. (src/ophyd_async/core/_detector.py
)Controller updates:
EPICS Controllers:
prepare
methods to usetotal_number_of_triggers
instead ofnumber
. (src/ophyd_async/epics/adaravis/_aravis_controller.py
,src/ophyd_async/epics/adkinetix/_kinetix_controller.py
,src/ophyd_async/epics/adpilatus/_pilatus_controller.py
,src/ophyd_async/epics/adsimdetector/_sim_controller.py
,src/ophyd_async/epics/advimba/_vimba_controller.py
,src/ophyd_async/epics/eiger/_eiger_controller.py
)Test updates:
number_of_triggers
field. (tests/core/test_flyer.py
,tests/conftest.py
,system_tests/epics/eiger/test_eiger_system.py
)Other changes:
cached_property
and updated imports forNonNegativeInt
andcomputed_field
. (src/ophyd_async/core/_detector.py
)iteration
parameter fromprepare_static_seq_table_flyer_and_detectors_with_same_trigger
. (src/ophyd_async/plan_stubs/_fly.py
)