def manualCentringDone(self, manual_centring_procedure): try: motor_pos = manual_centring_procedure.get() if isinstance(motor_pos, gevent.GreenletExit): raise motor_pos except: logging.exception("Could not complete manual centring") self.emitCentringFailed() else: self.emitProgressMessage("Moving sample to centred position...") self.emitCentringMoving() try: sample_centring.end() except: logging.exception("Could not move to centred position") self.emitCentringFailed() #logging.info("EMITTING CENTRING SUCCESSFUL") self.centredTime = time.time() self.emitCentringSuccessful() self.emitProgressMessage("")
def manualCentringDone(self, manual_centring_procedure): try: motor_pos = manual_centring_procedure.get() if isinstance(motor_pos, gevent.GreenletExit): raise motor_pos except: logging.exception("Could not complete manual centring") self.emitCentringFailed() else: self.emitProgressMessage("Moving sample to centred position...") self.emitCentringMoving() try: sample_centring.end() except: import traceback logging.exception("Could not move to centred position") logging.debug( traceback.format_exc() ) self.emitCentringFailed() self.centredTime = time.time() self.emitProgressMessage(" - moved to centred position finished") self.emitCentringSuccessful() self.emitProgressMessage("")
def manualCentringDone(self, manual_centring_procedure): try: motor_pos = manual_centring_procedure.get() if isinstance(motor_pos, gevent.GreenletExit): raise motor_pos except: logging.exception("Could not complete manual centring") self.emitCentringFailed() else: self.emitProgressMessage("Moving sample to centred position...") self.emitCentringMoving() try: sample_centring.end() except: import traceback logging.exception("Could not move to centred position") logging.debug(traceback.format_exc()) self.emitCentringFailed() self.centredTime = time.time() self.emitProgressMessage( " - moved to centred position finished") self.emitCentringSuccessful() self.emitProgressMessage("")