chaosmagpy.coordinate_utils.matrix_geo_to_base¶
- chaosmagpy.coordinate_utils.matrix_geo_to_base(theta, phi, base_1, base_2, base_3, inverse=None)[source]¶
Compute matrices to trasnform vector components from USE frame at given spherical geographic coordinates into components with respect to a rotated geocentric coordinate system.
- Parameters:
- thetafloat or ndarray, shape (…)
Geographic colatitude in degrees (GEO).
- phifloat or ndarray, shape (…)
Geographic longitude in degrees (GEO).
- base_1, base_2, base_3ndarray, shape (…, 3)
Base vectors 1 through 3 as columns with respect to GEO.
- inversebool
Use inverse transformation instead, i.e. transform from rotated coordinates to geographic (default is False).
- Returns:
- thetandarray, shape (…)
Reference colatitude in degrees \([0^\circ, 180^\circ]\).
- phindarray, shape (…)
Reference longitude in degrees \((-180^\circ, 180^\circ]\).
- Rndarray, shape (…, 3, 3), optional
Array of matrices that rotates vectors B in spherical GEO to the target spherical reference. The matrices (3x3) reside in the last two dimensions, while the leading dimensions are identical to the input grid.
B_radius_ref = B_radiusB_theta_ref = R[1, 1]*B_theta + R[1, 2]*B_phiB_phi_ref = R[2, 1]*B_theta + R[2, 2]*B_phi
See also