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.

  • inclination (float or array) – Inclination angle of the magnetic vector in degree. It must be in degrees.

  • declination (float or array) – Declination angle of the magnetic vector. It must be in degrees.

Returns:

  • magnetic_e (float or array) – Easting component of the magnetic vector.

  • magnetic_n (float or array) – Northing component of the magnetic vector.

  • magnetic_u (float 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