mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-18 15:57:13 +02:00
WIP
This commit is contained in:
@ -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