@@ -163,7 +163,24 @@ def uvw_at_local_hour_angle(self, local_hour_angle, dec):
163163 rotation = xyz_to_uvw_rotation_matrix (local_hour_angle , dec )
164164 return np .dot (rotation , self .baseline_local_xyz .T ).T
165165
166- def uvw_tracking_skycoord (self , pointing_centre , obs_times ):
166+ def _uvw_tracking_skycoord_by_lha (self , pointing_centre , obs_times ):
167+ """
168+ Calculate the UVW-array towards pointing centre for each obs_time.
169+
170+ Each obs_time corresponds to a local hour-angle (LHA) for the given
171+ pointing centre. This function returns an OrderedDict mapping those
172+ LHA's (in same ordering as obs_times) to an ndarray of uvw-coords
173+ corresponding to that instantaneous observation.
174+
175+ Args:
176+ pointing_centre (astropy.coords.SkyCoord): Pointing centre co-ords
177+ for UVW calculation.
178+ obs_times (list): List of :class:`astropy.time.Time`, the instants
179+ of observation.
180+ Returns:
181+ dict: Mapping from LHA (astropy.coords.Longitude)-> UVW-ndarray,
182+ where UVW has (implicit) units of metres.
183+ """
167184 lha_uvw_map = OrderedDict ()
168185 for time in obs_times :
169186 lha = self .lha (pointing_centre .ra , time )
@@ -172,6 +189,27 @@ def uvw_tracking_skycoord(self, pointing_centre, obs_times):
172189 )
173190 return lha_uvw_map
174191
192+ def uvw_tracking_skycoord (self , pointing_centre , obs_times ):
193+ """
194+ Calculate the UVW-array towards pointing centre for all obs_times.
195+
196+ This function calculates an ndarray of uvw-coords corresponding to
197+ an instantaneous observation at each of ``obs_times``, then
198+ concatenates the results to produce an ndarray of length
199+ ``n_baselines * len(obs_times)``
200+
201+ Args:
202+ pointing_centre (astropy.coords.SkyCoord): Pointing centre co-ords
203+ for UVW calculation.
204+ obs_times (list): List of :class:`astropy.time.Time`, the instants
205+ of observation.
206+ Returns:
207+ numpy.ndarray: UVW-ndarray, where UVW has (implicit) units of metres.
208+ """
209+ lha_uvw_map = self ._uvw_tracking_skycoord_by_lha (
210+ pointing_centre , obs_times )
211+ return np .concatenate (lha_uvw_map .values ())
212+
175213
176214def generate_baselines_and_labels (antenna_positions , antenna_labels ):
177215 """
0 commit comments