diff --git a/src/gstools/variogram/estimator.pyx b/src/gstools/variogram/estimator.pyx index 611f5efb..9828ba33 100644 --- a/src/gstools/variogram/estimator.pyx +++ b/src/gstools/variogram/estimator.pyx @@ -96,6 +96,9 @@ cdef inline double estimator_matheron(const double f_diff) nogil: cdef inline double estimator_cressie(const double f_diff) nogil: return sqrt(fabs(f_diff)) +cdef inline double estimator_madogram(const double f_diff) nogil: + return fabs(f_diff) + ctypedef double (*_estimator_func)(const double) nogil cdef inline void normalization_matheron( @@ -151,6 +154,8 @@ cdef _estimator_func choose_estimator_func(str estimator_type): cdef _estimator_func estimator_func if estimator_type == 'm': estimator_func = estimator_matheron + elif estimator_type == 'f': + estimator_func = estimator_madogram else: # estimator_type == 'c' estimator_func = estimator_cressie return estimator_func diff --git a/src/gstools/variogram/variogram.py b/src/gstools/variogram/variogram.py index 69746658..15e69639 100644 --- a/src/gstools/variogram/variogram.py +++ b/src/gstools/variogram/variogram.py @@ -53,6 +53,8 @@ def _set_estimator(estimator): """Translate the verbose Python estimator identifier to single char.""" if estimator.lower() == "matheron": cython_estimator = "m" + elif estimator.lower() == "madogram": + cython_estimator = "a" elif estimator.lower() == "cressie": cython_estimator = "c" else: @@ -108,6 +110,15 @@ def vario_estimate( with :math:`r_k \leq \| \mathbf x_i - \mathbf x_i' \| < r_{k+1}` being the bins. + Or if the estimator "f-madogram" was chosen: + .. math:: + \gamma(r_k) = \frac{1}{2 N(r_k)} \sum_{i=1}^{N(r_k)} |z(\mathbf x_i) - + z(\mathbf x_i')| \; , + + with :math: `r_k \leq \| \mathbf x_i - \mathbf x_i' \| < r_{k+1}` + being the bins. + The F-madogram estimator is prefered for extreme values [Cooley2006]_. Also see [Neves2011]_. + Or if the estimator "cressie" was chosen: .. math:: @@ -157,6 +168,7 @@ def vario_estimate( * "matheron": the standard method of moments of Matheron * "cressie": an estimator more robust to outliers + * "madogram": an estimator for Madogram Default: "matheron" latlon : :class:`bool`, optional