mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-21 11:20:04 +02:00
added currentsource example for python
This commit is contained in:
parent
56b7dd3ca9
commit
5ed1e1f43f
10
python/examples/use_currentsource.py
Normal file
10
python/examples/use_currentsource.py
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
from slsdet import Detector, currentSrcParameters
|
||||||
|
|
||||||
|
s = currentSrcParameters()
|
||||||
|
s.enable_ = 1
|
||||||
|
s.fix_= 1
|
||||||
|
s.select_ = 10
|
||||||
|
|
||||||
|
|
||||||
|
d = Detector()
|
||||||
|
d.currentsource = s
|
@ -15,5 +15,7 @@ sp.dacSettleTime_ns = int(1e9)
|
|||||||
d = Mythen3()
|
d = Mythen3()
|
||||||
d.setScan(sp)
|
d.setScan(sp)
|
||||||
|
|
||||||
|
#or d.scan = sp
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -362,6 +362,21 @@ class Detector(CppDetectorApi):
|
|||||||
"""
|
"""
|
||||||
return self.getNumberOfFramesFromStart()
|
return self.getNumberOfFramesFromStart()
|
||||||
|
|
||||||
|
|
||||||
|
@property
|
||||||
|
@element
|
||||||
|
def scan(self):
|
||||||
|
"""
|
||||||
|
Pass in a scanParameters object
|
||||||
|
see python/examples/use_scan.py
|
||||||
|
|
||||||
|
"""
|
||||||
|
return self.getScan()
|
||||||
|
|
||||||
|
@scan.setter
|
||||||
|
def scan(self, s):
|
||||||
|
ut.set_using_dict(self.setScan, s)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
@element
|
@element
|
||||||
def powerchip(self):
|
def powerchip(self):
|
||||||
@ -2213,18 +2228,14 @@ class Detector(CppDetectorApi):
|
|||||||
self.setGainMode(value)
|
self.setGainMode(value)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
@element
|
||||||
def currentsource(self):
|
def currentsource(self):
|
||||||
"""
|
"""
|
||||||
[Gotthard2]
|
Pass in a currentSrcParameters object
|
||||||
currentsource [0|1]
|
see python/examples/use_currentsource.py
|
||||||
Enable or disable current source. Default is disabled.
|
|
||||||
|
|
||||||
[Jungfrau]
|
|
||||||
currentsource [0|1] [fix|nofix] [select source] [(only for chipv1.1)normal|low]
|
|
||||||
Disable or enable current source with some parameters. The select source is 0-63 for chipv1.0 and a 64 bit mask for chipv1.1. To disable, one needs only one argument '0'.
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
return element_if_equal(self.getCurrentSource())
|
return self.getCurrentSource()
|
||||||
|
|
||||||
@currentsource.setter
|
@currentsource.setter
|
||||||
def currentsource(self, cs):
|
def currentsource(self, cs):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user