forked from mxcube/HardwareObjects
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDetectorMockup.py
39 lines (32 loc) · 1002 Bytes
/
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
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
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