Skip to content

Commit

Permalink
Fix 2d smoothing to work with masked profiles
Browse files Browse the repository at this point in the history
  • Loading branch information
tukiains committed Feb 25, 2024
1 parent 8d959c8 commit 1a337a1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cloudnetpy/plotting/plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,9 @@ def _plot_mesh_data(self, figure_data: FigureData) -> None:
sigma_units = calc_sigma_units(
figure_data.time, alt * 1e3, sigma_minutes=duration, sigma_metres=0
)
self._data = uniform_filter(self._data, sigma_units)
valid_time_ind = ~np.all(self._data.mask, axis=1)
smoothed_data = uniform_filter(self._data[valid_time_ind, :], sigma_units)
self._data[valid_time_ind, :] = smoothed_data

image = self._ax.pcolorfast(
figure_data.time_including_gaps,
Expand Down

0 comments on commit 1a337a1

Please sign in to comment.