[yt-users] orientation of renderings and write_bitmap

Sam Skillman samskillman at gmail.com
Tue May 1 14:55:02 PDT 2012


Hi all,

There have been a few changes recently dealing with the orientation of the
image that come out of the volume rendering.

In
https://bitbucket.org/yt_analysis/yt/pull-request/144/multi-index-widths-in-camera-class,
the east and north vector were (rightly) swapped such that when specifying
widths of the image it is done in (x,y,depth) instead of (y,x,depth).  This
has the side effect of transposing the images that are returned.  However,
this had been counteracted by the way write_bitmap takes the image and
outputs it to png. So we were somewhat having two bugs counteract each
other such that if you had requested north_vector to point in a particular
direction, that showed up as "up".  Once these changes went in, the images
then showed up transposed and "up" became "right" (or maybe left).

So, in a poorly-thought out action, I decided to just transpose the image
in write_bitmap.  This is a fairly ugly fix because now write_bitmap will
always transpose any image that you throw it, so any other place you might
use it in scripts might give strange behavior.

We are aiming to fix this to work in a much more desirable fashion by the
time we merge in the volume rendering refactor work that has been going on,
but if anyone has any ideas on how we could handle it, it'd be great to
hear.  For now just be warned if you notice strange behavior with calls to
write_bitmap.

Best,
Sam
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20120501/832ca45c/attachment.htm>


More information about the yt-users mailing list