harmonica.magnetic_angles_to_vec

harmonica.magnetic_angles_to_vec#

harmonica.magnetic_angles_to_vec(intensity, inclination, declination)[source]#

Convert magnetic field angles to magnetic field vector

Convert intensity, inclination and declination angles of the magnetic field to a 3-component magnetic vector.

Note

Inclination is measured positive downward from the horizontal plane, and declination is measured with respect to north, where positive angles indicate east.

Parameters:
intensity: float or array

Intensity (norm) of the magnetic vector in A/m.

inclinationfloat or array

Inclination angle of the magnetic vector in degree. It must be in degrees.

declinationfloat or array

Declination angle of the magnetic vector. It must be in degrees.

Returns:
magnetic_efloat or array

Easting component of the magnetic vector.

magnetic_nfloat or array

Northing component of the magnetic vector.

magnetic_ufloat or array

Upward component of the magnetic vector.

Examples

>>> mag_e, mag_n, mag_u = magnetic_angles_to_vec(3.0, 45.0, 45.0)
>>> print(mag_e, mag_n, mag_u)
1.5 1.5 -2.121