Skip to content

Commit

Permalink
Update rainbow_wrl.py
Browse files Browse the repository at this point in the history
Raise error when range resolution changes between sweeps.
  • Loading branch information
HappyXiaoAnAn authored Dec 22, 2023
1 parent bb99546 commit 87858bb
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pyart/aux_io/rainbow_wrl.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,13 @@ def read_rainbow_wrl(
sweep_end_ray_index["data"] = seri

# range
if not single_slice:
# all sweeps have to have the same range resolution
for i in range(nslices):
slice_info = rbf["volume"]["scan"]["slice"][i]
if (slice_info['rangestep'] != common_slice_info["rangestep"]):
raise ValueError("range resolution changes between sweeps")

r_res = float(common_slice_info["rangestep"]) * 1000.0
if "start_range" in common_slice_info.keys():
start_range = float(common_slice_info["start_range"]) * 1000.0
Expand Down

0 comments on commit 87858bb

Please sign in to comment.