chaosmagpy.coordinate_utils.rotate_gauss

chaosmagpy.coordinate_utils.rotate_gauss(nmax, kmax, base_1, base_2, base_3)[source]

Compute matrices for the coordinate transformation of spherical harmonic expansions.

Transform the spherical harmonic expansion in terms of rotated geocentric spherical coordinates (e.g. GSM) to the spherical harmonic expansion in terms of the standard geographic coordinate system (GEO). The rotated coordinate system is described by 3 orthogonal base vectors with components in GEO coordinates.

Parameters:
nmaxint

Maximum degree of spherical harmonic expansion with respect to geographic reference (target reference system).

kmaxint

Maximum degree of spherical harmonic expansion with respect to rotated reference system.

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

Base vectors of rotated reference system given in terms of the target reference system. Vectors reside in the last dimension. The base vectors are needed for the coordinate transformation.

Returns:
matrixndarray, shape (…, nmax (nmax + 2), kmax (kmax + 2))

Matrices reside in last two dimensions. They transform spherical harmonic coefficients of rotated reference (e.g. GSM) to standard geographic reference (GEO):

[g10 g11 h11 …]_geo = M * [g10 g11 h11 …]_gsm