<div dir="ltr">Thanks, Nathan. That does the trick<div><br></div><div>cheers,</div><div>chris</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Jun 4, 2013 at 3:10 PM, Nathan Goldbaum <span dir="ltr"><<a href="mailto:nathan12343@gmail.com" target="_blank">nathan12343@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 Chris,<div><br></div><div>You can set the aspect ratio of your volume via the bbox keyword for load_uniform_grid. See the example in load_uniform_grid's docstrings:</div>
<div><br></div><div><div>bbox : array_like (xdim:zdim, LE:RE), optional</div>
<div> Size of computational domain in units sim_unit_to_cm</div></div><div><br></div><div>>>> arr = np.random.random((128, 128, 129))<br></div><div><div>>>> data = dict(Density = arr)<br></div><div>
>>> bbox = np.array([[0., 1.0], [-1.5, 1.5], [1.0, 2.5]])</div><div>>>> pf = load_uniform_grid(data, arr.shape, 3.08e24, bbox=bbox, nprocs=12)</div></div><div><br></div><div>I'm not sure whether the volume renderer will use non-cubic voxels, but this should be an easy thing to modify and double check on your end.</div>
<div><br></div><div>Cheers,</div><div><br></div><div>Nathan</div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote"><div><div class="h5">On Tue, Jun 4, 2013 at 11:59 AM, Chris Beaumont <span dir="ltr"><<a href="mailto:cnb4ster@gmail.com" target="_blank">cnb4ster@gmail.com</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr"><div dir="ltr">Hi,<div><br></div><div>I'm new to yt and this list, so I apologize if this question has been answered before.</div>
<div><br></div><div>I'm trying to render a non-cubical volume (observational data: see an early attempt at <a href="https://vimeo.com/67421373" target="_blank">https://vimeo.com/67421373</a>). If I supply a scalar "resolution" to Camera.__init__, the output is a square, even though the input data is ~2x wider than it is tall. If I supply a tuple of values, I can manually stretch the image but, as you can tell from the movie, I want to spin around the volume. I don't think that messing with resolution will help me in this case, since the projected aspect ratio of the plot changes at each rotation step.</div>
<div><br></div><div>I did find an old thread similar to this (<a href="http://lists.spacepope.org/pipermail/yt-users-spacepope.org/2012-July/002793.html" target="_blank">http://lists.spacepope.org/pipermail/yt-users-spacepope.org/2012-July/002793.html</a>), but the recipe there seem specific to axis-aligned slices, and not generic rotations. </div>
<div><br></div><div>Is there a natural way to force yt to render pixels with the "right" aspect ratio?</div><div><br></div><div><br></div><div>Thanks,</div><div>Chris</div></div><span><font color="#888888">
<br clear="all"><div><br></div>-- <br>************************************<br>Chris Beaumont<br>Graduate Student<br>Institute for Astronomy<br>University of Hawaii at Manoa<br>2680 Woodlawn Drive<br>Honolulu, HI 96822<br>
<a href="http://www.ifa.hawaii.edu/~beaumont" target="_blank">www.ifa.hawaii.edu/~beaumont</a><br>************************************
</font></span></div>
<br></div></div>_______________________________________________<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>
<br></blockquote></div><br></div>
<br>_______________________________________________<br>
yt-users mailing list<br>
<a href="mailto:yt-users@lists.spacepope.org">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>
<br></blockquote></div><br></div>