Note
Click here to download the full example code
Fractional Brownian field¶
Code author: Frédéric Richard <frederic.richard_at_univ-amu.fr>
This example shows how to simulate a fractional Brownian field with a prescribed Hurst index.
import numpy as np
from afbf import tbfield
N = 256 # Image size.
H = 0.2 # Hurst index in (0, 1).
# Define the field.
Z = tbfield('fbf')
# Change the parameter of the Hurst function.
Z.hurst.ChangeParameters(np.array([[H]]))
Z.NormalizeModel()
# Simulate the field.
z = Z.Simulate()
# Display the simulation.
z.Display()
Total running time of the script: ( 0 minutes 7.591 seconds)