Skip to content

Commit

Permalink
fixes to make tests pass
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfidan committed Aug 28, 2024
1 parent fb22cea commit de64fba
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 11 deletions.
6 changes: 5 additions & 1 deletion pyart/correct/phase_proc.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,11 @@ def fzl_index(fzl, ranges, elevation, radar_height):
p_r = 4.0 * Re / 3.0
z = (
radar_height
+ (ranges**2 + p_r**2 + 2.0 * ranges * p_r * np.sin(elevation * np.pi / 180.0))
+ (
ranges**2
+ p_r**2
+ 2.0 * ranges * p_r * np.sin(elevation * np.pi / 180.0)
)
** 0.5
- p_r
)
Expand Down
2 changes: 1 addition & 1 deletion pyart/retrieve/qvp.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
_update_qvp_metadata
_update_along_coord_metadata
""" "" ""
""" "" "" "" "" "" "" "" ""

from copy import deepcopy
from warnings import warn
Expand Down
18 changes: 9 additions & 9 deletions pyart/util/radar_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -414,17 +414,17 @@ def subset_radar(

if radar_aux.instrument_parameters is not None:
if "nyquist_velocity" in radar_aux.instrument_parameters:
radar_aux.instrument_parameters["nyquist_velocity"]["data"] = (
radar_aux.instrument_parameters["nyquist_velocity"]["data"][ind_rays]
)
radar_aux.instrument_parameters["nyquist_velocity"][
"data"
] = radar_aux.instrument_parameters["nyquist_velocity"]["data"][ind_rays]
if "pulse_width" in radar_aux.instrument_parameters:
radar_aux.instrument_parameters["pulse_width"]["data"] = (
radar_aux.instrument_parameters["pulse_width"]["data"][ind_rays]
)
radar_aux.instrument_parameters["pulse_width"][
"data"
] = radar_aux.instrument_parameters["pulse_width"]["data"][ind_rays]
if "number_of_pulses" in radar_aux.instrument_parameters:
radar_aux.instrument_parameters["number_of_pulses"]["data"] = (
radar_aux.instrument_parameters["number_of_pulses"]["data"][ind_rays]
)
radar_aux.instrument_parameters["number_of_pulses"][
"data"
] = radar_aux.instrument_parameters["number_of_pulses"]["data"][ind_rays]

# Get new fields
if field_names is None:
Expand Down

0 comments on commit de64fba

Please sign in to comment.