<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br></div><div><br></div>  Hi all,<div><br></div><div>I switched to the development yt branch which now includes Sam's latest changes. These updates fixed the problem. Thanks Sam!</div><div><br></div><div>   Cheers,</div><div>     Mateusz</div><div><br>
<br><div><div>On Dec 5, 2013, at 5:34 PM, Sam Skillman wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr">Hi Mateusz<div><br></div><div>This has been merged in. Could you run: "yt update" and try again?</div><div><br></div><div>Sam</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Dec 5, 2013 at 2:27 PM, Sam Skillman <span dir="ltr"><<a href="mailto:samskillman@gmail.com" target="_blank">samskillman@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Mateusz,<div><br></div><div>Sorry for the hassle -- it seems a bug was introduced a while back and you're the first one to attempt to rotate around something not at the center of the simulation since then! I've issued a pull request that should fix this so that the focus stays locked on C and it should rotate about it.  Your script above should not have to be altered, though I'll note that the N argument in the cam.rotation() call isn't necessary since it will by default rotate around the "north_vector", which is N in your case.</div>


<div><br></div><div>I expect that this PR will be accepted quite quickly:  <a href="https://bitbucket.org/yt_analysis/yt/pull-request/672/bugfix-for-camera-movement/diff" target="_blank">https://bitbucket.org/yt_analysis/yt/pull-request/672/bugfix-for-camera-movement/diff</a></div>


<div><br></div><div>Best,</div><div>Sam</div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Dec 5, 2013 at 1:08 PM, Mateusz Ruszkowski <span dir="ltr"><<a href="mailto:mateuszr@umich.edu" target="_blank">mateuszr@umich.edu</a>></span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
<br>
   Hi all,<br>
<br>
I am trying to understand how the camera rotation works in yt. I verified that the following set of commands<br>
<br>
C = (0.0,-50*kpc,zPos)<br>
L = (0.0,-1.0,0.0)<br>
W = 100*kpc<br>
N = (0.0,0.0,1.0)<br>
cam = pf.h.camera(C, L, W, 512, tf, N)<br>
cam.snapshot("single_snapshot.png")<br>
<br>
produces a nice image of a flat gas distribution located in the (x,y) plane anchored at zPos. I would like to move the camera around the z-axis while pointing it at (0,0,zPos) and take 10 snapshots. This should result in a sequence of 10 identical images of the same pancake-flat distribution of the gas. I tried this:<br>



<br>
for i, snap in enumerate(cam.rotation(2*np.pi, 10,N)):<br>
    print "Taking snapshot % 3i" % (i+1)<br>
    snap.write_png("rot_%04i.png" % i)<br>
<br>
My assumption was that "N" in the above command defines the vector around which to move the camera. This procedure did generate 10 images but they were all different rather than identical. My question is how do I move the camera around the z-axis while pointing it at (0,0,zPos), or in other words, how do I define the point where "N" is anchored.<br>



<br>
   Thanks,<br>
     Mateusz<br>
<br>
_______________________________________________<br>
yt-users mailing list<br>
<a href="mailto:yt-users@lists.spacepope.org" target="_blank">yt-users@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>
_______________________________________________<br>yt-users mailing list<br><a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a><br>http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org<br></blockquote></div><br></div></body></html>