[yt-svn] commit/yt: MatthewTurk: Recent changes to the way alpha layers are interpreted mean that using the old

Bitbucket commits-noreply at bitbucket.org
Thu Jul 26 08:40:45 PDT 2012


1 new commit in yt:


https://bitbucket.org/yt_analysis/yt/changeset/42fdcc32a605/
changeset:   42fdcc32a605
branch:      yt
user:        MatthewTurk
date:        2012-07-26 17:33:44
summary:     Recent changes to the way alpha layers are interpreted mean that using the old
method, of assigning a value from 1e-3 to 1.0 in logspace for each layer, give
results that look wrong or blank in most places.  This fix will restore
essentially the old behavior.  It should fix all of the volume rendering issues
with non-opaque volume rendering that have cropped up in recent memory.
affected #:  1 file

diff -r b59774e854fa4233250735434264b55743d630df -r 42fdcc32a605b942ffa55aa04002680c3584d31f yt/visualization/volume_rendering/transfer_functions.py
--- a/yt/visualization/volume_rendering/transfer_functions.py
+++ b/yt/visualization/volume_rendering/transfer_functions.py
@@ -611,7 +611,7 @@
             this is the maximum for that subset
         alpha : list of floats, optional
             The alpha value height for each Gaussian.  If not supplied, it is
-            calculated as the logspace between -2.0 and 0.0.
+            set as 1.0 everywhere.
         colormap : string, optional
             An acceptable colormap.  See either yt.visualization.color_maps or
             http://www.scipy.org/Cookbook/Matplotlib/Show_colormaps .
@@ -639,7 +639,7 @@
             if mi is None: mi = col_bounds[0] + dist/(10.0*N)
             if ma is None: ma = col_bounds[1] - dist/(10.0*N)
         if w is None: w = 0.001 * (ma-mi)/N
-        if alpha is None: alpha = na.logspace(-3.0, 0.0, N)
+        if alpha is None: alpha = na.ones(N, dtype="float64")
         for v, a in zip(na.mgrid[mi:ma:N*1j], alpha):
             self.sample_colormap(v, w, a, colormap=colormap, col_bounds=col_bounds)

Repository URL: https://bitbucket.org/yt_analysis/yt/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.



More information about the yt-svn mailing list