pygimli.physics.ves#

Direct current electromagnetics

This package contains tools, modelling operators, and managers for Vertical Electric Sounding (VES)

Overview#

Classes

Manager

alias of VESManager

VESCModelling(**kwargs)

Vertical Electrical Sounding (VES) complex forward operator.

VESManager(**kwargs)

Vertical electrical sounding (VES) manager class.

VESModelling([ab2, mn2])

Vertical Electrical Sounding (VES) forward operator.

VESRhoModelling(thk[, verbose])

Vertical electrical sounding (VES) modelling with fixed layers.

Classes#

pygimli.physics.ves.Manager#

alias of VESManager

class pygimli.physics.ves.VESCModelling(**kwargs)[source]#

Bases: VESModelling

Vertical Electrical Sounding (VES) complex forward operator.

Vertical Electrical Sounding (VES) forward operator for complex resistivity values. see: pygimli.physics.ert.VESModelling

__init__(**kwargs)[source]#

Initialize with distances.

createStartModel(rhoa)[source]#

Create starting model of nlay-1 thicknesses & nlay resistivities.

drawData(ax, data, error=None, labels=None, ab2=None, mn2=None, **kwargs)[source]#

Draw modeled apparent resistivity and apparent phase data.

Parameters:
  • ax (axes) – Matplotlib axes object to draw into.

  • data (iterable) – Apparent resistivity values to draw. [rhoa phia].

  • error (iterable [None]) – Rhoa in Ohm m and phia in radiand. Adds an error bar if you have error values. [err_rhoas err_phia] The error of amplitudes are assumed to be relative and the error of the phases is assumed to be absolute in mrad.

  • labels (str [r'$varrho_a$', r'$varphi_a$']) – Set legend labels for amplitude and phase.

  • ab2 (iterable) – Override ab2 that fits data size.

  • mn2 (iterable) – Override mn2 that fits data size.

  • plot (function name) – Matplotlib plot function, e.g., plot, loglog, semilogx or semilogy

drawModel(ax, model, **kwargs)[source]#

Draw 1D VESC Modell.

phaseModel(model)[source]#

Return the current phase model values.

resModel(model)[source]#

Return the resistivity model values.

response_mt(par, i=0)[source]#

Multi-threaded model response for parametrization.

Returns:

response – [|rhoa|, +phi(rad)] for [thicks, res, phi(rad)]

Return type:

iterable

class pygimli.physics.ves.VESManager(**kwargs)[source]#

Bases: MethodManager1d

Vertical electrical sounding (VES) manager class.

Examples

>>> import numpy as np
>>> import pygimli as pg
>>> from pygimli.physics import VESManager
>>> ab2 = np.logspace(np.log10(1.5), np.log10(100), 32)
>>> mn2 = 1.0
>>> # 3 layer with 100, 500 and 20 Ohmm
>>> # and layer thickness of 4, 6, 10 m
>>> # over a Halfspace of 800 Ohmm
>>> synthModel = pg.cat([4., 6., 10.], [100., 5., 20., 800.])
>>> ves = VESManager()
>>> ra, err = ves.simulate(synthModel, ab2=ab2, mn2=mn2, noiseLevel=0.01)
>>> ax = ves.showData(ra, error=err)
>>> model = ves.invert(ra, err, nLayers=4, showProgress=0, verbose=0)
>>> ax, _ = ves.showModel(synthModel)
>>> _ = ves.showResult(ax=ax)
../../_images/pygimli-physics-ves-1_00.png

(png, pdf)#

../../_images/pygimli-physics-ves-1_01.png

(png, pdf)#

__init__(**kwargs)[source]#

Initialize instance.

Parameters:

complex (bool) – Accept complex resistivities.

Variables:

complex (bool) – Accept complex resistivities.

property complex#

Return whether the computations are complex.

createForwardOperator(**kwargs)[source]#

Create Forward Operator.

Create Forward Operator based on complex attribute.

exportData(fileName, data=None, error=None)[source]#

Export data into simple ascii matrix.

Usefull?

invert(data=None, err=None, ab2=None, mn2=None, **kwargs)[source]#

