mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-11 04:17:15 +02:00
WIP
This commit is contained in:
@ -32,6 +32,7 @@ set( PYTHON_FILES
|
||||
jungfrau.py
|
||||
mythen3.py
|
||||
registers.py
|
||||
lookup.py
|
||||
utils.py
|
||||
|
||||
)
|
||||
|
@ -5,11 +5,11 @@ sys.path.append(os.path.join(os.getcwd(), 'bin'))
|
||||
|
||||
from sls_detector import Detector, Mythen3, Eiger, Jungfrau, DetectorDacs, Dac, Ctb
|
||||
from sls_detector import dacIndex, readoutMode
|
||||
|
||||
from sls_detector.lookup import view, find
|
||||
|
||||
d = Detector()
|
||||
# e = Eiger()
|
||||
# c = Ctb()
|
||||
c = Ctb()
|
||||
# j = Jungfrau()
|
||||
m = Mythen3()
|
||||
# m = Mythen3()
|
||||
|
||||
|
@ -13,21 +13,6 @@ import datetime as dt
|
||||
from functools import wraps
|
||||
from collections import namedtuple
|
||||
|
||||
# class Register:
|
||||
# """
|
||||
# Helper class to read and write to registers using a
|
||||
# more Pythonic syntax
|
||||
# """
|
||||
# def __init__(self, detector):
|
||||
# self._detector = detector
|
||||
|
||||
# def __getitem__(self, key):
|
||||
# return self._detector.readRegister(key)
|
||||
|
||||
# def __setitem__(self, key, value):
|
||||
# self._detector.writeRegister(key, value)
|
||||
|
||||
|
||||
def freeze(cls):
|
||||
cls._frozen = False
|
||||
|
||||
|
@ -2,10 +2,13 @@
|
||||
Utility functions that are useful for testing and troubleshooting
|
||||
but not directly used in controlling the detector
|
||||
"""
|
||||
|
||||
|
||||
from collections import namedtuple
|
||||
import _sls_detector #C++ lib
|
||||
import functools
|
||||
|
||||
|
||||
Geometry = namedtuple('Geometry', ['x', 'y'])
|
||||
|
||||
def get_set_bits(mask):
|
||||
@ -65,3 +68,4 @@ def eiger_register_to_time(register):
|
||||
clocks = register >> 3
|
||||
exponent = register & 0b111
|
||||
return clocks*10**exponent / 100e6
|
||||
|
||||
|
Reference in New Issue
Block a user