From 143c7560d98e9f180855c6549855ae05e195fdd9 Mon Sep 17 00:00:00 2001 From: Max Grover Date: Wed, 17 May 2023 10:37:43 -0500 Subject: [PATCH] FIX: Fix masking issue in VAD michelson (#1428) --- pyart/retrieve/vad.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyart/retrieve/vad.py b/pyart/retrieve/vad.py index 269d0fca1b..ec42768ce5 100644 --- a/pyart/retrieve/vad.py +++ b/pyart/retrieve/vad.py @@ -130,7 +130,7 @@ def _vad_calculation_m(velocity_field, azimuth, elevation): vals2 = np.vstack((vals, vals)) # Summing non-nan data and creating new array with summed data - count = np.sum(np.isnan(sumv) is False, 0) + count = np.sum(~np.isnan(sumv), 0) count = np.float64(count) u_m = np.array([np.nansum(sumv, 0) // (2 * count)]) @@ -184,7 +184,7 @@ def _interval_mean(data, current_z, wanted_z): for i in range(len(wanted_z)) ] mean_values = np.array( - [data[pos_lower[i] : pos_upper[i]].mean() for i in range(len(pos_upper))] + [(data[pos_lower[i] : pos_upper[i]]).mean() for i in range(len(pos_upper))] ) return mean_values