Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENH: Default scan_rate to target_scan_rate #1003

Merged
merged 1 commit into from
Jul 26, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions pyart/aux_io/gamic_hdf5.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,20 +236,21 @@ def read_gamic(filename, field_names=None, additional_metadata=None,

# scan_rate
scan_rate = filemetadata('scan_rate')
scan_rate['data'] = target_scan_rate['data']
if scan_type == 'ppi':
azs_names = ['az_speed', 'azimuth_speed']
azs_name = azs_names[0]
for azs_name in azs_names:
if gfile.is_field_in_ray_header(azs_name):
scan_rate['data'] = gfile.ray_header(azs_name, 'float32')
break
scan_rate['data'] = gfile.ray_header(azs_name, 'float32')
elif scan_type == 'rhi':
els_names = ['el_speed', 'elevation_speed']
els_name = els_names[0]
for els_name in els_names:
if gfile.is_field_in_ray_header(els_name):
scan_rate['data'] = gfile.ray_header(els_name, 'float32')
break
scan_rate['data'] = gfile.ray_header(els_name, 'float32')
else:
scan_rate = None

Expand Down