code: def rotate_in_plane(chi, phase):
      
      v = chi.T
      sp = np.sin(phase)
      cp = np.cos(phase)
      res = 1.*v
      res[0] = v[0]*cp + v[1]*sp
      res[1] = v[1]*cp - v[0]*sp
      return res.T
docs: For transforming spins between the coprecessing and coorbital frames