refactor: add docstrings and clean cam classes; dxp and hdf for falcon
This commit is contained in:
parent
88d3b92b33
commit
702b212f50
@ -33,49 +33,23 @@ class EigerTimeoutError(Exception):
|
||||
|
||||
|
||||
class SlsDetectorCam(Device):
|
||||
# detector_type = ADCpt(EpicsSignalRO, "DetectorType_RBV")
|
||||
# setting = ADCpt(EpicsSignalWithRBV, "Setting")
|
||||
# delay_time = ADCpt(EpicsSignalWithRBV, "DelayTime")
|
||||
"""SLS Detector Camera - Eiger 9M
|
||||
|
||||
Base class to map EPICS PVs to ophyd signals.
|
||||
"""
|
||||
threshold_energy = ADCpt(EpicsSignalWithRBV, "ThresholdEnergy")
|
||||
beam_energy = ADCpt(EpicsSignalWithRBV, "BeamEnergy")
|
||||
# enable_trimbits = ADCpt(EpicsSignalWithRBV, "Trimbits")
|
||||
bit_depth = ADCpt(EpicsSignalWithRBV, "BitDepth")
|
||||
# num_gates = ADCpt(EpicsSignalWithRBV, "NumGates")
|
||||
num_cycles = ADCpt(EpicsSignalWithRBV, "NumCycles")
|
||||
num_frames = ADCpt(EpicsSignalWithRBV, "NumFrames")
|
||||
timing_mode = ADCpt(EpicsSignalWithRBV, "TimingMode")
|
||||
trigger_software = ADCpt(EpicsSignal, "TriggerSoftware")
|
||||
# high_voltage = ADCpt(EpicsSignalWithRBV, "HighVoltage")
|
||||
# Receiver and data callback
|
||||
# receiver_mode = ADCpt(EpicsSignalWithRBV, "ReceiverMode")
|
||||
# receiver_stream = ADCpt(EpicsSignalWithRBV, "ReceiverStream")
|
||||
# enable_data = ADCpt(EpicsSignalWithRBV, "UseDataCallback")
|
||||
# missed_packets = ADCpt(EpicsSignalRO, "ReceiverMissedPackets_RBV")
|
||||
# Direct settings access
|
||||
# setup_file = ADCpt(EpicsSignal, "SetupFile")
|
||||
# load_setup = ADCpt(EpicsSignal, "LoadSetup")
|
||||
# command = ADCpt(EpicsSignal, "Command")
|
||||
# Mythen 3
|
||||
# counter_mask = ADCpt(EpicsSignalWithRBV, "CounterMask")
|
||||
# counter1_threshold = ADCpt(EpicsSignalWithRBV, "Counter1Threshold")
|
||||
# counter2_threshold = ADCpt(EpicsSignalWithRBV, "Counter2Threshold")
|
||||
# counter3_threshold = ADCpt(EpicsSignalWithRBV, "Counter3Threshold")
|
||||
# gate1_delay = ADCpt(EpicsSignalWithRBV, "Gate1Delay")
|
||||
# gate1_width = ADCpt(EpicsSignalWithRBV, "Gate1Width")
|
||||
# gate2_delay = ADCpt(EpicsSignalWithRBV, "Gate2Delay")
|
||||
# gate2_width = ADCpt(EpicsSignalWithRBV, "Gate2Width")
|
||||
# gate3_delay = ADCpt(EpicsSignalWithRBV, "Gate3Delay")
|
||||
# gate3_width = ADCpt(EpicsSignalWithRBV, "Gate3Width")
|
||||
# # Moench
|
||||
# json_frame_mode = ADCpt(EpicsSignalWithRBV, "JsonFrameMode")
|
||||
# json_detector_mode = ADCpt(EpicsSignalWithRBV, "JsonDetectorMode")
|
||||
|
||||
# fixes due to missing PVs from CamBase
|
||||
acquire = ADCpt(EpicsSignal, "Acquire")
|
||||
detector_state = ADCpt(EpicsSignalRO, "DetectorState_RBV")
|
||||
|
||||
|
||||
class TriggerSource(int, enum.Enum):
|
||||
"""Trigger signals for Eiger9M detector"""
|
||||
AUTO = 0
|
||||
TRIGGER = 1
|
||||
GATING = 2
|
||||
@ -83,6 +57,7 @@ class TriggerSource(int, enum.Enum):
|
||||
|
||||
|
||||
class DetectorState(int, enum.Enum):
|
||||
""" Detector states for Eiger9M detector"""
|
||||
IDLE = 0
|
||||
ERROR = 1
|
||||
WAITING = 2
|
||||
|
@ -28,12 +28,16 @@ class FalconTimeoutError(Exception):
|
||||
|
||||
|
||||
class DetectorState(int, enum.Enum):
|
||||
"""Detector states for Falcon detector"""
|
||||
DONE = 0
|
||||
ACQUIRING = 1
|
||||
|
||||
|
||||
class EpicsDXPFalcon(Device):
|
||||
"""All high-level DXP parameters for each channel"""
|
||||
"""DXP parameters for Falcon detector
|
||||
|
||||
Base class to map EPICS PVs from DXP parameters to ophyd signals.
|
||||
"""
|
||||
|
||||
elapsed_live_time = Cpt(EpicsSignal, "ElapsedLiveTime")
|
||||
elapsed_real_time = Cpt(EpicsSignal, "ElapsedRealTime")
|
||||
@ -53,15 +57,16 @@ class EpicsDXPFalcon(Device):
|
||||
current_pixel = Cpt(EpicsSignalRO, "CurrentPixel")
|
||||
|
||||
|
||||
class FalconHDF5Plugins(Device): # HDF5Plugin_V21, FilePlugin_V22):
|
||||
class FalconHDF5Plugins(Device):
|
||||
"""HDF5 parameters for Falcon detector
|
||||
|
||||
Base class to map EPICS PVs from HDF5 Plugin to ophyd signals.
|
||||
"""
|
||||
capture = Cpt(EpicsSignalWithRBV, "Capture")
|
||||
enable = Cpt(EpicsSignalWithRBV, "EnableCallbacks", string=True, kind="config")
|
||||
xml_file_name = Cpt(EpicsSignalWithRBV, "XMLFileName", string=True, kind="config")
|
||||
lazy_open = Cpt(EpicsSignalWithRBV, "LazyOpen", string=True, doc="0='No' 1='Yes'")
|
||||
temp_suffix = Cpt(EpicsSignalWithRBV, "TempSuffix", string=True)
|
||||
# file_path = Cpt(
|
||||
# EpicsSignalWithRBV, "FilePath", string=True, kind="config", path_semantics="posix"
|
||||
# )
|
||||
file_path = Cpt(EpicsSignalWithRBV, "FilePath", string=True, kind="config")
|
||||
file_name = Cpt(EpicsSignalWithRBV, "FileName", string=True, kind="config")
|
||||
file_template = Cpt(EpicsSignalWithRBV, "FileTemplate", string=True, kind="config")
|
||||
|
@ -39,50 +39,11 @@ class TriggerSource(int, enum.Enum):
|
||||
ALGINMENT = 4
|
||||
|
||||
|
||||
class SlsDetectorCam(Device): # CamBase, FileBase):
|
||||
# detector_type = ADCpt(EpicsSignalRO, "DetectorType_RBV")
|
||||
# setting = ADCpt(EpicsSignalWithRBV, "Setting")
|
||||
# beam_energy = ADCpt(EpicsSignalWithRBV, "BeamEnergy")
|
||||
# enable_trimbits = ADCpt(EpicsSignalWithRBV, "Trimbits")
|
||||
# bit_depth = ADCpt(EpicsSignalWithRBV, "BitDepth")
|
||||
# trigger_software = ADCpt(EpicsSignal, "TriggerSoftware")
|
||||
# high_voltage = ADCpt(EpicsSignalWithRBV, "HighVoltage")
|
||||
# Receiver and data callback
|
||||
# receiver_mode = ADCpt(EpicsSignalWithRBV, "ReceiverMode")
|
||||
# receiver_stream = ADCpt(EpicsSignalWithRBV, "ReceiverStream")
|
||||
# enable_data = ADCpt(EpicsSignalWithRBV, "UseDataCallback")
|
||||
# missed_packets = ADCpt(EpicsSignalRO, "ReceiverMissedPackets_RBV")
|
||||
# # Direct settings access
|
||||
# setup_file = ADCpt(EpicsSignal, "SetupFile")
|
||||
# load_setup = ADCpt(EpicsSignal, "LoadSetup")
|
||||
# command = ADCpt(EpicsSignal, "Command")
|
||||
# Mythen 3
|
||||
# counter_mask = ADCpt(EpicsSignalWithRBV, "CounterMask")
|
||||
# counter1_threshold = ADCpt(EpicsSignalWithRBV, "Counter1Threshold")
|
||||
# counter2_threshold = ADCpt(EpicsSignalWithRBV, "Counter2Threshold")
|
||||
# counter3_threshold = ADCpt(EpicsSignalWithRBV, "Counter3Threshold")
|
||||
# gate1_delay = ADCpt(EpicsSignalWithRBV, "Gate1Delay")
|
||||
# gate1_width = ADCpt(EpicsSignalWithRBV, "Gate1Width")
|
||||
# gate2_delay = ADCpt(EpicsSignalWithRBV, "Gate2Delay")
|
||||
# gate2_width = ADCpt(EpicsSignalWithRBV, "Gate2Width")
|
||||
# gate3_delay = ADCpt(EpicsSignalWithRBV, "Gate3Delay")
|
||||
# gate3_width = ADCpt(EpicsSignalWithRBV, "Gate3Width")
|
||||
# Moench
|
||||
# json_frame_mode = ADCpt(EpicsSignalWithRBV, "JsonFrameMode")
|
||||
# json_detector_mode = ADCpt(EpicsSignalWithRBV, "JsonDetectorMode")
|
||||
class SlsDetectorCam(Device):
|
||||
"""SLS Detector Camera - Pilatus
|
||||
|
||||
# Eiger9M
|
||||
# delay_time = ADCpt(EpicsSignalWithRBV, "DelayTime")
|
||||
# num_frames = ADCpt(EpicsSignalWithRBV, "NumFrames")
|
||||
# acquire = ADCpt(EpicsSignal, "Acquire")
|
||||
# acquire_time = ADCpt(EpicsSignal, 'AcquireTime')
|
||||
# detector_state = ADCpt(EpicsSignalRO, "DetectorState_RBV")
|
||||
# threshold_energy = ADCpt(EpicsSignalWithRBV, "ThresholdEnergy")
|
||||
# num_gates = ADCpt(EpicsSignalWithRBV, "NumGates")
|
||||
# num_cycles = ADCpt(EpicsSignalWithRBV, "NumCycles")
|
||||
# timing_mode = ADCpt(EpicsSignalWithRBV, "TimingMode")
|
||||
|
||||
# Pilatus_2 300k
|
||||
Base class to map EPICS PVs to ophyd signals.
|
||||
"""
|
||||
num_images = ADCpt(EpicsSignalWithRBV, "NumImages")
|
||||
num_exposures = ADCpt(EpicsSignalWithRBV, "NumExposures")
|
||||
delay_time = ADCpt(EpicsSignalWithRBV, "NumExposures")
|
||||
|
Loading…
x
Reference in New Issue
Block a user