chaosmagpy.coordinate_utils.geo_to_base¶
- chaosmagpy.coordinate_utils.geo_to_base(theta, phi, base_1, base_2, base_3, inverse=None)[source]¶
Transform spherical geographic coordinates into rotated spherical coordinates as given by three cartesian unit base vectors.
- Parameters:
- thetafloat or ndarray, shape (…)
Geocentric colatitude in degrees.
- phifloat or ndarray, shape (…)
Longitude in degrees.
- base_1, base_2, base_3ndarray, shape (3,) or (…, 3)
Base vector 1 through 3 resolved into cartesian components in GEO.
- inversebool, optional
Use inverse transformation instead, i.e. transform from rotated to spherical geographic coordinates (default is False).
- Returns:
- thetandarray, shape (…)
Colatitude in degrees \([0^\circ, 180^\circ]\) of the rotated coordinate system.
- phindarray, shape (…)
Longitude in degrees \((-180^\circ, 180^\circ]\) of the rotated coordinate system.
See also