Script execution
This commit is contained in:
+12
-1
@@ -1,9 +1,19 @@
|
||||
|
||||
class MythenAcquireTime(DeviceBase, Readable):
|
||||
def __init__(self, mythen):
|
||||
DeviceBase.__init__(self, mythen.name + " acquire time")
|
||||
self.setParent(mythen)
|
||||
|
||||
def read(self):
|
||||
return self.getParent().get_acquire_time(readback=False)
|
||||
|
||||
|
||||
|
||||
class Mythen(DeviceBase, Readable):
|
||||
def __init__(self, name, prefix):
|
||||
DeviceBase.__init__(self, name)
|
||||
self.prefix = prefix
|
||||
self.acquire_time = MythenAcquireTime(self)
|
||||
|
||||
def set_acquire_time(self, value):
|
||||
caput(self.prefix + ":cam1:AcquireTime", float(value))
|
||||
@@ -59,11 +69,12 @@ class Mythen(DeviceBase, Readable):
|
||||
while (mythen.is_acquiring()):
|
||||
mythen.stop()
|
||||
time.sleep(0.25)
|
||||
|
||||
|
||||
def read(self):
|
||||
return self.get_total_counts()
|
||||
|
||||
|
||||
|
||||
add_device( Mythen("mythen", "X04SA-ES2-SD1"), True)
|
||||
#mythen.polling = 1000
|
||||
mythen.update()
|
||||
|
||||
Reference in New Issue
Block a user