chaosmagpy.coordinate_utils.transform_vectors¶
- chaosmagpy.coordinate_utils.transform_vectors(theta, phi, B_theta, B_phi, time=None, reference=None, inverse=None, dipole=None)[source]¶
Transform vector components in the local USE frame of GEO to components in the local USE frame of a magnetic coordinate system.
- Parameters:
- thetafloat or ndarray, shape (…)
Geocentric colatitude in degrees.
- phifloat or ndarray, shape (…)
Longitude in degrees.
- B_thetafloat or ndarray, shape (…)
Spherical southward vector components.
- B_phifloat or ndarray, shape (…)
Azimuthal vector components.
- timefloat or ndarray, shape (…)
Time given as modified Julian date, i.e. with respect to the date 0h00 January 1, 2000 (mjd2000). Ignored for
reference='mag'
.- reference{‘gsm’, ‘sm’, ‘mag’}
Target coordinate system.
- inversebool
Use inverse transformation instead, i.e. transform coordinates and spherical components from the magnetic to the geographic frame (default is False).
- dipolendarray, shape (…, 3), or tuple of ndarrays, optional
Dipole coefficients. Accepted input is a single array with the dipole coefficients \(g_1^0\), \(g_1^1\) and \(h_1^1\) in the trailing dimension; or a tuple of two arrays, where the first array is the co-latitude of the geomagentic north pole and the second is its longitude; or a tuple of three arrays, one array for each dipole coefficient in the natural order. Defaults to the SH coefficients in
basicConfig['params.dipole']
.
- Returns:
- thetandarray, shape (…)
Colatitude in degrees \([0^\circ, 180^\circ]\) of the magnetic geocentric coordinate system.
- phindarray, shape (…)
Longitude in degrees \((-180^\circ, 180^\circ]\) of the magnetic coordinate system.
- B_thetafloat or ndarray, shape (…)
Spherical southward vector components in the target frame.
- B_phifloat or ndarray, shape (…)
Azimuthal vector components in the target frame.
See also