Skip to content

Commit

Permalink
Use flags in moving average plot only with MWRpy products
Browse files Browse the repository at this point in the history
  • Loading branch information
tukiains committed Sep 27, 2024
1 parent 55dd1a9 commit b056f81
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion cloudnetpy/plotting/plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -702,7 +702,15 @@ def _plot_moving_average(
) -> None:
time = figure_data.time.copy()
data = self._data_orig.copy()
flags = self._read_flagged_data(figure_data)

if figure_data.is_mwrpy_product() or self.sub_plot.variable.name in (
"tb",
"irt",
):
flags = self._read_flagged_data(figure_data)
else:
flags = np.array([])

if hacky_freq_ind is not None and np.any(flags):
flags = flags[:, hacky_freq_ind]
is_invalid = ma.getmaskarray(data)
Expand Down

0 comments on commit b056f81

Please sign in to comment.