.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "examples/01_random_field/02_fancier.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_01_random_field_02_fancier.py: Creating Fancier Fields ----------------------- Only using Gaussian covariance fields gets boring. Now we are going to create much rougher random fields by using an exponential covariance model and we are going to make them anisotropic. The code is very similar to the previous examples, but with a different covariance model class :any:`Exponential`. As model parameters we a using following - variance :math:`\sigma^2=1` - correlation length :math:`\lambda=(12, 3)^T` - rotation angle :math:`\theta=\pi/8` .. GENERATED FROM PYTHON SOURCE LINES 17-28 .. code-block:: Python import numpy as np import gstools as gs x = y = np.arange(100) model = gs.Exponential(dim=2, var=1, len_scale=[12.0, 3.0], angles=np.pi / 8) srf = gs.SRF(model, seed=20170519) srf.structured([x, y]) srf.plot() .. image-sg:: /examples/01_random_field/images/sphx_glr_02_fancier_001.png :alt: Field 2D structured: (100, 100) :srcset: /examples/01_random_field/images/sphx_glr_02_fancier_001.png :class: sphx-glr-single-img .. GENERATED FROM PYTHON SOURCE LINES 29-30 The anisotropy ratio could also have been set with .. GENERATED FROM PYTHON SOURCE LINES 30-32 .. code-block:: Python model = gs.Exponential(dim=2, var=1, len_scale=12, anis=0.25, angles=np.pi / 8) .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.506 seconds) .. _sphx_glr_download_examples_01_random_field_02_fancier.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: 02_fancier.ipynb <02_fancier.ipynb>` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: 02_fancier.py <02_fancier.py>` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: 02_fancier.zip <02_fancier.zip>` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_