{
  "cells": [
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "collapsed": false
      },
      "outputs": [],
      "source": [
        "%matplotlib inline"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {},
      "source": [
        "\n# Creating Fancier Fields\n\nOnly using Gaussian covariance fields gets boring. Now we are going to create\nmuch rougher random fields by using an exponential covariance model and we are going to make them anisotropic.\n\nThe code is very similar to the previous examples, but with a different\ncovariance model class :any:`Exponential`. As model parameters we a using\nfollowing\n\n- variance $\\sigma^2=1$\n- correlation length $\\lambda=(12, 3)^T$\n- rotation angle $\\theta=\\pi/8$\n"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "collapsed": false
      },
      "outputs": [],
      "source": [
        "import numpy as np\n\nimport gstools as gs\n\nx = y = np.arange(100)\nmodel = gs.Exponential(dim=2, var=1, len_scale=[12.0, 3.0], angles=np.pi / 8)\nsrf = gs.SRF(model, seed=20170519)\nsrf.structured([x, y])\nsrf.plot()"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {},
      "source": [
        "The anisotropy ratio could also have been set with\n\n"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "collapsed": false
      },
      "outputs": [],
      "source": [
        "model = gs.Exponential(dim=2, var=1, len_scale=12, anis=0.25, angles=np.pi / 8)"
      ]
    }
  ],
  "metadata": {
    "kernelspec": {
      "display_name": "Python 3",
      "language": "python",
      "name": "python3"
    },
    "language_info": {
      "codemirror_mode": {
        "name": "ipython",
        "version": 3
      },
      "file_extension": ".py",
      "mimetype": "text/x-python",
      "name": "python",
      "nbconvert_exporter": "python",
      "pygments_lexer": "ipython3",
      "version": "3.8.6"
    }
  },
  "nbformat": 4,
  "nbformat_minor": 0
}