From 65c962ed10e65be69d280b9f262fa34fc9c86ac5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Tcho=C5=84?= Date: Mon, 10 Feb 2025 12:04:15 +0100 Subject: [PATCH] Minor bugfixes, revert unwanted accidental changes --- src/instamatic/microscope/client.py | 4 ++-- src/instamatic/microscope/interface/jeol_microscope.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/instamatic/microscope/client.py b/src/instamatic/microscope/client.py index 1d729b71..1d34d27c 100644 --- a/src/instamatic/microscope/client.py +++ b/src/instamatic/microscope/client.py @@ -7,7 +7,7 @@ import threading import time from functools import wraps -from typing import Any, Callable +from typing import Any, Callable, Dict from instamatic import config from instamatic.exceptions import TEMCommunicationError, exception_list @@ -92,7 +92,7 @@ def wrapper(*args, **kwargs): return wrapper - def _eval_dct(self, dct: dict[str, Any]) -> Any: + def _eval_dct(self, dct: Dict[str, Any]) -> Any: """Takes approximately 0.2-0.3 ms per call if HOST=='localhost'.""" self.s.send(dumper(dct)) diff --git a/src/instamatic/microscope/interface/jeol_microscope.py b/src/instamatic/microscope/interface/jeol_microscope.py index 9305998f..b2e56794 100644 --- a/src/instamatic/microscope/interface/jeol_microscope.py +++ b/src/instamatic/microscope/interface/jeol_microscope.py @@ -367,9 +367,9 @@ def setStagePosition( if z is not None and abs(nz - z) > 500: logger.warning(f'stage.z -> requested: {z}, got: {nz}') if a is not None and abs(na - a) > 0.057: - logger.warning(f'stage.a -> requested: {a}, got: {na}') + logger.warning(f'stage.a -> requested: {a:.1f}, got: {na:.1f}') if b is not None and abs(nb - b) > 0.057: - logger.warning(f'stage.b -> requested: {b}, got: {nb}') + logger.warning(f'stage.b -> requested: {b:.1f}, got: {nb:.1f}') def is_goniotool_available(self): """Return goniotool status."""