{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "\n# Anisotropic Fractional Brownian field (1)\n\n.. codeauthor:: Fr\u00e9d\u00e9ric Richard \n\nThis example shows how to simulate an anisotropic fractional Brownian field\nwith random Hurst step function.\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [ "from afbf import tbfield, perfunction\nfrom numpy import array\n\n# Define the field.\nhurst = perfunction(ftype='step', param=2, fname='Hurst function')\ntopo = perfunction(ftype='step', param=2, fname='Topothesy function')\nZ = tbfield(fname='afbf', topo=topo, hurst=hurst)\nZ.hurst.ChangeParameters(fparam=array([0.2, 0.8]))\nZ.NormalizeModel()\n\n# Simulate the field.\nz = Z.Simulate()\n\n# Display the simulation.\nz.Display()\nZ.DisplayParameters()" ] } ], "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 }