Invert measured data.

Parameters:
  • data (iterable) – data vector

  • err (iterable) – error vector

  • ab2 (iterable) – AB/2 vector (otherwise taken from data)

  • mn2 (iterable) – MN/2 vector (otherwise taken from data)

Keyword Arguments:

**kwargs – Additional kwargs inherited from %(MethodManager1d.invert) and %(Inversion.run)

Returns:

model – inversion result

Return type:

pg.Vector

loadData(fileName, **kwargs)[source]#

Load simple data matrix.

preErrorCheck(err, dataVals=None)[source]#

Fct to be called before the validity check of the error values.

simulate(model, ab2=None, mn2=None, **kwargs)[source]#

Simulate measurement data.

class pygimli.physics.ves.VESModelling(ab2=None, mn2=None, **kwargs)[source]#

Bases: Block1DModelling

Vertical Electrical Sounding (VES) forward operator.

Variables:
  • ab2 – Half distance between the current electrodes A and B.

  • mn2 – Half distance between the potential electrodes M and N. Only used for input (feeding am etc.) or plotting.

  • am – Part of data basis. Distances between A and M electrodes. A is first current, M is first potential electrode.

  • bm – Part of data basis. Distances between B and M electrodes. B is second current, M is first potential electrode.

  • an – Part of data basis. Distances between A and N electrodes. A is first current, N is second potential electrode.

  • bn – Part of data basis. Distances between B and N electrodes. B is second current, N is second potential electrode.

__init__(ab2=None, mn2=None, **kwargs)[source]#

Initialize with distances.

createStartModel(rhoa)[source]#

Create starting model.

drawData(ax, data, error=None, label=None, **kwargs)[source]#

Draw modeled apparent resistivity data.

Parameters:
  • ax (axes) – Matplotlib axes object to draw into.

  • data (iterable) – Apparent resistivity values to draw.

  • error (iterable [None]) – Adds an error bar if you have error values.

  • label (str ['$rho_a$']) – Set legend label for the amplitude.

  • ab2 (iterable) – Override ab2 that fits data size.

  • mn2 (iterable) – Override mn2 that fits data size.

  • plot (function name) – Matplotlib plot function, e.g., plot, loglog, semilogx or semilogy

drawModel(ax, model, **kwargs)[source]#

Draw model as 1D block model.

response(par)[source]#

Model response.

response_mt(par, i=0)[source]#

Multi-threading model response.

setDataSpace(ab2=None, mn2=None, am=None, bm=None, an=None, bn=None, **kwargs)[source]#

Set data basis, i.e., arrays for all am, an, bm, bn distances.

You can set either * AB/2 and (optionally) MN/2 spacings for a classical sounding, or * all distances AM, AN, BM, BN for arbitrary arrays :param ab2: AB/2 distances :type ab2: iterable :param mn2: MN/2 distance(s) :type mn2: iterable | float :param am: :type am: distances between current and potential electrodes :param an: :type an: distances between current and potential electrodes :param bm: :type bm: distances between current and potential electrodes :param bn: :type bn: distances between current and potential electrodes

class pygimli.physics.ves.VESRhoModelling(thk, verbose=False, **kwargs)[source]#

Bases: MeshModelling

Vertical electrical sounding (VES) modelling with fixed layers.

__init__(thk, verbose=False, **kwargs)[source]#

Initialize modelling operator by passing model and data space.

Parameters:
  • thk (iterable, optional) – Thickness vector of the individual layers.

  • verbose (bool, optional) – some output. The default is False.

  • **kwargs (geometric definition of the sounding, either) –

    ab2iterable

    AB/2 distances

    mn2iterable

    MN/2 distances (if not specified, ab2/3 by default) OR

    amiterable

    A-M distance AND

    aniterable

    A-N distance AND

    bmiterable

    N-M distance AND

    bniterable

    B-N distance OR

    dataContainerpg.DataContainerERT

    ERT data container to determine the AM/AN/BM/BN distances

createStartModel(rhoa)[source]#

Create starting model.

response(par)[source]#

Forward response (app. resistivity for given resistivity vector).

response_mt(par)[source]#

Forward response.