.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "examples/02_cov_model/01_basic_methods.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code. .. rst-class:: sphx-glr-example-title .. _sphx_glr_examples_02_cov_model_01_basic_methods.py: Basic Methods ============= The covariance model class :any:`CovModel` of GSTools provides a set of handy methods. One of the following functions defines the main characterization of the variogram: - ``CovModel.variogram`` : The variogram of the model given by .. math:: \gamma\left(r\right)= \sigma^2\cdot\left(1-\rho\left(r\right)\right)+n - ``CovModel.covariance`` : The (auto-)covariance of the model given by .. math:: C\left(r\right)= \sigma^2\cdot\rho\left(r\right) - ``CovModel.correlation`` : The (auto-)correlation (or normalized covariance) of the model given by .. math:: \rho\left(r\right) - ``CovModel.cor`` : The normalized correlation taking a normalized range given by: .. math:: \mathrm{cor}\left(\frac{r}{\ell}\right) = \rho\left(r\right) As you can see, it is the easiest way to define a covariance model by giving a correlation function as demonstrated in the introductory example. If one of the above functions is given, the others will be determined: .. GENERATED FROM PYTHON SOURCE LINES 39-46 .. image-sg:: /examples/02_cov_model/images/sphx_glr_01_basic_methods_001.png :alt: 01 basic methods :srcset: /examples/02_cov_model/images/sphx_glr_01_basic_methods_001.png :class: sphx-glr-single-img .. code-block:: Python import gstools as gs model = gs.Exponential(dim=3, var=2.0, len_scale=10, nugget=0.5) ax = model.plot("variogram") model.plot("covariance", ax=ax) model.plot("correlation", ax=ax) .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.045 seconds) .. _sphx_glr_download_examples_02_cov_model_01_basic_methods.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: 01_basic_methods.ipynb <01_basic_methods.ipynb>` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: 01_basic_methods.py <01_basic_methods.py>` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: 01_basic_methods.zip <01_basic_methods.zip>` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_