From 6c6688da1345c555b4fd7393fbf0eaf9fea2db10 Mon Sep 17 00:00:00 2001 From: wyzula-jan Date: Tue, 26 May 2026 16:03:49 +0200 Subject: [PATCH] wip scienta analyzer template for device --- pearl_bec/devices/scienta_analyzer.py | 53 +++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 pearl_bec/devices/scienta_analyzer.py diff --git a/pearl_bec/devices/scienta_analyzer.py b/pearl_bec/devices/scienta_analyzer.py new file mode 100644 index 0000000..9aa8d76 --- /dev/null +++ b/pearl_bec/devices/scienta_analyzer.py @@ -0,0 +1,53 @@ +from ophyd import DeviceStatus, StatusBase +from ophyd_devices import PSIDeviceBase +from ophyd_devices.devices.areadetector.cam import PeakAnalyserCam + + +class ScientaAnalyzer(PSIDeviceBase, PeakAnalyserCam): + + def __init__(self, *args, **kwargs): + #TODO do implementation what is needed stuff + + + def on_init(self) -> None: + """ + Called when the device is initialized. + + No signals are connected at this point. If you like to + set default values on signals, please use on_connected instead. + """ + + def on_connected(self) -> None: + """ + Called after the device is connected and its signals are connected. + Default values for signals should be set here. + """ + + def on_stage(self) -> DeviceStatus | StatusBase | None: + """ + Called while staging the device. + + Information about the upcoming scan can be accessed from the scan_info (self.scan_info.msg) object. + """ + + def on_unstage(self) -> DeviceStatus | StatusBase | None: + """Called while unstaging the device.""" + + def on_pre_scan(self) -> DeviceStatus | StatusBase | None: + """Called right before the scan starts on all devices automatically.""" + + def on_trigger(self) -> DeviceStatus | StatusBase | None: + """Called when the device is triggered.""" + + def on_complete(self) -> DeviceStatus | StatusBase | None: + """Called to inquire if a device has completed a scans.""" + + def on_kickoff(self) -> DeviceStatus | StatusBase | None: + """Called to kickoff a device for a fly scan. Has to be called explicitly.""" + + def on_stop(self) -> None: + """Called when the device is stopped.""" + + def on_destroy(self) -> None: + """Called when the device is destroyed. Cleanup resources here.""" +