minor changes

This commit is contained in:
gac-x07mb
2024-08-16 17:40:29 +02:00
parent 9b63d4af18
commit a21f0eebfe
3 changed files with 77 additions and 9 deletions

View File

@ -34,6 +34,11 @@ class PhoenixTriggerDetectorState(enum.IntEnum):
class PhoenixTriggerSetup(CustomDetectorMixin): class PhoenixTriggerSetup(CustomDetectorMixin):
"""
This defines the trigger setup.
"""
def __init__(self, *args, parent:Device = None, **kwargs): def __init__(self, *args, parent:Device = None, **kwargs):
super().__init__(*args, parent=parent, **kwargs) super().__init__(*args, parent=parent, **kwargs)
@ -153,20 +158,78 @@ class EigerROIStatPlugin(ROIStatPlugin):
roi2 = ADCpt(ROIStatNPlugin, '2:') roi2 = ADCpt(ROIStatNPlugin, '2:')
class PhoenixTrigger(PSIDetectorBase): class PhoenixTrigger(PSIDetectorBase):
""" """
Parent class: PSIDetectorBase
class attributes:
custom_prepare_cls (XMAPSetup) : Custom detector setup class for cSAXS,
inherits from CustomDetectorMixin
in __init__ of PSIDetecor bases
class is initialized
self.custom_prepare = self.custom_prepare_cls(parent=self, **kwargs)
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
The class PhoenixTrigger is the class to be called via yaml configuration file
the input arguments are defined by PSIDetectorBase,
and need to be given in the yaml configuration file.
To adress chanels such as 'X07MB-OP2:SMPL-DONE':
use prefix 'X07MB-OP2:' in the device definition in the yaml configuration file.
PSIDetectorBase(
prefix='',
*,Q
name,
kind=None,
parent=None,
device_manager=None,
**kwargs,
)
Docstring:
Abstract base class for SLS detectors
Class attributes:
custom_prepare_cls (object): class for custom prepare logic (BL specific)
Args:
prefix (str): EPICS PV prefix for component (optional)
name (str): name of the device, as will be reported via read()
kind (str): member of class 'ophydobj.Kind', defaults to Kind.normal
omitted -> readout ignored for read 'ophydobj.read()'
normal -> readout for read
config -> config parameter for 'ophydobj.read_configuration()'
hinted -> which attribute is readout for read
parent (object): instance of the parent device
device_manager (object): bec device manager
**kwargs: keyword arguments
File: /data/test/x07mb-test-bec/bec_deployment/ophyd_devices/ophyd_devices/interfaces/base_classes/psi_detector_base.py
Type: type
Subclasses: SimCamera, SimMonitorAsync
""" """
custom_prepare_cls = PhoenixTriggerSetup #custom_prepare_cls = PhoenixTriggerSetup
cam = ADCpt(SLSDetectorCam, 'cam1:') #cam = ADCpt(SLSDetectorCam, 'cam1:')
X07MB-OP2:START-CSMPL.. cont on / off #X07MB-OP2:START-CSMPL.. cont on / off
X07MB-OP2:SMPL.. take single sample # X07MB-OP2:SMPL.. take single sample
X07MB-OP2:INTR-COUNT.. counter run up #X07MB-OP2:INTR-COUNT.. counter run up
X07MB-OP2:TOTAL-CYCLES .. cycles set #X07MB-OP2:TOTAL-CYCLES .. cycles set
X07MB-OP2:SMPL-DONE #X07MB-OP2:SMPL-DONE
QUESTION HOW does ADCpt kno the EPICS prefix??????
#image = ADCpt(ImagePlugin, 'image1:') #image = ADCpt(ImagePlugin, 'image1:')
#roi1 = ADCpt(ROIPlugin, 'ROI1:') #roi1 = ADCpt(ROIPlugin, 'ROI1:')

View File

@ -78,7 +78,7 @@ class EpicsDXPXMAP(Device):
current_pixel = Cpt(EpicsSignalRO, "CurrentPixel") current_pixel = Cpt(EpicsSignalRO, "CurrentPixel")
Q
class XMAPHDF5Plugins(Device): class XMAPHDF5Plugins(Device):
""" """
HDF5 parameters for XMAP detector HDF5 parameters for XMAP detector
@ -309,7 +309,7 @@ class XMAPSetup(CustomDetectorMixin):
class XMAPphoenix(PSIDetectorBase): class XMAPphoenix(PSIDetectorBase):
""" """MCA
XMAP detector for phoenix XMAP detector for phoenix
Parent class: PSIDetectorBase Parent class: PSIDetectorBase
@ -317,6 +317,7 @@ class XMAPphoenix(PSIDetectorBase):
class attributes: class attributes:
custom_prepare_cls (XMAPSetup) : Custom detector setup class for cSAXS, custom_prepare_cls (XMAPSetup) : Custom detector setup class for cSAXS,
inherits from CustomDetectorMixin inherits from CustomDetectorMixin
in __init__ of PSIDetecor base
PSIDetectorBase.set_min_readout (float) : Minimum readout time for the detector PSIDetectorBase.set_min_readout (float) : Minimum readout time for the detector
dxp (EpicsDXPXMAP) : DXP parameters for XMAP detector dxp (EpicsDXPXMAP) : DXP parameters for XMAP detector
mca (EpicsMCARecord) : MCA parameters for XMAP detector mca (EpicsMCARecord) : MCA parameters for XMAP detector

View File

@ -1,4 +1,8 @@
print('#######################################') print('#######################################')
print('bec.show_global_vars()') print('bec.show_global_vars()')
bec.show_global_vars() bec.show_global_vars()