|
7 | 7 | modifier plugin that runs multiple actions in sequence with conditional logic to determine which actions to run based on the scan context. |
8 | 8 | """ |
9 | 9 |
|
10 | | -from bec_server.scan_server.scans.scan_modifier import ScanModifier, scan_hook_impl |
| 10 | +from typing import Any |
11 | 11 |
|
| 12 | +from bec_server.scan_server.scans.scan_modifier import ScanModifier |
12 | 13 |
|
13 | 14 |
|
14 | 15 | class BecTestingPluginScanModifier(ScanModifier): |
15 | 16 | """ |
16 | 17 | Scan modifier for bec_testing_plugin. |
17 | | - |
| 18 | +
|
18 | 19 | By inheriting from the ScanModifier base class, you get access to currently running scan (self.scan), the devices (self.dev), the scan info (self.scan_info), |
19 | 20 | the scan components (self.components) and the scan actions (self.actions). |
20 | 21 | """ |
21 | 22 |
|
22 | | - def __init__(self, **kwargs): |
23 | | - """Initialize the scan modifier.""" |
24 | | - super().__init__(**kwargs) |
25 | | - |
26 | | - # Example of running code before the scan stage for a specific scan |
27 | | - # @scan_hook_impl("stage", "before") |
28 | | - # def before_stage(self): |
29 | | - # """Run before the stage hook.""" |
30 | | - # self.actions.send_client_info("Custom stage logic executed by ScanModifier.") |
31 | | - # if self.scan_info.scan_name == "example_scan": |
32 | | - # self.dev.samx.set(20) |
33 | | - |
34 | | - |
| 23 | + # @staticmethod |
| 24 | + # def scan_signature_overrides( |
| 25 | + # scan_name: str, arguments: dict[str, Any | None], defaults: dict[str, Any] |
| 26 | + # ) -> tuple[dict, dict]: |
| 27 | + # if "relative" in arguments: |
| 28 | + # arguments.pop("relative", None) |
| 29 | + # defaults["relative"] = False |
| 30 | + # if scan_name == "custom_testing_scan": |
| 31 | + # arguments.pop("settling_time", None) |
| 32 | + # defaults.pop("settling_time", None) |
| 33 | + # return arguments, defaults |
0 commit comments