Skip to content

Commit

Permalink
Fixing a number of units in the observatory status.
Browse files Browse the repository at this point in the history
  • Loading branch information
wtgee committed May 12, 2024
1 parent e39ee7e commit 80b5f07
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/panoptes/pocs/observatory.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
import os
from collections import OrderedDict
from contextlib import suppress
from datetime import datetime
from multiprocessing import Process
from pathlib import Path
from typing import Dict, Optional

import numpy as np
from astropy import units as u
from astropy.coordinates import get_body
from astropy.io.fits import setval
from panoptes.utils import error
from panoptes.utils import images as img_utils
from panoptes.utils.images import fits as fits_utils
from panoptes.utils.time import current_time, CountdownTimer, flatten_time
from panoptes.utils.utils import get_quantity_value

import panoptes.pocs.camera.fli
from panoptes.pocs.base import PanBase
Expand Down Expand Up @@ -314,17 +315,16 @@ def status(self):

try:
status['observer'] = {
'siderealtime': str(self.sidereal_time),
'siderealtime': get_quantity_value(self.sidereal_time, unit='degree'),
'utctime': now,
'localtime': datetime.now(),
'local_evening_astro_time': self._evening_astro_time,
'local_morning_astro_time': self._morning_astro_time,
'local_sun_set_time': self._local_sunset,
'local_sun_rise_time': self._local_sunrise,
'local_sun_position': self._local_sun_pos,
'local_moon_alt': self.observer.moon_altaz(now).alt,
'local_sun_position': get_quantity_value(self._local_sun_pos, unit='degree'),
'local_moon_alt': get_quantity_value(self.observer.moon_altaz(now).alt, unit='degree'),
'local_moon_illumination': self.observer.moon_illumination(now),
'local_moon_phase': self.observer.moon_phase(now),
'local_moon_phase': get_quantity_value(self.observer.moon_phase(now)) / np.pi,
}

except Exception as e: # pragma: no cover
Expand Down

0 comments on commit 80b5f07

Please sign in to comment.