Skip to content

Commit

Permalink
ENH: update unit tests to reflect antenna_transition allocation in sa…
Browse files Browse the repository at this point in the history
…mple_objects
  • Loading branch information
isilber committed Dec 6, 2023
1 parent 83e2e16 commit f4592b9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/core/test_radar.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ def test_get_gate_x_y_z_transitions():
radar.azimuth["data"][:] = [0, 90, 180, 270, 0, 90, 180, 270]
radar.elevation["data"][:] = [0, 0, 0, 0, 10, 10, 10, 10]
radar.range["data"][:] = [5, 15, 25, 35, 45]
radar.antenna_transition = {"data": np.array([0, 0, 1, 0, 0, 0, 0, 0])}
radar.antenna_transition["data"][:] = [0, 0, 1, 0, 0, 0, 0, 0]

gate_x, gate_y, gate_z = radar.get_gate_x_y_z(0, filter_transitions=True)
assert gate_x.shape == (3, 5)
Expand Down Expand Up @@ -213,7 +213,7 @@ def test_get_gate_lat_lon_alt():

def test_get_gate_lat_lon_alt_transitions():
radar = pyart.testing.make_empty_ppi_radar(5, 4, 2)
radar.antenna_transition = {"data": np.array([0, 0, 1, 0, 0, 0, 0, 0])}
radar.antenna_transition["data"][:] = [0, 0, 1, 0, 0, 0, 0, 0]
lat, lon, alt = radar.get_gate_lat_lon_alt(0, filter_transitions=True)
assert lat.shape == (3, 5)
assert_allclose(lat[0], [36.5, 36.502243, 36.50449, 36.506744, 36.50899], atol=1e-3)
Expand Down Expand Up @@ -401,7 +401,7 @@ def test_extract_sweeps():
assert eradar.azimuth["data"].shape == (720,)
assert eradar.elevation["data"].shape == (720,)
assert eradar.scan_rate is None
assert eradar.antenna_transition is None
assert eradar.antenna_transition["data"].shape == (720,)

assert eradar.instrument_parameters is None
assert eradar.radar_calibration is None
Expand Down

0 comments on commit f4592b9

Please sign in to comment.