chaosmagpy.coordinate_utils.dipole_to_vec¶
- chaosmagpy.coordinate_utils.dipole_to_vec(dipole=None)[source]¶
Convert degree-1 SH coefficients or geomagnetic north pole positions to unit vectors.
- Parameters:
- 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:
- vecndarray, shape (…, 3)
Unit vector pointing in the direction of the geomagnetic north pole.