From 460b67af780a2303e56e0d5b7221dee5c6cde83d Mon Sep 17 00:00:00 2001 From: Garrett 'Karto' Keating Date: Sun, 24 Sep 2023 18:09:33 -0400 Subject: [PATCH] One more attempt to boost test coverage --- pyuvdata/tests/test_utils.py | 8 ++++---- pyuvdata/utils.py | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pyuvdata/tests/test_utils.py b/pyuvdata/tests/test_utils.py index 8696bbe2d7..27e519506c 100644 --- a/pyuvdata/tests/test_utils.py +++ b/pyuvdata/tests/test_utils.py @@ -4157,6 +4157,9 @@ def test_uvw_track_generator(flip_u, use_uvw): sma_mir.set_lsts_from_time_array() sma_mir._set_app_coords_helper() sma_mir.set_uvws_from_antenna_positions() + if not use_uvw: + # Just subselect the antennas in the dataset + sma_mir.antenna_positions = sma_mir.antenna_positions[[0, 3], :] if use_uvw: sma_copy = sma_mir.copy() @@ -4173,10 +4176,7 @@ def test_uvw_track_generator(flip_u, use_uvw): coord_epoch=cat_dict["cat_epoch"], telescope_loc=sma_mir.telescope_location_lat_lon_alt_degrees, time_array=sma_mir.time_array, - antenna_positions=sma_mir.antenna_positions, - ant_1_array=sma_mir.ant_1_array, - ant_2_array=sma_mir.ant_2_array, - antenna_numbers=sma_mir.antenna_numbers, + antenna_positions=sma_mir.antenna_positions if uvw_array is None else None, force_postive_u=flip_u, uvw_array=uvw_array, ) diff --git a/pyuvdata/utils.py b/pyuvdata/utils.py index aae1238ac2..af83f76b74 100644 --- a/pyuvdata/utils.py +++ b/pyuvdata/utils.py @@ -4148,7 +4148,7 @@ def uvw_track_generator( ant_1_array = np.tile(ant_1_array, Ntimes) ant_2_array = np.tile(ant_2_array, Ntimes) - if (len(lon_coord) != 1) or (len(lon_coord) == len(time_array)): + if len(lon_coord) == len(time_array): lon_coord = np.repeat(lon_coord, Nbase) lat_coord = np.repeat(lat_coord, Nbase)