[yt-dev] Orientation vectors
John ZuHone
jzuhone at gmail.com
Wed Aug 22 07:23:36 PDT 2012
Hi all, and specifically to those of you with experience with the Orientation vectors...
Doing some testing, I set up an orienter like this:
orient = Orientation([0.0,0.0,1.0])
and the output of orient.unit_vectors is:
[array([ 0., -1., 0.]), array([ 1., 0., -0.]), array([ 0., 0., 1.])]
which I would have expected
[array([ 1., 0., 0.]), array([ 0., 1., 0.]), array([ 0., 0., 1.])]
although I know I could fix this by specifying a north_vector, why would the latter not be the default?
I'm asking because I was attempting to set up new coordinates like so:
orient = Orientation(L)
x_hat = orient.unit_vectors[0]
y_hat = orient.unit_vectors[1]
z_hat = orient.unit_vectors[2]
xsky = x*x_hat[0] + y*x_hat[1] + z*x_hat[2]
ysky = x*y_hat[0] + y*y_hat[1] + z*y_hat[2]
zsky = x*z_hat[0] + y*z_hat[1] + z*z_hat[2]
but this will rotate the x,y plane by 90 degrees.
Best,
John
More information about the yt-dev
mailing list