Wire#

class emg3d.electrodes.Wire(coordinates)[source]#

Bases: object

A wire consists of an arbitrary number of electrodes.

Note

Use any of the Tx*/Rx* classes to create sources and receivers, not this class.

Parameters:
coordinatesarray_like

Electrode locations of shape (n, 3), where n is the number of electrodes: [[x1, y1, z1], [...], [xn, yn, zn]].

Attributes Summary

center

Center point of all unique electrodes.

coordinates

Electrode coordinate as accepted by its class.

length

Total length of all dipole segments formed by the electrodes.

points

Electrode locations (n, 3).

segment_lengths

Length of each individual dipole segment in the wire.

segment_n

Number of dipole segments in the wire.

xtype

Flag of the type of electrodes.

Methods Summary

copy()

Return a copy of the Survey.

from_dict(inp)

Convert dictionary into its class instance.

to_dict([copy])

Store the necessary information of the Electrode in a dict.

Attributes Documentation

center#

Center point of all unique electrodes.

coordinates#

Electrode coordinate as accepted by its class.

length#

Total length of all dipole segments formed by the electrodes.

points#

Electrode locations (n, 3).

segment_lengths#

Length of each individual dipole segment in the wire.

segment_n#

Number of dipole segments in the wire.

xtype#

Flag of the type of electrodes.

In reality, all electrodes are electric. But we do idealize some loops as theoretical “magnetic dipoles” (TxMagneticDipole, RxMagneticPoint). xtype is a flag for this.

Methods Documentation

copy()[source]#

Return a copy of the Survey.

classmethod from_dict(inp)[source]#

Convert dictionary into its class instance.

Parameters:
inpdict

Dictionary as obtained from the classes’ to_dict.

Returns:
electrode{Tx*, Rx*}

A source or receiver instance.

to_dict(copy=False)[source]#

Store the necessary information of the Electrode in a dict.

Parameters:
copybool, default: False

If True, returns a deep copy of the dict.

Returns:
outdict

Dictionary containing all information to re-create the Electrode.