From 5cd93fc5aad696eafb0a474d8e51e582754e1c9b Mon Sep 17 00:00:00 2001 From: gac-x12sa Date: Mon, 24 Mar 2025 17:38:01 +0100 Subject: [PATCH] wip moving readout from class attribute to constant --- csaxs_bec/devices/epics/delay_generator_csaxs.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/csaxs_bec/devices/epics/delay_generator_csaxs.py b/csaxs_bec/devices/epics/delay_generator_csaxs.py index af1cbd1..8b42fec 100644 --- a/csaxs_bec/devices/epics/delay_generator_csaxs.py +++ b/csaxs_bec/devices/epics/delay_generator_csaxs.py @@ -22,6 +22,9 @@ class DelayGeneratorError(Exception): """Exception raised for errors.""" +READOUT_TIME = [1e-3, EIGER9M_READOUT_TIME, 1e-3, 1e-3, 1e-3] # TO, AB, CD, EF, GH + + class DelayGeneratorcSAXS(PSIDeviceBase, DelayGenerator): """ For DDG CAQTDM panel: @@ -38,7 +41,6 @@ class DelayGeneratorcSAXS(PSIDeviceBase, DelayGenerator): # Readout time of detectors, will be subtracted from exp_time # TBD should this behave like this or should it be added to the exp_time? - READOUT_TIME = [1e-3, EIGER9M_READOUT_TIME, 1e-3, 1e-3, 1e-3] # TO, AB, CD, EF, GH def __init__( self, @@ -101,7 +103,7 @@ class DelayGeneratorcSAXS(PSIDeviceBase, DelayGenerator): exp_time = self.scan_info.msg.scan_parameters["exp_time"] bursts = self.scan_info.msg.scan_parameters["frames_per_trigger"] self.burst_enable(count=bursts, delay=0, period=exp_time, config="first") - widths = [exp_time - readout for readout in self.READOUT_TIME] + widths = [exp_time - readout for readout in READOUT_TIME] self.set_channels("width", widths) self.set_channels("delay", 0) return