simpeg.maps.ParametricCircleMap#

class simpeg.maps.ParametricCircleMap(mesh, logSigma=True, slope=0.1)[source]#

Bases: IdentityMap

Mapping for a parameterized circle.

Define the mapping from a parameterized model for a circle in a wholespace to all cells within a 2D mesh. For a circle within a wholespace, the model is defined by 5 parameters: the background physical property value (σ0), the physical property value for the circle (σc), the x location x0 and y location y0 for center of the circle, and the circle’s radius (R).

Let m=[σ0,σ1,x0,y0,R] be the set of model parameters the defines a circle within a wholespace. The mapping u(m) from the parameterized model to all cells within a 2D mesh is given by:

u(m)=σ0+(σ1σ0)[12+π1arctan(a[(xcx0)2+(ycy0)2R])]

where xc and yc are vectors storing the x and y positions of all cell centers for the 2D mesh and a is a user-defined constant which defines the sharpness of boundary of the circular structure.

Parameters:
meshdiscretize.BaseMesh

A 2D discretize mesh

logSigmabool

If True, parameters σ0 and σ1 represent the natural log of the physical property values for the background and circle, respectively.

slopefloat

A constant for defining the sharpness of the boundary between the circle and the wholespace. The sharpness increases as slope is increased.

Attributes

is_linear

Determine whether or not this mapping is a linear operation.

logSigma

Whether the input needs to be transformed by an exponential

mesh

The mesh used for the mapping

nP

Number of parameters the mapping acts on; i.e. 5.

shape

Dimensions of the mapping operator

slope

Sharpness of the boundary.

Methods

deriv(m[, v])

Derivative of the mapping with respect to the input parameters.

dot(map1)

Multiply two mappings to create a simpeg.maps.ComboMap.

inverse(D)

The transform inverse is not implemented.

test([m, num, random_seed])

Derivative test for the mapping.

Examples

Here we define the parameterized model for a circle in a wholespace. We then create and use a ParametricCircleMap to map the model to a 2D mesh.

>>> from simpeg.maps import ParametricCircleMap
>>> from discretize import TensorMesh
>>> import numpy as np
>>> import matplotlib.pyplot as plt
>>> h = 0.5*np.ones(20)
>>> mesh = TensorMesh([h, h])
>>> sigma0, sigma1, x0, y0, R = 0., 10., 4., 6., 2.
>>> model = np.r_[sigma0, sigma1, x0, y0, R]
>>> mapping = ParametricCircleMap(mesh, logSigma=False, slope=2)
>>> fig = plt.figure(figsize=(5, 5))
>>> ax = fig.add_subplot(111)
>>> mesh.plot_image(mapping * model, ax=ax)

(Source code, png, pdf)

../../../_images/simpeg-maps-ParametricCircleMap-1.png