Revert "Revert "J9compdisable""

This commit is contained in:
Dhanya Thattil
2021-08-02 17:15:46 +02:00
committed by GitHub
parent 044879a088
commit bdffcb1cf1
23 changed files with 355 additions and 34 deletions

View File

@@ -2165,6 +2165,26 @@ class Detector(CppDetectorApi):
def selinterface(self, i):
ut.set_using_dict(self.selectUDPInterface, i)
@property
def gainmodelist(self):
"""List of gainmode implemented for this detector."""
return self.getGainModeList()
@property
def gainmode(self):
"""
[Jungfrau] Detector gain mode. Enum: gainMode
Note
-----
[Jungfrau] NORMAL_GAIN_MODE, FORCE_SWITCH_G1, FORCE_SWITCH_G2
"""
return element_if_equal(self.getGainMode())
@gainmode.setter
def gainmode(self, value):
self.setGainMode(value)
"""
---------------------------<<<Gotthard2 specific>>>---------------------------
"""

View File

@@ -1,17 +1,20 @@
"""
Automatically improt all enums from slsDetectorDefs and give an
alias with their name in the enum module. All names from the enum
module is later imported into slsdet
Example: detectorType = _slsdet.slsDetectorDefs.detectorType
Usage can later be:
from slsdet import detectorType
if dt === detectorType.EIGER:
#do something
"""
import _slsdet
runStatus = _slsdet.slsDetectorDefs.runStatus
speedLevel = _slsdet.slsDetectorDefs.speedLevel
detectorType = _slsdet.slsDetectorDefs.detectorType
frameDiscardPolicy = _slsdet.slsDetectorDefs.frameDiscardPolicy
fileFormat = _slsdet.slsDetectorDefs.fileFormat
dimension = _slsdet.slsDetectorDefs.dimension
externalSignalFlag = _slsdet.slsDetectorDefs.externalSignalFlag
timingMode = _slsdet.slsDetectorDefs.timingMode
dacIndex = _slsdet.slsDetectorDefs.dacIndex
detectorSettings = _slsdet.slsDetectorDefs.detectorSettings
clockIndex = _slsdet.slsDetectorDefs.clockIndex
readoutMode = _slsdet.slsDetectorDefs.readoutMode
burstMode = _slsdet.slsDetectorDefs.burstMode
timingSourceType = _slsdet.slsDetectorDefs.timingSourceType
M3_GainCaps = _slsdet.slsDetectorDefs.M3_GainCaps
for name, cls in _slsdet.slsDetectorDefs.__dict__.items():
if isinstance(cls, type):
exec(f'{name} = {cls.__module__}.{cls.__qualname__}')