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 spherical coordinates of a rotated geocentric coordinate system as given by three base vectors.

Parameters:
thetafloat or ndarray, shape (…)

Geographic colatitude in degrees.

phifloat or ndarray, shape (…)

Geographic longitude in degrees.

base_1, base_2, base_3ndarray, shape (3,) or (…, 3)

Base vector 1 through 3 resolved into components with respect to GEO.

inversebool, optional

Use inverse transformation instead, i.e. transform from rotated to geographic (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

transform_points