From 0a62c9aac6f74e7f7c65f6b0bf51bc70d201aefa Mon Sep 17 00:00:00 2001 From: gac-x07mb Date: Fri, 23 Aug 2024 14:00:56 +0200 Subject: [PATCH] correct syntax error --- .../device_configs/phoenix_falcon.yaml | 2 +- phoenix_bec/devices/falcon_phoenix_no_hdf5.py | 37 ++++++++++++------- 2 files changed, 24 insertions(+), 15 deletions(-) diff --git a/phoenix_bec/device_configs/phoenix_falcon.yaml b/phoenix_bec/device_configs/phoenix_falcon.yaml index 2f24a63..5884a17 100644 --- a/phoenix_bec/device_configs/phoenix_falcon.yaml +++ b/phoenix_bec/device_configs/phoenix_falcon.yaml @@ -1,6 +1,6 @@ falcon_nohdf5: description: Falcon detector x-ray fluoresence II - deviceClass: phoenix_bec.devices.falcon_phoenix_no_hdf5.FalconcSAXS + deviceClass: phoenix_bec.devices.falcon_phoenix_no_hdf5.FalconPHOENIX deviceConfig: prefix: 'X07MB-SITORO:' deviceTags: diff --git a/phoenix_bec/devices/falcon_phoenix_no_hdf5.py b/phoenix_bec/devices/falcon_phoenix_no_hdf5.py index 22c3a9f..a1dcff2 100644 --- a/phoenix_bec/devices/falcon_phoenix_no_hdf5.py +++ b/phoenix_bec/devices/falcon_phoenix_no_hdf5.py @@ -256,7 +256,7 @@ class FalconSetup(CustomDetectorMixin): #): # # Retry stop detector and wait for remaining time # raise FalconTimeoutError( - # f"Failed to stop detector, timeou t with state {signal_conditions[0][0]}" + # f"Failed to stop detector, timeout with state {signal_conditions[0][0]}" # ) def stop_detector_backend(self) -> None: @@ -288,6 +288,10 @@ class FalconSetup(CustomDetectorMixin): self.stop_detector() self.stop_detector_backend() + + + + def set_trigger( self, mapping_mode: MappingSource, trigger_source: TriggerSource, ignore_gate: int = 0 ) -> None: @@ -302,18 +306,25 @@ class FalconSetup(CustomDetectorMixin): """ mapping = int(mapping_mode) trigger = trigger_source - self.parent.collect_mode.put(m -prefix ---- X07MB-ES-MA1: - class attributes: - custom_prepare_cls (FalconSetup) : Custom detector setup class for cSAXS, - inherits from CustomDetectorMixin - PSIDetectorBase.set_min_readout (float) : Minimum readout time for the detector - dxp (EpicsDXPFalcon) : DXP parameters for Falcon detector - mca (EpicsMCARecord) : MCA parameters for Falcon detector - hdf5 (FalconHDF5Plugins) : HDF5 parameters for Falcon detector - MIN_READOUT (float) : Minimum readout time for the detector + self.parent.collect_mode.put(mapping) + self.parent.pixel_advance_mode.put(trigger) + self.parent.ignore_gate.put(ignore_gate) +class FalconPhoenix(PSIDetectorBase): + """ + Falcon detector for phoenix + custom_prepare_cls (XMAPSetu + custom_prepare_cls (XMAPSetup) : Custom detector setup class for cSAXS, + inherits from CustomDetectorMixin + in __init__ of PSIDetecor base + PSIDetectorBase.set_min_readout (float) : Minimum readout time for the detector + dxp (EpicsDXPXMAP) : DXP parameters for XMAP detector + mca (EpicsMCARecord) : MCA parameters for XMAP detector + hdf5 (XMAPHDF5Plugins) : HDF5 parameters for XMAP detector + MIN_READOUT (float) : Minimum readout time for the detector + """ + # Specify which functions are revealed to the user in BEC client USER_ACCESS = ["describe"] @@ -351,6 +362,4 @@ prefix ---- X07MB-ES-MA1: if __name__ == "__main__": - falcon = FalconcSAXS(name="falcon", prefix="X12SA-SITORO:", sim_mode=True) - - + falcon = FalconPhoenix(name="falcon", prefix="X07MB-SITORO:", sim_mode=True)