loop¶

empymod.model.
loop
(src, rec, depth, res, freqtime, signal=None, aniso=None, epermH=None, epermV=None, mpermH=None, mpermV=None, mrec=True, recpts=1, strength=0, **kwargs)[source]¶ Return EM fields due to a magnetic source loop.
Calculate the electromagnetic frequency or timedomain field due to an arbitrary rotated, magnetic source consisting of an electric loop, measured by arbitrary rotated, finite electric or magnetic bipole receivers or arbitrary rotated magnetic receivers consisting of electric loops. By default, the electromagnetic response is normalized to source loop area of 1 m2 and receiver length or area of 1 m or 1 m2, respectively, and source strength of 1 A.
A magnetic dipole, as used in
dipole()
andbipole()
, has a moment of \(I^m ds\). However, if the magnetic dipole is generated by an electricwire loop, this changes to \(I^m = i\omega\mu A I^e\), where A is the area of the loop. The same factor \(i\omega\mu A\), applies to the receiver, if it consists of an electricwire loop.The current implementation only handles loop sources and receivers in layers where \(\mu_r^h=\mu_r^v\); the horizontal magnetic permeability is used, and a warning is thrown if the vertical differs from the horizontal one.
Note that the kernel internally still calculates dipole sources and receivers, the moment is a factor that is multiplied in the frequency domain. The logs will therefore still inform about bipoles and dipoles.
 Parameters
 src, reclist of floats or arrays
Source and receiver coordinates (m):
[x0, x1, y0, y1, z0, z1] (bipole of finite length)
[x, y, z, azimuth, dip] (dipole, infinitesimal small)
Dimensions:
The coordinates x, y, and z (dipole) or x0, x1, y0, y1, z0, and z1 (bipole) can be single values or arrays.
The variables x and y (dipole) or x0, x1, y0, and y1 (bipole) must have the same dimensions.
The variables z, azimuth, and dip (dipole) or z0 and z1 (bipole) must either be single values or having the same dimension as the other coordinates.
Angles (coordinate system is either lefthanded with positive z down or righthanded with positive z up; EastNorthDepth):
azimuth (°): horizontal deviation from xaxis, anticlockwise.
+/dip (°): vertical deviation from xyplane down/upwards.
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 recalculate etaH, etaV, zetaH, and zetaV, which can be used to, for instance, use the ColeCole model for IP.
 freqtimearray_like
Frequencies f (Hz) if signal==None, else times t (s); (f, t > 0).
 signal{None, 0, 1, 1}, optional
Source signal, default is None:
None: Frequencydomain response
1 : Switchoff timedomain response
0 : Impulse timedomain response
+1 : Switchon timedomain response
 anisoarray_like, optional
Anisotropies lambda = sqrt(rho_v/rho_h) (); #aniso = #res. Defaults to ones.
 epermH, epermVarray_like, optional
Relative horizontal/vertical electric permittivities epsilon_h/epsilon_v (); #epermH = #epermV = #res. If epermH is provided but not epermV, isotropic behaviour is assumed. Default is ones.
 mpermH, mpermVarray_like, optional
Relative horizontal/vertical magnetic permeabilities mu_h/mu_v (); #mpermH = #mpermV = #res. If mpermH is provided but not mpermV, isotropic behaviour is assumed. Default is ones.
Note that the relative horizontal and vertical magnetic permeabilities in layers with loop sources or receivers will be set to 1.
 mrecbool or string, optional
Receiver options; default is True:
True: Magnetic dipole receiver;
False: Electric dipole receiver;
‘loop’: Magnetic receiver consisting of an electricwire loop.
 recptsint, optional
Number of integration points for bipole receiver, default is 1:
recpts < 3 : bipole, but calculated as dipole at centre
recpts >= 3 : bipole
Note that if mrec=’loop’, recpts will be set to 1.
 strengthfloat, optional
Source strength (A):
If 0, output is normalized to source of 1 m2 area and receiver of 1 m length or 1 m2 area, and source strength of 1 A.
If != 0, output is returned for given source strength and receiver length (if mrec!=’loop’).
The strength is simply a multiplication factor. It can also be used to provide the source and receiver loop area, or also to multiply by :math:mu_0`, if you want the Bfield instead of the Hfield.
Default is 0.
 verb{0, 1, 2, 3, 4}, optional
Level of verbosity, default is 2:
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.
 Returns
 EMEMArray, (nfreqtime, nrec, nsrc)
Frequency or timedomain 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 frequencydomain data).
See also
Examples
>>> import empymod >>> import numpy as np >>> # zdirected loop source: x, y, z, azimuth, dip >>> src = [0, 0, 0, 0, 90] >>> # zdirected magnetic dipole receiverarray: x, y, z, azimuth, dip >>> rec = [np.arange(1, 11)*500, np.zeros(10), 200, 0, 90] >>> # layer boundaries >>> depth = [0, 300, 500] >>> # layer resistivities >>> res = [2e14, 10, 500, 10] >>> # Frequency >>> freq = 1 >>> # Calculate magnetic field due to a loop source at 1 Hz. >>> # [mrec = True (default)] >>> EMfield = empymod.loop(src, rec, depth, res, freq, verb=4) ~ :: empymod START :: w2.0.0 ~ depth [m] : 0 300 500 res [Ohm.m] : 2E+14 10 500 10 aniso [] : 1 1 1 1 epermH [] : 1 1 1 1 epermV [] : 1 1 1 1 mpermH [] : 1 1 1 1 mpermV [] : 1 1 1 1 direct field : Comp. in wavenumber domain frequency [Hz] : 1 Hankel : DLF (Fast Hankel Transform) > Filter : Key 201 (2009) > DLF type : Standard Loop over : None (all vectorized) Source(s) : 1 dipole(s) > x [m] : 0 > y [m] : 0 > z [m] : 0 > azimuth [°] : 0 > dip [°] : 90 Receiver(s) : 10 dipole(s) > x [m] : 500  5000 : 10 [minmax; #] : 500 1000 1500 2000 2500 3000 3500 4000 4500 5000 > y [m] : 0  0 : 10 [minmax; #] : 0 0 0 0 0 0 0 0 0 0 > z [m] : 200 > azimuth [°] : 0 > dip [°] : 90 Required ab's : 33 ~ :: empymod END; runtime = 0:00:00.005025 :: 1 kernel call(s)
>>> print(EMfield) [ 3.05449848e10 2.00374185e11j 7.12528991e11 5.37083268e12j 2.52076501e11 1.62732412e12j 1.18412295e11 8.99570998e14j 6.44054097e12 +5.61150066e13j 3.77109625e12 +7.89022722e13j 2.28484774e12 +8.08897623e13j 1.40021365e12 +7.32151174e13j 8.55487532e13 +6.18402706e13j 5.15642408e13 +4.99091919e13j]