diff --git a/saqc/funcs/flagtools.py b/saqc/funcs/flagtools.py index 3ec5d839cb1e8f3b7f564931b3954a103d380454..4f6e69c5144f0272f5c8eb73cd647731b06200ed 100644 --- a/saqc/funcs/flagtools.py +++ b/saqc/funcs/flagtools.py @@ -376,7 +376,11 @@ class FlagtoolsMixin: if target not in self._data: self._data[target] = pd.Series(np.nan, index=self._data[field].index) self._flags._data[target] = History(self._data[target].index) - + if not self._data[field].index.equals(self._data[target].index): + raise ValueError(f'All Field and Target indices must match!\n' + f'Indices of {field} and {target} seem to be not congruent within the context of the given\n' + f'- fields: {fields}\n ' + f'- and targets: {targets}') history = self._flags.history[field].copy(deep=True) if overwrite is False: