Skip to content

Commit

Permalink
One more attempt to boost test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
kartographer committed Sep 24, 2023
1 parent 3fbd170 commit 460b67a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions pyuvdata/tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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,
)
Expand Down
2 changes: 1 addition & 1 deletion pyuvdata/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 460b67a

Please sign in to comment.