def getStagePosition(self): try: beta = nidaq.getBeta() self.stage_position.update({'b':beta}) except: pass return copy.copy(self.stage_position)
def getStagePosition(self): value = {'x':None,'y':None,'z':None,'a':None,'b':None} try: value['x'] = float(self.tecnai.Stage.Position.X) value['y'] = float(self.tecnai.Stage.Position.Y) value['z'] = float(self.tecnai.Stage.Position.Z) except: pass try: value['a'] = float(self.tecnai.Stage.Position.A) except: pass if use_nidaq: value['b'] = nidaq.getBeta() * 3.14159 / 180.0 else: try: value['b'] = float(self.tecnai.Stage.Position.B) except: pass return value