Skip to content
Snippets Groups Projects
Commit 8efbb27f authored by David Schäfer's avatar David Schäfer
Browse files

Update FunctionDescriptions.md

parent 4b62b637
No related branches found
No related tags found
No related merge requests found
...@@ -66,35 +66,70 @@ clear() ...@@ -66,35 +66,70 @@ clear()
### Description ### Description
Remove all previously set flags. Remove all previously set flags.
## force ## `force`
### Signature ### Signature
``` ```
force() force()
``` ```
### Parameters
| parameter | data type | default value | description |
| --------- | ----------- | ---- | ----------- |
### Description ### Description
## sliding_outlier ## `sliding_outlier`
### Signature ### Signature
``` ```
sliding_outlier(winsz="1h", dx="1h", count=1, deg=1, z=3.5, method="modZ") sliding_outlier(winsz="1h", dx="1h", count=1, deg=1, z=3.5, method="modZ")
``` ```
### Parameters
| parameter | data type | default value | description |
| --------- | ----------- | ---- | ----------- |
| winsz | string | `"1h"` | |
| dx | string | `"1h"` | |
| count | integer | `1` | |
| deg | integer | `1"` | |
| z | float | `3.5` | |
| method | string | `"modZ"` | |
### Description ### Description
## mad ## `mad`
### Signature ### Signature
``` ```
mad(length, z=3.5, freq=None) mad(length, z=3.5, freq=None)
``` ```
### Parameters
| parameter | data type | default value | description |
| --------- | ----------- | ---- | ----------- |
| length | | | |
| z | float | `3.5` | |
| freq | | `None` | |
### Description ### Description
## Spikes_Basic ## `Spikes_Basic`
### Signature ### Signature
``` ```
Spikes_Basic(thresh, tolerance, window_size) Spikes_Basic(thresh, tolerance, window_size)
``` ```
### Parameters
| parameter | data type | default value | description |
| ------ | ------ | ------ | ---- |
| thresh | float | | Minimum jump margin for spikes. See condition (1). |
| tolerance | float | | Range of area, containing al "valid return values". See condition (2). |
| window_size | ftring | | An offset string, denoting the maximal length of "spikish" value courses. See condition (3). |
### Description ### Description
A basic outlier test, that is designed to work for harmonized, as well as raw A basic outlier test, that is designed to work for harmonized, as well as raw
(not-harmonized) data. (not-harmonized) data.
...@@ -120,19 +155,27 @@ outliers, but also plateau-ish value courses. ...@@ -120,19 +155,27 @@ outliers, but also plateau-ish value courses.
The implementation is a time-window based version of an outlier test from the The implementation is a time-window based version of an outlier test from the
UFZ Python library, that can be found [here](https://git.ufz.de/chs/python/blob/master/ufz/level1/spike.py). UFZ Python library, that can be found [here](https://git.ufz.de/chs/python/blob/master/ufz/level1/spike.py).
| parameter | data format | description |
| ------ | ------ | ------ |
| thresh | Float. | Minimum jump margin for spikes. See condition (1). |
| tolerance | Float. | Range of area, containing al "valid return values". See condition (2). |
| window_size | Offset String. | An offset string, denoting the maximal length of "spikish" value courses. See condition (3). |
## Spikes_SpektrumBased ## `Spikes_SpektrumBased`
### Signature ### Signature
``` ```
Spikes_SpektrumBased(raise_factor=0.15, dev_cont_factor=0.2, Spikes_SpektrumBased(raise_factor=0.15, dev_cont_factor=0.2,
noise_barrier=1, noise_window_size="12h", noise_statistic="CoVar", noise_barrier=1, noise_window_size="12h", noise_statistic="CoVar",
smooth_poly_order=2, filter_window_size=None) smooth_poly_order=2, filter_window_size=None)
``` ```
### Parameters
| parameter | data type | default value | description |
| ------ | ------ | ------ | ---- |
| raise_factor | float | `0.15` | Minimum change margin for a datapoint to become a candidate for a spike. See condition (1). |
| dev_cont_factor | float | `0.2` | See condition (2). |
| noise_barrier | float | `1` | Upper bound for noisyness of data surrounding potential spikes. See condition (3).|
| noise_window_range | string | `"12h"` | Range of the timewindow of the "surrounding" data of a potential spike. See condition (3). |
| noise_statistic | string | `"CoVar"` | Operator to calculate noisyness of data, surrounding potential spike. Either "Covar" (=Coefficient od Variation) or "rvar" (=relative Variance).|
| smooth_poly_order | integer | `2` | Order of the polynomial fit, applied for smoothing|
| filter_window_size | string | `None` | Range of the smoothing window. The default value (='None') results in a window range, equalling 3 times the sampling rate and thus including always 3 values in a smoothing window. |
### Description ### Description
The function detects and flags spikes in input data series by evaluating the The function detects and flags spikes in input data series by evaluating the
...@@ -166,32 +209,41 @@ Dorigo,W,.... Global Automated Quality Control of In Situ Soil Moisture ...@@ -166,32 +209,41 @@ Dorigo,W,.... Global Automated Quality Control of In Situ Soil Moisture
Data from the international Soil Moisture Network. 2013. Vadoze Zone J. Data from the international Soil Moisture Network. 2013. Vadoze Zone J.
doi:10.2136/vzj2012.0097. doi:10.2136/vzj2012.0097.
All parameters default to the values given there.
| parameter | data format | description | ## `constant`
| ------ | ------ | ------ |
| raise_factor | Float. (0.15). | Minimum change margin for a datapoint to become a candidate for a spike. See condition (1). |
| dev_cont_factor | Float. (0.2). | See condition (2). |
| noise_barrier| Float. (1). | Upper bound for noisyness of data surrounding potential spikes. See condition (3).|
| noise_window_range| Offset String. ("12h"). | Range of the timewindow of the "surrounding" data of a potential spike. See condition (3). |
| noise_statistic| String. ("CoVar"). | Operator to calculate noisyness of data, surrounding potential spike. Either "Covar" (=Coefficient od Variation) or "rvar" (=relative Variance).|
| smooth_poly_order| Integer. | Order of the polynomial fit, applied for smoothing|
| filter_window_size | Offset String. (None) | Range of the smoothing window. The default value (='None') results in a window range, equalling 3 times the sampling rate and thus including always 3 values in a smoothing window. |
## constant
### Signature ### Signature
``` ```
constant(eps, length, thmin=None) constant(eps, length, thmin=None)
``` ```
### Parameters
| parameter | data type | default value | description |
| ------ | ------ | ------ | ---- |
| eps | | | |
| length | | | |
| thmin | | `None` | |
### Description ### Description
## constants_varianceBased ## `constants_varianceBased`
### Signature ### Signature
``` ```
constants_varianceBased(plateau_window_min="12h", plateau_var_limit=0.0005, constants_varianceBased(plateau_window_min="12h", plateau_var_limit=0.0005,
var_total_nans=Inf, var_consec_nans=Inf) var_total_nans=Inf, var_consec_nans=Inf)
``` ```
### Parameters
| parameter | data type | default value | description |
| ------ | ------ | ------ | ---- |
| plateau_window_min | string | | Minimum barrier for the duration, values have to be continouos to be plateau canditaes. See condition (1). |
| plateau_var_limit | float | `0.0005` | Barrier, the variance of a group of values must not exceed to be flagged a plateau .See condition (2). |
| var_total_nans | integer | `Inf` | Maximum number of nan values allowed, for a calculated variance to be valid. |
| var_consec_nans | integer | `Inf` | Maximum number of consecutive nan values allowed, for a calculated variance to be valid. |
### Description ### Description
Function flags plateaus/series of constant values. Any set of consecutive values Function flags plateaus/series of constant values. Any set of consecutive values
$`x_k,..., x_{k+n}`$ of a timeseries $`x`$ is flagged, if: $`x_k,..., x_{k+n}`$ of a timeseries $`x`$ is flagged, if:
...@@ -200,23 +252,29 @@ $`x_k,..., x_{k+n}`$ of a timeseries $`x`$ is flagged, if: ...@@ -200,23 +252,29 @@ $`x_k,..., x_{k+n}`$ of a timeseries $`x`$ is flagged, if:
2. $`\sigma(x_k,..., x_{k+n})`$ < `plateau_var_limit` 2. $`\sigma(x_k,..., x_{k+n})`$ < `plateau_var_limit`
NOTE, that the dataseries-to-be flagged is supposed to be harmonized to an NOTE, that the dataseries-to-be flagged is supposed to be harmonized to an
equadistant frequencie grid. equadistant frequency grid.
| parameter | data format (default) | description |
| ------ | ------ | ------ |
| plateau_window_min | Offset String. | Minimum barrier for the duration, values have to be continouos to be plateau canditaes. See condition (1). |
| plateau_var_limit | Float. (0.0005). | Barrier, the variance of a group of values must not exceed to be flagged a plateau .See condition (2). |
| var_total_nans | Integer (np.inf) | Maximum number of nan values allowed, for a calculated variance to be valid. |
| var_consec_nans | Integer (np.inf) | Maximum number of consecutive nan values allowed, for a calculated variance to be valid. |
## `SoilMoistureSpikes`
## SoilMoistureSpikes
### Signature ### Signature
``` ```
SoilMoistureSpikes(filter_window_size="3h", raise_factor=0.15, dev_cont_factor=0.2, SoilMoistureSpikes(filter_window_size="3h", raise_factor=0.15, dev_cont_factor=0.2,
noise_barrier=1, noise_window_size="12h", noise_statistic="CoVar") noise_barrier=1, noise_window_size="12h", noise_statistic="CoVar")
``` ```
### Parameters
| parameter | data type | default value | description |
| ------ | ------ | ------ | ---- |
| filter_window_size | string | `"3h"` | |
| raise_factor | float | `0.15` | |
| dev_cont_factor | float | `0.2` | |
| noise_barrier | integer | `1` | |
| noise_window_size | string | `"12h"` | |
| noise_statistic | string | `"CoVar"` | |
### Description ### Description
The Function is just a wrapper around `flagSpikes_spektrumBased`, from the The Function is just a wrapper around `flagSpikes_spektrumBased`, from the
...@@ -228,7 +286,8 @@ Data from the international Soil Moisture Network. 2013. ...@@ -228,7 +286,8 @@ Data from the international Soil Moisture Network. 2013.
Vadoze Zone J. doi:10.2136/vzj2012.0097. Vadoze Zone J. doi:10.2136/vzj2012.0097.
## SoilMoistureBreaks ## `SoilMoistureBreaks`
### Signature ### Signature
``` ```
SoilMoistureBreaks(diff_method="raw", filter_window_size="3h", SoilMoistureBreaks(diff_method="raw", filter_window_size="3h",
...@@ -236,6 +295,22 @@ SoilMoistureBreaks(diff_method="raw", filter_window_size="3h", ...@@ -236,6 +295,22 @@ SoilMoistureBreaks(diff_method="raw", filter_window_size="3h",
first_der_window_size="12h", scnd_der_ratio_margin_1=0.05, first_der_window_size="12h", scnd_der_ratio_margin_1=0.05,
scnd_der_ratio_margin_2=10, smooth_poly_order=2) scnd_der_ratio_margin_2=10, smooth_poly_order=2)
``` ```
### Parameters
| parameter | data type | default value | description |
| ------ | ------ | ------ | ---- |
| diff_method | string | `"raw"` | |
| filter_window_size | string | `"3h"` | |
| rel_change_rate_min | float | `0.1` | |
| abs_change_min | float | `0.01` | |
| first_der_factor | integer | `10` | |
| first_der_window_size | string | `"12h"` | |
| scnd_der_ratio_margin_1 | float | `0.05` | |
| scnd_der_ratio_margin_2 | float | `10.0` | |
| smooth_poly_order | integer | `2` | |
### Description ### Description
The Function is just a wrapper around `flagBreaks_spektrumBased`, from the The Function is just a wrapper around `flagBreaks_spektrumBased`, from the
...@@ -247,16 +322,25 @@ Data from the international Soil Moisture Network. 2013. ...@@ -247,16 +322,25 @@ Data from the international Soil Moisture Network. 2013.
Vadoze Zone J. doi:10.2136/vzj2012.0097. Vadoze Zone J. doi:10.2136/vzj2012.0097.
## SoilMoistureByFrost ## `SoilMoistureByFrost`
### Signature ### Signature
``` ```
SoilMoistureByFrost(soil_temp_reference, tolerated_deviation="1h", frost_level=0) SoilMoistureByFrost(soil_temp_reference, tolerated_deviation="1h", frost_level=0)
``` ```
### Parameters
| parameter | data type | default value | description |
| ------ | ------ | ------ | ---- |
| soil_temp_reference | | | |
| tolerated_deviation | string | `"1h"` | |
| frost_level | integer | `0` | |
### Description ### Description
## SoilMoistureByPrecipitation ## `SoilMoistureByPrecipitation`
### Signature ### Signature
``` ```
SoilMoistureByPrecipitation(prec_reference, sensor_meas_depth=0, SoilMoistureByPrecipitation(prec_reference, sensor_meas_depth=0,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment