From 7c6fd4e4b9f2a9e8b4944167487966649973806a Mon Sep 17 00:00:00 2001 From: "jade_ducharme@brown.edu" Date: Tue, 24 Sep 2024 16:18:56 -0400 Subject: [PATCH] Now correctly references the Telescope object --- src/pyuvdata/utils/phasing.py | 7 +++---- src/pyuvdata/utils/tools.py | 5 ++--- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/pyuvdata/utils/phasing.py b/src/pyuvdata/utils/phasing.py index a9fbb5866..f021045bd 100644 --- a/src/pyuvdata/utils/phasing.py +++ b/src/pyuvdata/utils/phasing.py @@ -2594,7 +2594,8 @@ def _get_focus_xyz(uvd, focus, ra, dec): obj = SkyCoord(ra * units.deg, dec * units.deg) # The centre of the ENU frame should be located at the MEDIAN position of the array - antpos = uvd.antenna_positions + uvd.telescope_location + loc = uvd.telescope.location.itrs.cartesian.xyz.value + antpos = uvd.telescope.antenna_positions + loc x, y, z = np.median(antpos, axis=0) # Initialize EarthLocation object centred on MWA @@ -2639,9 +2640,7 @@ def _get_delay(uvd, focus_x, focus_y, focus_z, flipconj): ind1, ind2 = _nants_to_nblts(uvd) # Antenna positions in ENU frame - antpos, ants = uvd.get_ENU_antpos( - center=True - ) # Centred on the MEDIAN of the array; antpos has shape (Nants, 3) + antpos = uvd.telescope.get_enu_antpos() # Get tile positions for each baseline tile1 = antpos[ind1] # Shape (Nblts, 3) diff --git a/src/pyuvdata/utils/tools.py b/src/pyuvdata/utils/tools.py index 481bb9501..aebffb1c3 100644 --- a/src/pyuvdata/utils/tools.py +++ b/src/pyuvdata/utils/tools.py @@ -384,7 +384,7 @@ def _nants_to_nblts(uvd): index pairs to compose (Nblts,) shaped arrays for each baseline from an (Nants,) shaped array """ - antpos, ants = uvd.get_ENU_antpos() + ants = uvd.telescope.antenna_numbers ant1 = uvd.ant_1_array ant2 = uvd.ant_2_array @@ -442,8 +442,7 @@ def _get_autocorrelations_mask(uvd): """ # Get indices along the Nblts axis corresponding to autocorrelations autos = [] - for i in uvd.antenna_numbers: - + for i in uvd.telescope.antenna_numbers: num = uvd.antpair2ind(i, ant2=i) if isinstance(num, slice):