simpeg.utils.model_builder.create_random_model#

simpeg.utils.model_builder.create_random_model(shape, random_seed=1000, anisotropy=None, its=100, bounds=None, **kwargs)[source]#

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

Parameters:
shapeint or tuple of int

Shape of the model. Can define a vector of size (n_cells) or define the dimensions of a tensor.

random_seedNone or RandomSeed, optional

Random seed for random uniform model that is convolved with the kernel. It can either be an int, a predefined Numpy random number generator, or any valid input to numpy.random.default_rng.

anisotropynumpy.ndarray

this is the (3, n) blurring kernel that is used.

itsint

Number of smoothing iterations after convolutions

boundslist of float

Lower and upper bound for the model values

seedNone or RandomSeed, optional

Deprecated since version 0.23.0: Argument seed is deprecated in favor of random_seed and will be removed in SimPEG v0.24.0.

Returns:
numpy.ndarray

Physical property model

Examples

>>> import matplotlib.pyplot as plt
>>> from simpeg.utils.model_builder import create_random_model
>>> m = create_random_model((50,50), bounds=[-4,0])
>>> plt.colorbar(plt.imshow(m))
>>> plt.title('A very cool, yet completely random model.')
>>> plt.show()

(Source code, png, pdf)

../../../_images/simpeg-utils-model_builder-create_random_model-1.png

Galleries and Tutorials using simpeg.utils.model_builder.create_random_model#

Maps: Mesh2Mesh

Maps: Mesh2Mesh