bsfit.nodes.cirpy.utils.get_cartesian_to_deg

bsfit.nodes.cirpy.utils.get_cartesian_to_deg(x: numpy.ndarray, y: numpy.ndarray, signed: bool) numpy.ndarray[source]

convert cartesian coordinates to angles in degree

Parameters
  • x (np.ndarray) – x coordinate

  • y (np.ndarray) – y coordinate

  • signed (boolean) – True (signed) or False (unsigned)

Usage:
import numpy as np
from bsfit.nodes.cirpy.utils import get_cartesian_to_deg
x = np.array([1, 0, -1, 0])
y = np.array([0, 1, 0, -1])
degree = get_cartesian_to_deg(x,y,False)

# Out: array([  0.,  90., 180., 270.])
Returns

angles in degree

Return type

np.ndarray