discretize.utils.random_model¶

discretize.utils.random_model(shape, seed=None, anisotropy=None, its=100, bounds=None)[source]

Create a random model by convolving a kernel with a uniformly distributed model.

Parameters: shape (tuple) – shape of the model. seed (int) – pick which model to produce, prints the seed if you don’t choose. anisotropy (numpy.ndarray) – this is the (3 x n) blurring kernel that is used. its (int) – number of smoothing iterations bounds (list) – bounds on the model, len(list) == 2 M, the model numpy.ndarray

Example

import matplotlib.pyplot as plt
import discretize
plt.colorbar(plt.imshow(discretize.utils.random_model((50, 50), bounds=[-4, 0])))
plt.title('A very cool, yet completely random model.')
plt.show()