Created
March 20, 2014 13:55
-
-
Save elyase/9664266 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from math import sin, cos, pi | |
| l = list() | |
| for alpha in np.linspace(0,90,90): | |
| alpha = alpha*pi/180 # plane angle in radians | |
| R = np.matrix([ [cos(alpha) , 0, sin(alpha)], | |
| [0 , 1, 0], | |
| [-sin(alpha), 0, cos(alpha)] ]) | |
| rotated = np.matrix(data[['X','Y','Z']])*R | |
| l.append(rotated.std(axis=0)) | |
| standard_devs = pd.DataFrame(np.vstack(l), columns=['std(X)','std(Y)','std(Z)']) | |
| standard_devs.plot() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment