mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-20 02:40:03 +02:00
dac example
This commit is contained in:
parent
c8a39d1d9e
commit
534c7105f4
@ -181,3 +181,39 @@ Setting and getting times
|
||||
>>> t = d.getExptime()
|
||||
>>> element_if_equal(t)
|
||||
datetime.timedelta(seconds=1)
|
||||
|
||||
--------------
|
||||
Reading dacs
|
||||
--------------
|
||||
|
||||
::
|
||||
|
||||
from slsdet import Detector, Eiger, dacIndex
|
||||
|
||||
#using the specialized class
|
||||
e = Eiger()
|
||||
>>> e.dacs
|
||||
========== DACS =========
|
||||
vsvp : 0 0
|
||||
vtrim : 2480 2480
|
||||
vrpreamp : 3300 3300
|
||||
vrshaper : 1400 1400
|
||||
vsvn : 4000 4000
|
||||
vtgstv : 2556 2556
|
||||
vcmp_ll : 1000 1000
|
||||
vcmp_lr : 1000 1000
|
||||
vcal : 0 0
|
||||
vcmp_rl : 1000 1000
|
||||
rxb_rb : 1100 1100
|
||||
rxb_lb : 1100 1100
|
||||
vcmp_rr : 1000 1000
|
||||
vcp : 1000 1000
|
||||
vcn : 2000 2000
|
||||
vishaper : 1550 1550
|
||||
iodelay : 650 650
|
||||
|
||||
# or using the general class and the list
|
||||
d = Detector()
|
||||
for dac in d.daclist:
|
||||
r = d.getDAC(dac, False)
|
||||
print(f'{dac.name:10s} {r}')
|
||||
|
@ -92,6 +92,9 @@ class DetectorDacs:
|
||||
dac_array[i,:] = _d[:]
|
||||
return dac_array
|
||||
|
||||
def to_array(self):
|
||||
return self.get_asarray()
|
||||
|
||||
def set_from_array(self, dac_array):
|
||||
"""
|
||||
Set the dacs from an numpy array with dac values. [ndacs, nmodules]
|
||||
|
@ -637,6 +637,10 @@ class Detector(CppDetectorApi):
|
||||
def reg(self):
|
||||
return self._register
|
||||
|
||||
@property
|
||||
def daclist(self):
|
||||
return self.getDacList()
|
||||
|
||||
@property
|
||||
def adcreg(self):
|
||||
"""[Jungfrau][Ctb][Moench][Gotthard] Writes to an adc register
|
||||
|
Loading…
x
Reference in New Issue
Block a user