mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-11 04:17:15 +02:00
Setting pattern from memory (#218)
* ToString accepts c-style arrays * added patternParameters to python * fixed patwait time bug in validation * moved load from file function to patterParameters * server using patternparamters structure to get pattern Co-authored-by: Erik Frojdh <erik.frojdh@gmail.com>
This commit is contained in:
14
python/examples/manipulate_pattern.py
Normal file
14
python/examples/manipulate_pattern.py
Normal file
@ -0,0 +1,14 @@
|
||||
|
||||
|
||||
from slsdet import Detector, patternParameters
|
||||
|
||||
d = Detector()
|
||||
pat = patternParameters()
|
||||
|
||||
#Access to memers of the structure using numpy arrays
|
||||
pat.patlimits = 0x0, 0xa
|
||||
|
||||
d.setPattern(pat)
|
||||
|
||||
#Load pattern from file
|
||||
pat.load("/some/dir/some.pat")
|
@ -6,7 +6,7 @@ d = Detector()
|
||||
d.fformat = fileFormat.BINARY
|
||||
|
||||
# Altough not recommended for convenience all enums
|
||||
# and some other things can be impored using *
|
||||
# and some other things can be imported using *
|
||||
|
||||
from slsdet import *
|
||||
d.speed = speedLevel.FULL_SPEED
|
||||
@ -15,6 +15,6 @@ d.speed = speedLevel.FULL_SPEED
|
||||
|
||||
import slsdet.enums
|
||||
for enum in dir(slsdet.enums):
|
||||
# filter out special memebers
|
||||
# filter out special members
|
||||
if not enum.startswith('_'):
|
||||
print(enum)
|
||||
|
Reference in New Issue
Block a user