Skip to content
Snippets Groups Projects
Commit 964ab66b authored by Stefano Di Frischia's avatar Stefano Di Frischia Committed by Corné Lukken
Browse files

L2SS-572: improve assert statements

parent b04976d5
No related branches found
No related tags found
1 merge request!396Resolve L2SS-572 "Refactor delays"
...@@ -15,7 +15,7 @@ class Delays: ...@@ -15,7 +15,7 @@ class Delays:
frame_location = measure.position("ITRF", *[f"{x}m" for x in itrf]) frame_location = measure.position("ITRF", *[f"{x}m" for x in itrf])
result = measure.do_frame(frame_location) result = measure.do_frame(frame_location)
assert result == True assert result == True , f"measure.do_frame failed for ITRF location {itrf}"
self.reference_itrf = itrf self.reference_itrf = itrf
self.measure = measure self.measure = measure
...@@ -23,10 +23,11 @@ class Delays: ...@@ -23,10 +23,11 @@ class Delays:
def set_measure_time(self, utc_time: datetime.datetime): def set_measure_time(self, utc_time: datetime.datetime):
""" Configure the measure object for the specified time. """ """ Configure the measure object for the specified time. """
frame_time = self.measure.epoch("UTC", utc_time.isoformat(' ')) utc_time_str = utc_time.isoformat(' ')
frame_time = self.measure.epoch("UTC", utc_time_str)
result = self.measure.do_frame(frame_time) result = self.measure.do_frame(frame_time)
assert result == True assert result == True , f"measure.do_frame failed for UTC time {utc_time_str}"
def get_direction_vector(self, pointing: numpy.ndarray) -> numpy.ndarray: def get_direction_vector(self, pointing: numpy.ndarray) -> numpy.ndarray:
""" Compute direction vector for a given pointing, relative to the measure. """ """ Compute direction vector for a given pointing, relative to the measure. """
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment