[yt-svn] commit/yt: 2 new changesets

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Fri Aug 16 13:39:45 PDT 2013


2 new commits in yt:

https://bitbucket.org/yt_analysis/yt/commits/fd7a350c83a4/
Changeset:   fd7a350c83a4
Branch:      yt
User:        samskillman
Date:        2013-08-14 18:00:49
Summary:     Adding grey_opacity to Multivariate and Planck transfer functions.  MV can be
controlled by grey_opacity keyword, while Planck is always set to
grey_opacity=False. Closes issues #605 and #613.
Affected #:  1 file

diff -r ed0606519b9e3ba18ccf5724517f2785860c68ea -r fd7a350c83a46c8d45a66243e8b8b31dd25b73b8 yt/visualization/volume_rendering/transfer_functions.py
--- a/yt/visualization/volume_rendering/transfer_functions.py
+++ b/yt/visualization/volume_rendering/transfer_functions.py
@@ -236,8 +236,15 @@
     this is fine.  However, more complicated schema are possible by using
     this object.  For instance, density-weighted emission that produces
     colors based on the temperature of the fluid.
+
+    Parameters
+    ----------
+    grey_opacity : bool
+        Should opacity be calculated on a channel-by-channel basis, or
+        overall?  Useful for opaque renderings. Default: False
+ 
     """
-    def __init__(self):
+    def __init__(self, grey_opacity=False):
         self.n_field_tables = 0
         self.tables = [] # Tables are interpolation tables
         self.field_ids = [0] * 6 # This correlates fields with tables
@@ -246,6 +253,7 @@
         self.weight_table_ids = [-1] * 6
         self.grad_field = -1
         self.light_source_v = self.light_source_c = np.zeros(3, 'float64')
+        self.grey_opacity = grey_opacity
 
     def add_field_table(self, table, field_id, weight_field_id = -1,
                         weight_table_id = -1):
@@ -803,6 +811,7 @@
             self.link_channels(i+3, i+3)
 
         self._normalize()
+        self.grey_opacity = False
 
     def _normalize(self):
         fmax  = np.array([f.y for f in self.tables[:3]])


https://bitbucket.org/yt_analysis/yt/commits/a2486256bd43/
Changeset:   a2486256bd43
Branch:      yt
User:        MatthewTurk
Date:        2013-08-16 22:39:42
Summary:     Merged in samskillman/yt (pull request #570)

Adding grey_opacity to Multivariate and Planck TFs
Affected #:  1 file

diff -r 7d2a2985e72d6bba38bd37bea3db5d64d60c9fd5 -r a2486256bd43346dae3d097b0636e2ff802cd4c0 yt/visualization/volume_rendering/transfer_functions.py
--- a/yt/visualization/volume_rendering/transfer_functions.py
+++ b/yt/visualization/volume_rendering/transfer_functions.py
@@ -236,8 +236,15 @@
     this is fine.  However, more complicated schema are possible by using
     this object.  For instance, density-weighted emission that produces
     colors based on the temperature of the fluid.
+
+    Parameters
+    ----------
+    grey_opacity : bool
+        Should opacity be calculated on a channel-by-channel basis, or
+        overall?  Useful for opaque renderings. Default: False
+ 
     """
-    def __init__(self):
+    def __init__(self, grey_opacity=False):
         self.n_field_tables = 0
         self.tables = [] # Tables are interpolation tables
         self.field_ids = [0] * 6 # This correlates fields with tables
@@ -246,6 +253,7 @@
         self.weight_table_ids = [-1] * 6
         self.grad_field = -1
         self.light_source_v = self.light_source_c = np.zeros(3, 'float64')
+        self.grey_opacity = grey_opacity
 
     def add_field_table(self, table, field_id, weight_field_id = -1,
                         weight_table_id = -1):
@@ -803,6 +811,7 @@
             self.link_channels(i+3, i+3)
 
         self._normalize()
+        self.grey_opacity = False
 
     def _normalize(self):
         fmax  = np.array([f.y for f in self.tables[:3]])

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