From 8819458d1c7942d8659a03e098fb1c3d696e004f Mon Sep 17 00:00:00 2001 From: "jade_ducharme@brown.edu" Date: Fri, 10 Jan 2025 13:10:39 -0500 Subject: [PATCH] Removed unproject_near_field function since unproject_phase automatically unprojects the near field corrections. --- src/pyuvdata/utils/phasing.py | 4 +++- src/pyuvdata/uvdata/uvdata.py | 27 +-------------------------- 2 files changed, 4 insertions(+), 27 deletions(-) diff --git a/src/pyuvdata/utils/phasing.py b/src/pyuvdata/utils/phasing.py index 5fd182d99..ca4a7b344 100644 --- a/src/pyuvdata/utils/phasing.py +++ b/src/pyuvdata/utils/phasing.py @@ -2652,7 +2652,9 @@ def _get_delay(uvd, focus_x, focus_y, focus_z, flipconj): ind1, ind2 = _nants_to_nblts(uvd) # Antenna positions in ENU frame - antpos = uvd.telescope.get_enu_antpos() + antpos = uvd.telescope.get_enu_antpos() - np.median( + uvd.telescope.get_enu_antpos(), axis=0 + ) # Get tile positions for each baseline tile1 = antpos[ind1] # Shape (Nblts, 3) diff --git a/src/pyuvdata/uvdata/uvdata.py b/src/pyuvdata/uvdata/uvdata.py index 238995baf..670b78bf3 100644 --- a/src/pyuvdata/uvdata/uvdata.py +++ b/src/pyuvdata/uvdata/uvdata.py @@ -4354,24 +4354,6 @@ def _apply_w_proj(self, *, new_w_vals, old_w_vals, select_mask=None): (-1j * 2 * np.pi) * delta_w_lambda[:, :, None] ) - def unproject_near_field(self, flipconj=False): - """ - Undo near-field phasing. - - TODO: How to implement this/Is it needed? - - Parameters - ---------- - flipconj : bool - Is the conjugation scheme "flipped" compared to - what pyuvdata expects? (Default False) - - Returns - ------- - None (performs operations inplace) - """ - pass - def unproject_phase( self, *, use_ant_pos=True, select_mask=None, cat_name="unprojected" ): @@ -4396,9 +4378,6 @@ def unproject_phase( ValueError If the object is alread unprojected. """ - # Start by undoing the near-field phasing - # self.unproject_near_field() - # select_mask_use is length Nblts, True means should be unprojected # only select blts that are actually phased. if select_mask is not None: @@ -4813,10 +4792,6 @@ def phase( If the `cat_name` is None. """ - # key = list(self.phase_center_catalog.keys())[-1] - # if self.phase_center_catalog[key]["cat_name"] != "": - # self.unproject_near_field() - if cat_type != "unprojected": if lon is None: if ra is None: @@ -4841,7 +4816,7 @@ def phase( dist_qt = copy.deepcopy(dist) else: if cat_type == "near_field": - dist_qt = dist * units.meters + dist_qt = dist * units.m else: dist_qt = dist * units.parsec