I broke volume rendering (via yt.extensions.volume_rendering) some
time ago, and I only just realized it today when some people were
getting corrupted images. It took a while to come up because I
avoided re-generating the Cython/C code that actually conducts the
volume rendering; however, recently I updated this code and pushed it
to the repository, and that's when the errors started showing up.
The exact error was in mercurial changeset 3007999e2518 (May 30),
which I merged into trunk in revision 1754 (June 24). These dates are
not necessarily the dates at which the error showed up, however, as
the re-cythonization probably did not occur at those times. The error
was in the optimization of division by the inverse of the vector
direction; the rays to cast were passed to partitioned bricks and to
avoid too much division of 64-bit floats, I changed it to be a
multiplication against the inverse.
To calculate the inverse, I did something similar to this:
for i in range(3):
iv_dir[i] = 1.0/v_dir
The error, of course, being that I was dividing by v_dir for all
I identified this by using the hg bisect command, where I found a good
revision and a bad revision and it executed the necessary tests to
figure out where the code took a turn for the worse. I've committed
fixes in hg changeset f0960f4f6bed, svn trunk r1804 and svn yt-1.7
I'm really sorry for the troubles, and I hope that it hasn't cost
anyone too much time. There may still be some lingering bugs, so
please let me know if you run into any more bad images or difficulties
with the volume rendering. You can get an updated yt by doing "yt
I've been trying out the volume render, with a lot of success. However, while I was starting to work on rotating the view, I found the normal vectors aligned with x, y or z would create blank images. After reading what was printed on the console, I saw that the volume being rendered had zero width in two dimensions:
yt INFO 2010-07-29 08:31:28,740 Traversing 17583 bricks between [ 0.45 0.5 0.5 ] and [ 0.55 0.5 0.5 ]
I tried looking into extension/volume_rendering/camera.py last night, in particular _setup_normalized_vectors, but the body and mind were weak. I'll keep trying, but if anyone has suggestions, or corrections to my method, they would be appreciated.
Rendering script at http://paste.enzotools.org/show/958/
Has anybody written a replacement for findinits? If you remember,
this was a utility that took two outputs along with a region
specification. The particles inside that region in the later output
were located in the earlier simulation, and the minimum bounding box
that they occupied was output on the command prompt. This was usually
used for zoom simulations.
If nobody has, I'll take a shot at it. Thanks!
If you have a second, I'd really appreciate your help with figuring
out where Tkinter is available: inside the TeraGrid, on your personal
machines, on other supercomputing centers, etc etc. This form:
will collect your responses, and it describes what to do. You simply
have to run the command: "python2.6 -c 'import Tkinter' " and report
if it throws an ImportError or if it passes without failure.
Thanks very much, and I really appreciate you taking the couple
moments to do this.