DAQ: added logging in sample and removed a check that was surpresssing errors and leading to incorrect information. This section needs to be checked
This commit is contained in:
@@ -347,15 +347,17 @@ class AareDAQ:
|
||||
self.__mount(target)
|
||||
if target is not None and target.db_id is not None:
|
||||
#self.__aare.sample_mounted(self.__cfg.current_sample)
|
||||
logger.info(f"post_mount_{target.db_id}_{self.__devs.zoom}")
|
||||
self.save_screenshot_db(target.db_id , f"post_mount_{target.db_id }_{self.__devs.zoom}")
|
||||
except Exception as e:
|
||||
self.__cfg.state_busy = False
|
||||
# If unmount succeeded, but mount failed
|
||||
mounted_sample = self.__devs.tell.get_mounted_sample()
|
||||
if target is not None:
|
||||
print(f"TELL: Error mounting, TELL believes current sample is {mounted_sample}, while expected {target.location}")
|
||||
#TODO check the following error logic
|
||||
# if target is not None:
|
||||
# print(f"TELL: Error mounting, TELL believes current sample is {mounted_sample}, while expected {target.location}")
|
||||
if mounted_sample is None:
|
||||
print("TELL: After mounting there is no sample on gonio according to TELL")
|
||||
logger.error("TELL: After mounting there is no sample on gonio according to TELL")
|
||||
self.__cfg.current_sample = None
|
||||
if target is not None:
|
||||
raise e
|
||||
@@ -363,7 +365,7 @@ class AareDAQ:
|
||||
and mounted_sample.puck.pos == target.location.pos
|
||||
and mounted_sample.puck.segment == target.location.segment
|
||||
and mounted_sample.pin == target.pin):
|
||||
print("TELL: Actually mounting was correct according to TELL, so setting current sample to target")
|
||||
logger.info("TELL: Actually mounting was correct according to TELL, so setting current sample to target")
|
||||
self.__cfg.current_sample = target
|
||||
else:
|
||||
raise e
|
||||
|
||||
Reference in New Issue
Block a user