diff --git a/mlair/helpers/filter.py b/mlair/helpers/filter.py index 03065402c10c10cf151e05220e70ffe513b4094c..6c4247f3242d0f79e57636379bcc5d3be6e278ba 100644 --- a/mlair/helpers/filter.py +++ b/mlair/helpers/filter.py @@ -586,8 +586,8 @@ class ClimateFIRFilter(FIRFilter): new_dim).sel({time_dim: t0}) else: tmp_filter_data = None - valid_start = int(filtered.window.min()) + int((len(h) + 1) / 2) - valid_end = min(extend_length_opts + offset + 1, int(filtered.window.max()) - int((len(h) + 1) / 2)) + valid_start = int(filtered[new_dim].min()) + int((len(h) + 1) / 2) + valid_end = min(extend_length_opts + offset + 1, int(filtered[new_dim].max()) - int((len(h) + 1) / 2)) valid_range = range(valid_start, valid_end) plot_data.append({"t0": t0, "var": variable_name,