Commit 7df4876f authored by lukas leufen's avatar lukas leufen 👻
Browse files

Merge branch 'develop' into 'lukas_issue396_feat_toardb-v2'


See merge request !442
parents afd91421 84c278a2
Pipeline #105078 failed with stages
in 15 minutes and 51 seconds
......@@ -214,6 +214,7 @@ class ClimateFIRFilter(FIRFilter):
h = []
if self.sel_opts is not None:
self.sel_opts = self.sel_opts if isinstance(self.sel_opts, dict) else {self.time_dim: self.sel_opts}
sampling = {1: "1d", 24: "1H"}.get(int(self.fs))
logging.debug(f"{self.display_name}: create diurnal_anomalies")
if self.apriori_diurnal is True and sampling == "1H":
......@@ -303,6 +304,10 @@ class ClimateFIRFilter(FIRFilter):
except Exception as e:"Could not plot climate fir filter due to following reason:\n{e}")
def _check_sel_opts(self):
if len(**self.sel_opts).coords[self.time_dim]) == 0:
raise ValueError(f"Abort {self.__class__.__name__} as no data is available after applying sel_opts to data")
def _next_order(order: list, minimum_length: Union[int, None], pos: int, window: Union[str, tuple]) -> int:
next_order = 0
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment