From 449d174ecffa97992fc27cb4d67fe16609b9cfb4 Mon Sep 17 00:00:00 2001 From: jkuensem <jkuensem@physik.uni-bielefeld.de> Date: Wed, 25 Nov 2020 16:30:39 +0100 Subject: [PATCH] TMSS-259: process review comments --- SAS/TMSS/src/tmss/tmssapp/conversions.py | 2 +- SAS/TMSS/src/tmss/tmssapp/views.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/SAS/TMSS/src/tmss/tmssapp/conversions.py b/SAS/TMSS/src/tmss/tmssapp/conversions.py index e3ece4884ed..af5d004637c 100644 --- a/SAS/TMSS/src/tmss/tmssapp/conversions.py +++ b/SAS/TMSS/src/tmss/tmssapp/conversions.py @@ -25,7 +25,7 @@ def create_astroplan_observer_for_station(station: str) -> Observer: # default angle to the horizon at which the sunset/sunrise starts and ends, as per LOFAR definition. SUN_SET_RISE_ANGLE_TO_HORIZON = Angle(10, unit=astropy.units.deg) -SUN_SET_RISE_PRECISION = 15 # n_grid_points; higher is more precise but very costly; astropy defaults to 150, 15 seems to cause errors of typically one minute +SUN_SET_RISE_PRECISION = 30 # n_grid_points; higher is more precise but very costly; astropy defaults to 150, errors now can be in the minutes, increase if this is not good enough @lru_cache(maxsize=256, typed=False) # does not like lists, so use tuples to allow caching def timestamps_and_stations_to_sun_rise_and_set(timestamps: tuple, stations: tuple, angle_to_horizon: Angle=SUN_SET_RISE_ANGLE_TO_HORIZON) -> dict: diff --git a/SAS/TMSS/src/tmss/tmssapp/views.py b/SAS/TMSS/src/tmss/tmssapp/views.py index 98a6b67f9b8..3c927861dc1 100644 --- a/SAS/TMSS/src/tmss/tmssapp/views.py +++ b/SAS/TMSS/src/tmss/tmssapp/views.py @@ -199,7 +199,7 @@ def get_angular_separation_from_bodies(request): bodies = tuple(request.GET.get('bodies', "sun,moon,jupiter").split(',')) if angle1 is None or angle2 is None: - raise ValueError("Please provide celestial coordinates in radians/J2000 via the 'angle1', 'angle2' and 'direction_type' properties.") + raise ValueError("Please provide celestial coordinates via 'angle1', 'angle2' (and optionally 'direction_type') properties.") if timestamps is None: timestamps = (datetime.utcnow(),) -- GitLab