.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "examples/07_transformations/04_bimodal.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_07_transformations_04_bimodal.py: Bimodal fields -------------- We provide two transformations to obtain bimodal distributions: * `arcsin `__. * `uquad `__. Both transformations will preserve the mean and variance of the given field by default. See: :any:`transform.normal_to_arcsin` and :any:`transform.normal_to_uquad` .. GENERATED FROM PYTHON SOURCE LINES 14-24 .. image-sg:: /examples/07_transformations/images/sphx_glr_04_bimodal_001.png :alt: Field 2D structured: (100, 100) :srcset: /examples/07_transformations/images/sphx_glr_04_bimodal_001.png :class: sphx-glr-single-img .. code-block:: Python import gstools as gs # structured field with a size of 100x100 and a grid-size of 1x1 x = y = range(100) model = gs.Gaussian(dim=2, var=1, len_scale=10) srf = gs.SRF(model, seed=20170519) field = srf.structured([x, y]) srf.transform("normal_to_arcsin") # also "arcsin" works srf.plot() .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.385 seconds) .. _sphx_glr_download_examples_07_transformations_04_bimodal.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: 04_bimodal.ipynb <04_bimodal.ipynb>` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: 04_bimodal.py <04_bimodal.py>` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: 04_bimodal.zip <04_bimodal.zip>` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_