{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "\n# Fractional Brownian field\n\n.. codeauthor:: Fr\u00e9d\u00e9ric Richard \n\nThis example shows how to simulate a fractional Brownian field with\na prescribed Hurst index.\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [ "import numpy as np\nfrom afbf import tbfield\n\nN = 256 # Image size.\nH = 0.2 # Hurst index in (0, 1).\n\n# Define the field.\nZ = tbfield('fbf')\n\n# Change the parameter of the Hurst function.\nZ.hurst.ChangeParameters(np.array([[H]]))\nZ.NormalizeModel()\n\n# Simulate the field.\nz = Z.Simulate()\n\n# Display the simulation.\nz.Display()" ] } ], "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.11.13" } }, "nbformat": 4, "nbformat_minor": 0 }