Skip to content
Snippets Groups Projects
Commit 449d174e authored by Jörn Künsemöller's avatar Jörn Künsemöller
Browse files

TMSS-259: process review comments

parent fc2754e9
No related branches found
No related tags found
1 merge request!284Resolve TMSS-259
......@@ -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:
......
......@@ -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(),)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment