[Yt-svn] yt-commit r1173 - trunk/yt/raven

mturk at wrangler.dreamhost.com mturk at wrangler.dreamhost.com
Wed Feb 18 11:35:08 PST 2009


Author: mturk
Date: Wed Feb 18 11:35:07 2009
New Revision: 1173
URL: http://yt.spacepope.org/changeset/1173

Log:
Merging back from mercurial the new oblique fixed buffer



Modified:
   trunk/yt/raven/FixedResolution.py

Modified: trunk/yt/raven/FixedResolution.py
==============================================================================
--- trunk/yt/raven/FixedResolution.py	(original)
+++ trunk/yt/raven/FixedResolution.py	Wed Feb 18 11:35:07 2009
@@ -110,6 +110,20 @@
         else: data=self[field]
         numdisplay.display(data)
 
+class ObliqueFixedResolutionBuffer(FixedResolutionBuffer):
+    def __getitem__(self, item):
+        if item in self.data: return self.data[item]
+        indices = na.argsort(self.data_source['dx'])[::-1]
+        buff = _MPL.CPixelize( self.data_source['x'],   self.data_source['y'],   self.data_source['z'],
+                               self.data_source['px'],  self.data_source['py'],
+                               self.data_source['pdx'], self.data_source['pdy'], self.data_source['pdz'],
+                               self.data_source.center, self.data_source._inv_mat, indices,
+                               self.data_source[item],
+                               self.buff_size[0], self.buff_size[1],
+                               self.bounds).transpose()
+        self[item] = buff
+        return buff
+
 class AnnuliProfiler(object):
     def __init__(self, fixed_buffer, center, num_bins, min_radius, max_radius):
         """



More information about the yt-svn mailing list