diff --git a/tangostationcontrol/tangostationcontrol/beam/delays.py b/tangostationcontrol/tangostationcontrol/beam/delays.py index 10a6023ed814f2ee8637d0769d349112d2400241..b1d7f9976ec5de3e75784dac484c9c33584f2806 100644 --- a/tangostationcontrol/tangostationcontrol/beam/delays.py +++ b/tangostationcontrol/tangostationcontrol/beam/delays.py @@ -81,13 +81,14 @@ class delay_calculator: direction_vectors = self.get_direction_vector_bulk(pointings) - # compute the corresponding delays - def get_delay(relative_itrf): + # compute the corresponding delays for all directions + def get_delay_all_directions(relative_itrf): # Dot product between relative position and angle vector determines # distance. Divide by speed of light to obtain delay. return numpy.inner(relative_itrf, direction_vectors) / 299792458.0 - delays = numpy.apply_along_axis(get_delay, 1, antenna_relative_itrfs) + # apply for each position + delays = numpy.apply_along_axis(get_delay_all_directions, 1, antenna_relative_itrfs) return delays