def single_rotation(M,Z,L,index=0): theta = [] phi = [] sides = Z.shape[1]/M.shape[1] v1 = points.vector(M[:,index],Z[:,index*sides],L) spher = xyz_to_spherical(v1) theta = spher[:,1] phi = spher[:,2] return theta, phi
def rotations(M,Z,L,sides=6): theta = [] phi = [] zrange = range(0,Z.shape[0],sides) for i in range(M.shape[0]): v1 = points.vector(M[k],Z[k],L) spher = xyz_to_spherical(v1) theta.append(spher[1]) phi.append(spher[2]) return theta,phi