Maps: Parametrized LayerΒΆ

Build a model of a parametrized layer in a wholespace. If you want to build a model of a parametrized layer in a halfspace, also use Maps.InjectActiveCell.

The model is

m = [
    'background physical property value',
    'layer physical property value',
    'layer center',
    'layer thickness'
]

(Source code, png, hires.png, pdf)

../../_images/Maps_ParametrizedLayer-1.png
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
from SimPEG import Mesh, Maps
import numpy as np
import matplotlib.pyplot as plt


def run(plotIt=True):
    """
        Maps: Parametrized Layer
        ========================

        Build a model of a parametrized layer in a wholespace. If you want to
        build a model of a parametrized layer in a halfspace, also use
        Maps.InjectActiveCell.

        The model is

        .. code::

            m = [
                'background physical property value',
                'layer physical property value',
                'layer center',
                'layer thickness'
            ]

    """

    mesh = Mesh.TensorMesh([50, 50], x0='CC')  # 2D tensor mesh
    mapping = Maps.ParametrizedLayer(mesh)  # parametrized layer in wholespace

    # model
    m = np.hstack(
        np.r_[
            1., # background value
            2., # layer value
            -0.1, # layer center
            0.2 # layer thickness
        ]
    )
    rho = mapping * m # apply the mapping

    if plotIt is True:
        fig, ax = plt.subplots(1, 1, figsize=(4, 6))
        mesh.plotImage(rho, ax=ax)

if __name__ == '__main__':
    run()
    plt.show()