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

L2SS-572: complete annotations

parent f9db4011
Branches
Tags
1 merge request!396Resolve L2SS-572 "Refactor delays"
...@@ -2,7 +2,7 @@ import casacore.measures ...@@ -2,7 +2,7 @@ import casacore.measures
import numpy import numpy
import datetime import datetime
def subtract(a, b): def subtract(a, b) -> numpy.ndarray:
return numpy.array([x - y for x, y in zip(a, b)]) return numpy.array([x - y for x, y in zip(a, b)])
...@@ -54,7 +54,8 @@ class Delays: ...@@ -54,7 +54,8 @@ class Delays:
# Return array [directions][angles] # Return array [directions][angles]
return direction_vectors.T return direction_vectors.T
def is_valid_direction(self, direction): def is_valid_direction(self, direction) -> bool:
""" Check validity of the direction measure """
try: try:
_ = self.measure.direction(*direction) _ = self.measure.direction(*direction)
except (RuntimeError, TypeError) as e: except (RuntimeError, TypeError) as e:
...@@ -62,7 +63,7 @@ class Delays: ...@@ -62,7 +63,7 @@ class Delays:
return True return True
def delays(self, direction, antenna_absolute_itrf: list([float])): def delays(self, direction, antenna_absolute_itrf: list([float])) -> numpy.ndarray:
""" Get the delays for a direction and *absolute* antenna positions. """ Get the delays for a direction and *absolute* antenna positions.
Returns delays[antenna]. """ Returns delays[antenna]. """
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment