:orphan: .. _tutorial_02_cov: The Covariance Model ==================== One of the core-features of GSTools is the powerful :any:`CovModel` class, which allows you to easily define arbitrary covariance models by yourself. The resulting models provide a bunch of nice features to explore the covariance models. A covariance model is used to characterize the `semi-variogram `_, denoted by :math:`\gamma`, of a spatial random field. In GSTools, we use the following form for an isotropic and stationary field: .. math:: \gamma\left(r\right)= \sigma^2\cdot\left(1-\mathrm{cor}\left(s\cdot\frac{r}{\ell}\right)\right)+n Where: - :math:`r` is the lag distance - :math:`\ell` is the main correlation length - :math:`s` is a scaling factor for unit conversion or normalization - :math:`\sigma^2` is the variance - :math:`n` is the nugget (subscale variance) - :math:`\mathrm{cor}(h)` is the normalized correlation function depending on the non-dimensional distance :math:`h=s\cdot\frac{r}{\ell}` Depending on the normalized correlation function, all covariance models in GSTools are providing the following functions: - :math:`\rho(r)=\mathrm{cor}\left(s\cdot\frac{r}{\ell}\right)` is the so called `correlation `_ function - :math:`C(r)=\sigma^2\cdot\rho(r)` is the so called `covariance `_ function, which gives the name for our GSTools class .. note:: We are not limited to isotropic models. GSTools supports anisotropy ratios for length scales in orthogonal transversal directions like: - :math:`x_0` (main direction) - :math:`x_1` (1. transversal direction) - :math:`x_2` (2. transversal direction) - ... These main directions can also be rotated. Just have a look at the corresponding examples. Provided Covariance Models -------------------------- .. currentmodule:: gstools.covmodel The following standard covariance models are provided by GSTools .. autosummary:: Gaussian Exponential Matern Integral Stable Rational Cubic Linear Circular Spherical HyperSpherical SuperSpherical JBessel TPLSimple As a special feature, we also provide truncated power law (TPL) covariance models .. autosummary:: TPLGaussian TPLExponential TPLStable These models provide a lower and upper length scale truncation for superpositioned models. Examples -------- .. raw:: html
.. thumbnail-parent-div-open .. raw:: html
.. only:: html .. image:: /examples/02_cov_model/images/thumb/sphx_glr_00_intro_thumb.png :alt: :ref:`sphx_glr_examples_02_cov_model_00_intro.py` .. raw:: html
Introductory example
.. raw:: html
.. only:: html .. image:: /examples/02_cov_model/images/thumb/sphx_glr_01_basic_methods_thumb.png :alt: :ref:`sphx_glr_examples_02_cov_model_01_basic_methods.py` .. raw:: html
Basic Methods
.. raw:: html
.. only:: html .. image:: /examples/02_cov_model/images/thumb/sphx_glr_02_aniso_rotation_thumb.png :alt: :ref:`sphx_glr_examples_02_cov_model_02_aniso_rotation.py` .. raw:: html
Anisotropy and Rotation
.. raw:: html
.. only:: html .. image:: /examples/02_cov_model/images/thumb/sphx_glr_03_spectral_methods_thumb.png :alt: :ref:`sphx_glr_examples_02_cov_model_03_spectral_methods.py` .. raw:: html
Spectral methods
.. raw:: html
.. only:: html .. image:: /examples/02_cov_model/images/thumb/sphx_glr_04_different_scales_thumb.png :alt: :ref:`sphx_glr_examples_02_cov_model_04_different_scales.py` .. raw:: html
Different scales
.. raw:: html
.. only:: html .. image:: /examples/02_cov_model/images/thumb/sphx_glr_05_additional_para_thumb.png :alt: :ref:`sphx_glr_examples_02_cov_model_05_additional_para.py` .. raw:: html
Additional Parameters
.. raw:: html
.. only:: html .. image:: /examples/02_cov_model/images/thumb/sphx_glr_06_fitting_para_ranges_thumb.png :alt: :ref:`sphx_glr_examples_02_cov_model_06_fitting_para_ranges.py` .. raw:: html
Fitting variogram data
.. thumbnail-parent-div-close .. raw:: html
.. toctree:: :hidden: /examples/02_cov_model/00_intro /examples/02_cov_model/01_basic_methods /examples/02_cov_model/02_aniso_rotation /examples/02_cov_model/03_spectral_methods /examples/02_cov_model/04_different_scales /examples/02_cov_model/05_additional_para /examples/02_cov_model/06_fitting_para_ranges .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_