dipole#

empymod.model.dipole(src, rec, depth, res, freqtime, signal=None, ab=11, aniso=None, epermH=None, epermV=None, mpermH=None, mpermV=None, **kwargs)[source]#

Return EM fields due to infinitesimal small EM dipoles.

Calculate the electromagnetic frequency- or time-domain field due to infinitesimal small electric or magnetic dipole source(s), measured by infinitesimal small electric or magnetic dipole receiver(s); sources and receivers are directed along the principal directions x, y, or z, and all sources are at the same depth, as well as all receivers are at the same depth.

Use the functions bipole to calculate dipoles with arbitrary angles or dipoles of finite length and arbitrary angle.

The function dipole could be replaced by bipole (all there is to do is translate ab into msrc, mrec, azimuth’s and dip’s). However, dipole is kept separately to serve as an example of a simple modelling routine that can serve as a template.

Parameters:
src, reclist of floats or arrays

Source and receiver coordinates [x, y, z] (m):

For N sources or receivers, the x- and y-coordinates must be of size N or 1 (in the latter case it will be expanded to N); z is always a single value.

Sources or receivers placed on a layer interface are considered in the upper layer.

depthlist

Absolute layer interfaces z (m); #depth = #res - 1 (excluding +/- infinity).

resarray_like

Horizontal resistivities rho_h (Ohm.m); #res = #depth + 1.

Alternatively, res can be a dictionary. See the main manual of empymod too see how to exploit this hook to re-calculate etaH, etaV, zetaH, and zetaV, which can be used to, for instance, use the Cole-Cole model for IP.

freqtimearray_like

Frequencies f (Hz) if signal==None, else times t (s); (f, t > 0).

signal{None, -1, 0, 1, dict}, default: None

Source signal:

  • None: Frequency-domain response

  • -1 : Switch-off time-domain response

  • 0 : Impulse time-domain response

  • +1 : Switch-on time-domain response

  • dict : Arbitrary waveform

    For an arbitrary waveform, the dictionary must contain the following keyword-value pairs:

    • nodesarray_like

      Nodes of the waveform.

    • amplitudesarray_like

      Amplitudes (current) of the waveform.

    • signal{-1, 0, 1}, default: 0

      Signal that is convolved with the waveform.

    • nquadint, default: 3

      Number of quadrature points for the waveform segments.

abint, default: 11

Source-receiver configuration.

electric source

magnetic source

x

y

z

x

y

z

electric

receiver

x

11

12

13

14

15

16

y

21

22

23

24

25

26

z

31

32

33

34

35

36

magnetic

receiver

x

41

42

43

44

45

46

y

51

52

53

54

55

56

z

61

62

63

64

65

66

anisoarray_like, default: ones

Anisotropies lambda = sqrt(rho_v/rho_h) (-); #aniso = #res.

epermH, epermVarray_like, default: ones

Relative horizontal/vertical electric permittivities epsilon_h/epsilon_v (-); #epermH = #epermV = #res. If epermH is provided but not epermV, isotropic behaviour is assumed.

mpermH, mpermVarray_like, default: ones

Relative horizontal/vertical magnetic permeabilities mu_h/mu_v (-); #mpermH = #mpermV = #res. If mpermH is provided but not mpermV, isotropic behaviour is assumed.

verb{0, 1, 2, 3, 4}, default: 2

Level of verbosity:

  • 0: Print nothing.

  • 1: Print warnings.

  • 2: Print additional runtime and kernel calls

  • 3: Print additional start/stop, condensed parameter information.

  • 4: Print additional full parameter information

ht, htarg, ft, ftarg, xdirect, loopsettings, optinal

See docstring of bipole for a description.

squeezebool, default: True

If True, the output is squeezed. If False, the output will always be of ndim=3, (nfreqtime, nrec, nsrc).

bandpass{dict, None}, default: None

A dictionary containing any function that is applied to the frequency-domain result. The signature of the function must be func(inp, p_dict), where inp is the dictionary you provide, and p_dict is a dictionary that contains all parameters so far computed in empymod [locals()]. Any change to the frequency domain result must be done in-place, and the function does not return anything. Refer to the time-domain loop examples in the gallery. The dictionary must contain at least the keyword 'func', containing the actual function, but can contain any other parameters too.

Returns:
EMEMArray, (nfreqtime, nrec, nsrc)

Frequency- or time-domain EM field (depending on signal):

  • If rec is electric, returns E [V/m].

  • If rec is magnetic, returns H [A/m].

EMArray is a subclassed ndarray with .pha and .amp attributes (only relevant for frequency-domain data).

The shape of EM is (nfreqtime, nrec, nsrc). However, single dimensions are removed.

See also

bipole

EM fields due to arbitrary rotated, finite length EM dipoles.

loop

EM fields due to a magnetic source loop.

Examples

In [1]: import empymod
   ...: import numpy as np
   ...: src = [0, 0, 100]
   ...: rec = [np.arange(1, 11)*500, np.zeros(10), 200]
   ...: depth = [0, 300, 1000, 1050]
   ...: res = [1e20, .3, 1, 50, 1]
   ...: EMfield = empymod.dipole(
   ...:         src, rec, depth, res, freqtime=1, verb=1)
   ...: EMfield[0]
   ...: 
Out[1]: np.complex128(1.6880934577857314e-10-3.083031298956568e-10j)