pyrfu.pyrf.cart2sph_ts module#
- pyrfu.pyrf.cart2sph_ts.cart2sph_ts(inp, direction_flag: int = 1)[source]#
Computes magnitude, theta and phi angle from column vector xyz (first column is x ….) theta is 0 at equator. direction_flag = -1 -> to make transformation in opposite direction
- Parameters:
inp (xarray.DataArray) – Time series to convert.
direction_flag ({1, -1}, Optional) – Set to 1 (default) to transform from cartesian to spherical coordinates. Set to -1 to transform from spherical to cartesian coordinates.
- Returns:
out – Input field in spherical/cartesian coordinate system.
- Return type: