Script execution

This commit is contained in:
gac-x04sa
2018-10-30 11:15:44 +01:00
parent 3a933a0bc1
commit fee50874aa
+15
View File
@@ -37,7 +37,22 @@ class Pixel(DeviceBase, Readable, Readable.IntegerType):
self.PIX_EXP_START_TIME = 0
self._update_header_length()
self.show()
if not self.is_connected():
print "The Pixel detector is not connected to Epics/Spec."
print "Please disconnect in tvx and connect via the CCD/Pixel Epics widget."
else :
if self.get_error_code("X04SA-ES3-CCD:ERRCODE") != 0:
print "The pixel detector returned an error. It may not be properly"
print "connected. Please disconnect in tvx and disconnect and"
print "re-connect with the CCD/Pixel Epics widget."
def is_connected(self):
return caget(self.prefix + ":STAT1", 's') == "Connected"
def get_error_code(self):
return caget(self.prefix + ":ERRCODE", 'i')
def _update_header_length(self):
format = self.get_image_format()