From 98147577d45273def77380a17e5e7bbe5d1f93fc Mon Sep 17 00:00:00 2001 From: Wilfred Tyler Gee Date: Fri, 17 Nov 2023 12:04:28 -1000 Subject: [PATCH] Minor mount clean and small develop fix. (#1210) --- src/panoptes/pocs/mount/ioptron/cem40.py | 1 + src/panoptes/pocs/mount/ioptron/ieq30pro.py | 5 ----- src/panoptes/pocs/mount/mount.py | 12 ++++++------ src/panoptes/pocs/utils/cli/image.py | 2 +- src/panoptes/pocs/utils/cloud.py | 1 + 5 files changed, 9 insertions(+), 12 deletions(-) diff --git a/src/panoptes/pocs/mount/ioptron/cem40.py b/src/panoptes/pocs/mount/ioptron/cem40.py index 9a8900702..38eb4e8a9 100644 --- a/src/panoptes/pocs/mount/ioptron/cem40.py +++ b/src/panoptes/pocs/mount/ioptron/cem40.py @@ -25,6 +25,7 @@ def search_for_home(self): def set_target_coordinates(self, *args, **kwargs): """After setting target coordinates, check number of positions. + The CEM40 can determine if there are 0, 1, or 2 possible positions for the given RA/Dec, with the latter being the case for the meridian flip. diff --git a/src/panoptes/pocs/mount/ioptron/ieq30pro.py b/src/panoptes/pocs/mount/ioptron/ieq30pro.py index b8a26e9a0..3214e49e0 100644 --- a/src/panoptes/pocs/mount/ioptron/ieq30pro.py +++ b/src/panoptes/pocs/mount/ioptron/ieq30pro.py @@ -7,8 +7,3 @@ def __init__(self, location, mount_version='0030', *args, **kwargs): self._mount_version = mount_version super(Mount, self).__init__(location, *args, **kwargs) self.logger.success('iOptron iEQ30Pro Mount created') - - def search_for_home(self): - """Search for the home position not supported.""" - self.logger.warning('Searching for home position not supported iEQ30Pro.' - 'Please set the home position manually via the hand-controller.') diff --git a/src/panoptes/pocs/mount/mount.py b/src/panoptes/pocs/mount/mount.py index 1b83c25b0..46d855cd1 100644 --- a/src/panoptes/pocs/mount/mount.py +++ b/src/panoptes/pocs/mount/mount.py @@ -118,7 +118,7 @@ def update_status(self): def status(self): status = {} try: - status['tracking_rate'] = f'{self.tracking_rate:0.04f}' + status['tracking_rate'] = self.tracking_rate status['ra_guide_rate'] = self.ra_guide_rate status['dec_guide_rate'] = self.dec_guide_rate status['movement_speed'] = self.movement_speed @@ -783,6 +783,11 @@ def _setup_commands(self, commands): self.logger.debug('Mount commands set up') + def search_for_home(self): + """Search for the home position not supported.""" + self.logger.warning('Searching for home position not supported.' + 'Please set the home position manually via the hand-controller.') + @abstractmethod def write(self, cmd): raise NotImplementedError @@ -791,11 +796,6 @@ def write(self, cmd): def read(self, *args, **kwargs): raise NotImplementedError - @abstractmethod - def search_for_home(self): - """Search for the home position if supported. """ - raise NotImplementedError - @abstractmethod def set_tracking_rate(self, direction='ra', delta=1.0): """Sets the tracking rate for the mount """ diff --git a/src/panoptes/pocs/utils/cli/image.py b/src/panoptes/pocs/utils/cli/image.py index b957c49aa..4beacc8ff 100644 --- a/src/panoptes/pocs/utils/cli/image.py +++ b/src/panoptes/pocs/utils/cli/image.py @@ -5,7 +5,7 @@ from google.cloud import storage from rich import print -from panoptes.pocs.utils.image import upload_image +from panoptes.pocs.utils.cloud import upload_image app = typer.Typer() upload_app = typer.Typer() diff --git a/src/panoptes/pocs/utils/cloud.py b/src/panoptes/pocs/utils/cloud.py index 51063430e..646c7a5a8 100644 --- a/src/panoptes/pocs/utils/cloud.py +++ b/src/panoptes/pocs/utils/cloud.py @@ -1,5 +1,6 @@ from pathlib import Path from google.cloud import storage + from panoptes.pocs.utils.logger import get_logger logger = get_logger()