| gap_window | [offset string](docs/ParameterDescriptions.md#offset-strings) | | The minimum size of the gap before and after a group of valid values, which makes this group considered as isolated. See condition (2) and (3) |
| group_window | [offset string](docs/ParameterDescriptions.md#offset-strings) | | The maximum size of an isolated group of valid data. See condition (1). |
The function flags arbitrary large groups of values, if they are surrounded by sufficiently
large data gaps. A gap is defined as group of missing and/or flagged values.
A continuous group of values
$`x_{k}, x_{k+1},...,x_{k+n}`$ with timestamps $`t_{k}, t_{k+1}, ..., t_{k+n}`$
is considered to be isolated, if:
1. $` t_{k+n} - t_{k} \le `$ `group_window`
2. None of the values $` x_i, ..., x_{k-1} `$, with $`t_{k-1} - t_{i} \ge `$ `gap_window` is valid or unflagged
3. None of the values $` x_{k+n+1}, ..., x_{j} `$, with $`t_{j} - t_{k+n+1} \ge `$ `gap_window` is valid or unflagged
## flagMissing
```
flagMissing(nodata=NaN)
```
| parameter | data type | default value | description |
| ref_datafield | string | |Name of the reference datafield = "pattern" |
| sample_freq | string | `"15 Min"` |Sample frequency to harmonize the data |
| method | string | `"dtw "` |"dtw" for Dynamic Time Warping (DTW), "wavelet" for Wavelet Pattern Recognition Algorithm |
| min_distance | float | `None` |For DTW - alogrithm: the minimum distance of two graphs in order to be classified as "different" |
Implementation of the pattern recognition algorithms introduced in [Pattern Recognition](https://git.ufz.de/rdm-software/saqc/-/wikis/Pattern-Recognition).
## clearFlags
```
clearFlags()
```
The funcion removes all previously set flags.
## forceFlags
```
forceFlags(flag)
```
| parameter | data type | default value | description |
| --------- | ----------- | ---- | ----------- |
| flag | float/[flagging constant](docs/ParameterDescriptions.md#flagging-constants) | GOOD | The flag that is set unconditionally |
The functions overwrites all previous set flags with the given flag.
## flagDummy
```
flagDummy()
```
Identity function, i.e. the function does nothing.