mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-06 18:10:40 +02:00
virtual and vetofile
This commit is contained in:
parent
6b7dee2631
commit
22f14cacb0
@ -19,6 +19,22 @@ pycmd += ['vrf', 'vtr', 'vrs', 'vtgstv', 'vsvn', 'vtrim',
|
|||||||
'vin_com', 'vin_cm', 'vrshaper', 'vrshaper_n', 'vrpreamp', 'vishaper',
|
'vin_com', 'vin_cm', 'vrshaper', 'vrshaper_n', 'vrpreamp', 'vishaper',
|
||||||
'vicin', 'vcassh', 'vcal_n', 'vcal_p']
|
'vicin', 'vcassh', 'vcal_n', 'vcal_p']
|
||||||
|
|
||||||
|
# command : reason
|
||||||
|
intentionally_missing = [
|
||||||
|
'temp_10ge', #temperatures already available from enum or specialized class
|
||||||
|
'temp_adc',
|
||||||
|
'temp_dcdc',
|
||||||
|
'temp_fpga',
|
||||||
|
'temp_fpgaext',
|
||||||
|
'temp_fpgafl',
|
||||||
|
'temp_fpgafr',
|
||||||
|
'temp_slowadc',
|
||||||
|
'temp_sodl',
|
||||||
|
'temp_sodr',
|
||||||
|
'trigger', #use sendSoftwareTrigger
|
||||||
|
]
|
||||||
|
|
||||||
|
pycmd += intentionally_missing
|
||||||
missing = []
|
missing = []
|
||||||
for c in cmd:
|
for c in cmd:
|
||||||
if c not in pycmd:
|
if c not in pycmd:
|
||||||
|
@ -1028,12 +1028,31 @@ class Detector(CppDetectorApi):
|
|||||||
'detectorserver': self.detectorserverversion,
|
'detectorserver': self.detectorserverversion,
|
||||||
'receiver': self.rx_version}
|
'receiver': self.rx_version}
|
||||||
|
|
||||||
|
@property
|
||||||
|
def virtual(self):
|
||||||
|
"""
|
||||||
|
Setup with n virtual servers running on localhost
|
||||||
|
starting with port p
|
||||||
|
|
||||||
|
Examples
|
||||||
|
---------
|
||||||
|
|
||||||
|
>>> d.virtual = n, p
|
||||||
|
|
||||||
|
"""
|
||||||
|
raise NotImplementedError('Virtual is set only')
|
||||||
|
|
||||||
|
@virtual.setter
|
||||||
|
def virtual(self, args):
|
||||||
|
n_detectors, starting_port = args
|
||||||
|
self.setVirtualDetectorServers(n_detectors, starting_port)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def packageversion(self):
|
def packageversion(self):
|
||||||
return self.getPackageVersion()
|
return self.getPackageVersion()
|
||||||
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def ratecorr(self):
|
def ratecorr(self):
|
||||||
"""
|
"""
|
||||||
@ -1418,6 +1437,33 @@ class Detector(CppDetectorApi):
|
|||||||
self.setVeto(value)
|
self.setVeto(value)
|
||||||
|
|
||||||
|
|
||||||
|
@property
|
||||||
|
def vetofile(self):
|
||||||
|
"""
|
||||||
|
[Gotthard2] Set veto reference for each 128 channels for specific chip.
|
||||||
|
The file should have 128 rows of gain index and 12 bit value in dec
|
||||||
|
|
||||||
|
Examples
|
||||||
|
---------
|
||||||
|
|
||||||
|
d.vetofile = '/path/to/file.txt' #set for all chips
|
||||||
|
d.vetofile = 3, '/path/to/file.txt' # set for chip 3
|
||||||
|
|
||||||
|
"""
|
||||||
|
raise NotImplementedError('vetofile is set only')
|
||||||
|
|
||||||
|
@vetofile.setter
|
||||||
|
def vetofile(self, args):
|
||||||
|
if isinstance(args, str):
|
||||||
|
chip_index = -1
|
||||||
|
fname = args
|
||||||
|
elif isinstance(args, (tuple, list)):
|
||||||
|
chip_index, fname = args
|
||||||
|
else:
|
||||||
|
raise ValueError("unknow argument to vetofile")
|
||||||
|
|
||||||
|
self.setVetoFile(chip_index, fname)
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Mythen3 specific
|
Mythen3 specific
|
||||||
"""
|
"""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user