From bde88ec5ced30426687d9bcee228dcd138a451f7 Mon Sep 17 00:00:00 2001 From: gac-x07mb Date: Tue, 19 Nov 2024 16:38:02 +0100 Subject: [PATCH] test upload for debugging --- .../device_configs/current_devices_tmp.yaml | 101 ++++++++++++++++++ phoenix_bec/devices/phoenix_falcon.py | 14 +-- .../Code_to_test_devices/test_falcon.py | 2 +- 3 files changed, 110 insertions(+), 7 deletions(-) diff --git a/phoenix_bec/device_configs/current_devices_tmp.yaml b/phoenix_bec/device_configs/current_devices_tmp.yaml index aeb31f0..a397747 100644 --- a/phoenix_bec/device_configs/current_devices_tmp.yaml +++ b/phoenix_bec/device_configs/current_devices_tmp.yaml @@ -116,3 +116,104 @@ SAI_08_MEAN: # # END OF STANDARD CONFIG # +# +# Configuration XMAP +# +xmap: + description: XMAP detector x-ray fluoresence + deviceClass: phoenix_bec.devices.phoenix_xmap.XMAPPhoenix + deviceConfig: + prefix: 'X07MB-XMAP:' + deviceTags: + - phoenix + - xmap + - phoenix_bec/device_configs/phoenix_xmap.yaml + - class XMAPPhoenix + - file phoenix_xmap + onFailure: buffer + enabled: true + readoutPriority: async + softwareTrigger: false + +# +# Configuration XMAP +# +xmap: + description: XMAP detector x-ray fluoresence + deviceClass: phoenix_bec.devices.phoenix_xmap.XMAPPhoenix + deviceConfig: + prefix: 'X07MB-XMAP:' + deviceTags: + - phoenix + - xmap + - phoenix_bec/device_configs/phoenix_xmap.yaml + - class XMAPPhoenix + - file phoenix_xmap + onFailure: buffer + enabled: true + readoutPriority: async + softwareTrigger: false + + +# +# falcon without hdf5 +# +falcon: + description: Falcon detector x-ray fluoresence with hdf5 plugin from device class phoenix_bec.devices. falcon_phoenix.FalconPhoenix + deviceClass: phoenix_bec.devices.phoenix_falcon.FalconPhoenix + deviceConfig: + prefix: 'X07MB-SITORO:' + deviceTags: + - phoenix + - falcon + - with hdf5 + - phoenix_falcon.yaml + - class FalconPhoenix + - file:phoenix_falcon.py + onFailure: buffer + enabled: true + readoutPriority: async + softwareTrigger: false +# +# END FALCON with HDF5 +# +# +# falcon without hdf5 +# +falcon: + description: Falcon detector x-ray fluoresence with hdf5 plugin from device class phoenix_bec.devices. falcon_phoenix.FalconPhoenix + deviceClass: phoenix_bec.devices.phoenix_falcon.FalconPhoenix + deviceConfig: + prefix: 'X07MB-SITORO:' + deviceTags: + - phoenix + - falcon + - with hdf5 + - phoenix_falcon.yaml + - class FalconPhoenix + - file:phoenix_falcon.py + onFailure: buffer + enabled: true + readoutPriority: async + softwareTrigger: false +# +# END FALCON with HDF5 +## +# Configuration XMAP +# +xmap: + description: XMAP detector x-ray fluoresence + deviceClass: phoenix_bec.devices.phoenix_xmap.XMAPPhoenix + deviceConfig: + prefix: 'X07MB-XMAP:' + deviceTags: + - phoenix + - xmap + - phoenix_bec/device_configs/phoenix_xmap.yaml + - class XMAPPhoenix + - file phoenix_xmap + onFailure: buffer + enabled: true + readoutPriority: async + softwareTrigger: false + diff --git a/phoenix_bec/devices/phoenix_falcon.py b/phoenix_bec/devices/phoenix_falcon.py index f4c3ab0..9f56aa3 100644 --- a/phoenix_bec/devices/phoenix_falcon.py +++ b/phoenix_bec/devices/phoenix_falcon.py @@ -51,13 +51,15 @@ import os import threading import time + from bec_lib.logger import bec_logger from ophyd import Component as Cpt from ophyd import Device, EpicsSignal, EpicsSignalRO, EpicsSignalWithRBV -from ophyd_devices.devices.dxp import Falcon, EpicsMCARecord, EpicsDXPFalcon -from ophyd_devices.devices.areadetector.plugins import HDF5Plugin_V35 as HDF5Plugin +#from ophyd_devices.devices.dxp import Falcon, EpicsMCARecord, EpicsDXPFalcon # from Xiaoquiang +#from phoenix_bec.ophyd_devices.devices.dxp import Falcon, EpicsMCARecord, EpicsDXPFalcon +from ophyd_devices.devices.areadetector.plugins import HDF5Plugin_V35 as HDF5Plugin# from ophyd_devices.interfaces.base_classes.psi_detector_base import ( CustomDetectorMixin, @@ -111,9 +113,9 @@ class FalconSetup(CustomDetectorMixin): def on_init(self) -> None: """Initialize Falcon detector""" - self.initialize_default_parameter() - self.initialize_detector() - self.initialize_detector_backend() + #self.initialize_default_parameter() + #self.initialize_detector() + #self.initialize_detector_backend() def initialize_default_parameter(self) -> None: """ @@ -358,7 +360,7 @@ class FalconPhoenix(PSIDetectorBase, Falcon): #mca4 = Cpt(EpicsMCARecord, "mca4") # optionally with a HDF5 writer plugin - hdf5 = Cpt(HDF5Plugin, "HDF1:") + # hdf5 = Cpt(HDF5Plugin, "HDF1:") if __name__ == "__main__": diff --git a/phoenix_bec/local_scripts/Code_to_test_devices/test_falcon.py b/phoenix_bec/local_scripts/Code_to_test_devices/test_falcon.py index 3015fe0..70638d6 100644 --- a/phoenix_bec/local_scripts/Code_to_test_devices/test_falcon.py +++ b/phoenix_bec/local_scripts/Code_to_test_devices/test_falcon.py @@ -8,7 +8,7 @@ falcon = 0 from ophyd import Component as Cpt import phoenix_bec.devices.phoenix_falcon as ff -falcon = ff.FalconPhoenix(name="falcon_hdf5", prefix="X07MB-SITORO:") +falcon = ff.FalconPhoenix(name="falcon", prefix="X07MB-SITORO:") # xmap = ff.FalconPhoenix(name="falcon_hdf5", prefix="X07MB-XMAP:") # make a 'get to read all epics channels # there will be an error message, if device contains a channel whcih does not exist