-
Notifications
You must be signed in to change notification settings - Fork 11
/
DetectorMockup.py
43 lines (35 loc) · 1.11 KB
/
DetectorMockup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import logging
from AbstractDetector import AbstractDetector
from HardwareRepository.BaseHardwareObjects import HardwareObject
class DetectorMockup(AbstractDetector, HardwareObject):
"""
Descript. : Detector class. Contains all information about detector
the states are 'OK', and 'BAD'
the status is busy, exposing, ready, etc.
the physical property is RH for pilatus, P for rayonix
"""
def __init__(self, name):
"""
Descript. :
"""
AbstractDetector.__init__(self)
HardwareObject.__init__(self, name)
self.distance = None
self.exposure_time_limits = [0.04, 60000]
def init(self):
"""
Descript. :
"""
self.distance = 500
def get_distance(self):
return self.distance
def get_distance_limits(self):
return [100, 1000]
def has_shutterless(self):
"""Returns always True
"""
return True
def get_beam_centre(self):
return 0, 0
def get_exposure_time_limits(self):
return self.exposure_time_limits