mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-23 15:00:02 +02:00
Merge branch 'developer' into rxrmetadata
This commit is contained in:
commit
b124cea67b
@ -14,3 +14,4 @@ g = Gotthard2()
|
||||
# j = Jungfrau()
|
||||
# m = Mythen3()
|
||||
m = Moench()
|
||||
|
||||
|
@ -15,11 +15,60 @@ pycmd += ['vrf', 'vtr', 'vrs', 'vtgstv', 'vsvn', 'vtrim',
|
||||
'vpreamp', 'vref_comp', 'vref_comp_fe vref_ds', 'vref_h_adc',
|
||||
'vref_l_adc', 'iodelay', 'list', 'vref_ds', 'vis', 'vpl',
|
||||
'vref_comp_fe', 'vph', 'vout_cm', 'vcp', 'vcn', 'vcmp_ll', 'vcmp_lr'
|
||||
, 'vcmp_rl', 'vcmp_rr', 'vcal', 'vcas', 'vipre',
|
||||
'vin_com', 'vin_cm', 'vrshaper', 'vrshaper_n', 'vrpreamp', 'vishaper',
|
||||
'vicin', 'vcassh', 'vcal_n', 'vcal_p']
|
||||
|
||||
# command : reason
|
||||
]
|
||||
|
||||
|
||||
# dacs are in general not included in the python commands and we expect to
|
||||
# set them from the specialized class or using an enum
|
||||
dacs = [
|
||||
'vicin',
|
||||
'vcassh',
|
||||
'vcal_n',
|
||||
'vcal_p'
|
||||
'vipre_out',
|
||||
'vipre_cds',
|
||||
'vdd_prot',
|
||||
'vcmp_rl',
|
||||
'vcmp_rr',
|
||||
'vcal', 'vcas',
|
||||
'vipre',
|
||||
'vin_com',
|
||||
'vin_cm',
|
||||
'vrshaper',
|
||||
'vrshaper_n',
|
||||
'vrpreamp',
|
||||
'vishaper',
|
||||
'vipre_out',
|
||||
'vcom_adc1',
|
||||
'vcom_adc2',
|
||||
'vcom_cds',
|
||||
'vdcsh',
|
||||
'v_chip',
|
||||
'vb_comp',
|
||||
'vb_comp_adc',
|
||||
'vb_comp_fe',
|
||||
'vb_cs',
|
||||
'vb_ds',
|
||||
'vb_opa_1st',
|
||||
'vb_opa_fd',
|
||||
'vb_pixbuf',
|
||||
'vb_sda',
|
||||
'vbp_colbuf',
|
||||
'vcal_p',
|
||||
'vcasc_out',
|
||||
'vcasc_sfp',
|
||||
'vcascn_pb',
|
||||
'vcascp_pb',
|
||||
'vchip_comp_adc',
|
||||
'vchip_comp_fe',
|
||||
'vchip_cs',
|
||||
'vchip_opa_1st',
|
||||
'vchip_opa_fd',
|
||||
'vchip_ref_comp_fe',
|
||||
|
||||
]
|
||||
|
||||
intentionally_missing = [
|
||||
'temp_10ge', #temperatures already available from enum or specialized class
|
||||
'temp_adc',
|
||||
@ -32,9 +81,13 @@ intentionally_missing = [
|
||||
'temp_sodl',
|
||||
'temp_sodr',
|
||||
'trigger', #use sendSoftwareTrigger
|
||||
'update', #use updateServerAndFirmare
|
||||
'udp_validate', #use validateUdpConfiguration
|
||||
'udp_reconfigure', #use reconfigureUdpDestination
|
||||
]
|
||||
|
||||
pycmd += intentionally_missing
|
||||
pycmd += dacs
|
||||
missing = []
|
||||
for c in cmd:
|
||||
if c not in pycmd:
|
||||
|
@ -374,6 +374,47 @@ class Detector(CppDetectorApi):
|
||||
|
||||
# TODO! add txdelay
|
||||
|
||||
@property
|
||||
@element
|
||||
def txndelay_frame(self):
|
||||
return self.getTransmissionDelayFrame()
|
||||
|
||||
@txndelay_frame.setter
|
||||
def txndelay_frame(self, args):
|
||||
if isinstance(args, dict):
|
||||
for key, value in args.items():
|
||||
self.setTransmissionDelayFrame(value, [key])
|
||||
else:
|
||||
self.setTransmissionDelayFrame(args)
|
||||
|
||||
|
||||
@property
|
||||
@element
|
||||
def txndelay_left(self):
|
||||
return self.getTransmissionDelayLeft()
|
||||
|
||||
@txndelay_left.setter
|
||||
def txndelay_left(self, args):
|
||||
if isinstance(args, dict):
|
||||
for key, value in args.items():
|
||||
self.setTransmissionDelayLeft(value, [key])
|
||||
else:
|
||||
self.setTransmissionDelayLeft(args)
|
||||
|
||||
|
||||
@property
|
||||
@element
|
||||
def txndelay_right(self):
|
||||
return self.getTransmissionDelayRight()
|
||||
|
||||
@txndelay_right.setter
|
||||
def txndelay_right(self, args):
|
||||
if isinstance(args, dict):
|
||||
for key, value in args.items():
|
||||
self.setTransmissionDelayRight(value, [key])
|
||||
else:
|
||||
self.setTransmissionDelayRight(args)
|
||||
|
||||
@property
|
||||
def use_receiver(self):
|
||||
return element_if_equal(self.getUseReceiverFlag())
|
||||
@ -929,6 +970,18 @@ class Detector(CppDetectorApi):
|
||||
fname = ut.make_string_path(fname)
|
||||
self.loadTrimbits(fname)
|
||||
|
||||
@property
|
||||
@element
|
||||
def trimval(self):
|
||||
"""
|
||||
[Eiger][Mythen3] Set all trimbits to this value. Returns -1 if all trimbits are different values.
|
||||
"""
|
||||
return self.getAllTrimbits()
|
||||
|
||||
@trimval.setter
|
||||
def trimval(self, value):
|
||||
self.setAllTrimbits(value)
|
||||
|
||||
@property
|
||||
def lock(self):
|
||||
"""Lock detector to one client IP, 1 locks, 0 unlocks. Default is unlocked."""
|
||||
@ -1009,6 +1062,16 @@ class Detector(CppDetectorApi):
|
||||
"""
|
||||
return self._adc_register
|
||||
|
||||
@property
|
||||
@element
|
||||
def triggersl(self):
|
||||
return self.getNumberOfTriggersLeft()
|
||||
|
||||
@property
|
||||
@element
|
||||
def timestamp(self):
|
||||
return self.getMeasurementTime()
|
||||
|
||||
@property
|
||||
def led(self):
|
||||
"""[Ctb] Switches on/off all LEDs. Default is enabled. """
|
||||
@ -1018,6 +1081,13 @@ class Detector(CppDetectorApi):
|
||||
def led(self, value):
|
||||
self.setLEDEnable(value)
|
||||
|
||||
def acquire(self):
|
||||
"""
|
||||
Run the configured measurement
|
||||
"""
|
||||
super().acquire()
|
||||
print('\n', end = '')
|
||||
|
||||
|
||||
@property
|
||||
def versions(self):
|
||||
@ -1464,6 +1534,35 @@ class Detector(CppDetectorApi):
|
||||
|
||||
self.setVetoFile(chip_index, fname)
|
||||
|
||||
@property
|
||||
def vetophoton(self):
|
||||
raise NotImplementedError('vetofile is set only')
|
||||
|
||||
@vetophoton.setter
|
||||
def vetophoton(self, args):
|
||||
chip_index, n_photons, photon_energy, fname = args
|
||||
self.setVetoPhoton(chip_index, n_photons, photon_energy, fname)
|
||||
|
||||
@property
|
||||
@element
|
||||
def vetoref(self):
|
||||
"""
|
||||
[Gotthard2] Set veto reference for all 128 channels for all chips.
|
||||
|
||||
Examples:
|
||||
----------
|
||||
|
||||
>>> d.vetoref = chip, value
|
||||
|
||||
"""
|
||||
raise NotImplementedError('vetoref is set only')
|
||||
|
||||
@vetoref.setter
|
||||
def vetoref(self, args):
|
||||
gain_index, value = args
|
||||
self.setVetoReference(gain_index, value)
|
||||
|
||||
|
||||
"""
|
||||
Mythen3 specific
|
||||
"""
|
||||
|
Binary file not shown.
@ -249,15 +249,15 @@ u_int16_t getHardwareVersionNumber() {
|
||||
#ifdef VIRTUAL
|
||||
return 0;
|
||||
#endif
|
||||
return bus_r(MCB_SERIAL_NO_REG);
|
||||
return ((bus_r(MCB_SERIAL_NO_REG) & MCB_SERIAL_NO_VRSN_MSK) >>
|
||||
MCB_SERIAL_NO_VRSN_OFST);
|
||||
}
|
||||
|
||||
u_int32_t getDetectorNumber() {
|
||||
#ifdef VIRTUAL
|
||||
return 0;
|
||||
#endif
|
||||
return ((bus_r(MCB_SERIAL_NO_REG) & MCB_SERIAL_NO_VRSN_MSK) >>
|
||||
MCB_SERIAL_NO_VRSN_OFST);
|
||||
return bus_r(MCB_SERIAL_NO_REG);
|
||||
}
|
||||
|
||||
u_int64_t getDetectorMAC() {
|
||||
|
@ -8,5 +8,5 @@
|
||||
#define APIJUNGFRAU 0x200810
|
||||
#define APIMOENCH 0x200810
|
||||
#define APIEIGER 0x200831
|
||||
#define APIMYTHEN3 0x200901
|
||||
#define APIGOTTHARD2 0x200902
|
||||
#define APIMYTHEN3 0x200903
|
||||
|
Loading…
x
Reference in New Issue
Block a user