rotation

emg3d.electrodes.rotation(azimuth, elevation, deg=True)[source]

Rotation factors for RHS coordinate system with positive z upwards.

The rotation factors multiplied with the length yield the corresponding Cartesian coordinates. (The rotation factors correspond to the rotation of a unit radius of length 1.)

Definition of spherical coordinates:

  • azimuth θ: anticlockwise from x-axis towards y-axis, (-180°, +180°].

  • elevation φ: anticlockwise (upwards) from the xy-plane towards z-axis [-90°, +90°].

  • radius (m).

Definition of Cartesian coordinates:

  • x is Easting;

  • y is Northing;

  • z is positive upwards (RHS).

Parameters
azimuthfloat

Anticlockwise angle from x-axis towards y-axis.

elevationfloat

Anticlockwise (upwards) angle from the xy-plane towards z-axis.

degbool, default: True

Angles are in degrees if True, radians if False.

Returns
rotndarray

Rotation factors (x, y, z).