code: def cart2polar(x, y, center=np.array([0, 0])):
      
      coordShift_x = x - center[0]
      coordShift_y = y - center[1]
      r = np.sqrt(coordShift_x**2+coordShift_y**2)
      phi = np.arctan2(coordShift_y, coordShift_x)
      return r, phi
docs: transforms cartesian coords [x,y] into polar coords [r,phi] in the frame of the lense center
  
      :param coord: set of coordinates
      :type coord: array of size (n,2)
      :param center: rotation point
      :type center: array of size (2)
      :returns:  array of same size with coords [r,phi]
      :raises: AttributeError, KeyError