cart2pol#
- movement.utils.vector.cart2pol(data)[source]#
Transform Cartesian coordinates to polar.
- Parameters:
data (xarray.DataArray) – The input data containing
space
as a dimension, withx
andy
in the dimension coordinate.- Returns:
An xarray DataArray containing the polar coordinates stored in the
space_pol
dimension, withrho
andphi
in the dimension coordinate. The anglesphi
returned are in radians, in the range[-pi, pi]
.- Return type: