[yt-svn] commit/yt: MatthewTurk: Allow overriding the exclude fields in FixedResolutionBuffer.

Bitbucket commits-noreply at bitbucket.org
Sat Jun 23 12:39:25 PDT 2012


1 new commit in yt:


https://bitbucket.org/yt_analysis/yt/changeset/201e8ab4c7de/
changeset:   201e8ab4c7de
branch:      yt
user:        MatthewTurk
date:        2012-06-23 21:39:02
summary:     Allow overriding the exclude fields in FixedResolutionBuffer.
affected #:  1 file

diff -r 756c25de85c715a91b70101061e9dd7bbf2893cf -r 201e8ab4c7deed817338d8b56203028fc58ab46a yt/visualization/fixed_resolution.py
--- a/yt/visualization/fixed_resolution.py
+++ b/yt/visualization/fixed_resolution.py
@@ -33,6 +33,8 @@
 import weakref
 
 class FixedResolutionBuffer(object):
+    _exclude_fields = ('pz','pdz','x','y','z')
+
     def __init__(self, data_source, bounds, buff_size, antialias = True,
                  periodic = False):
         r"""
@@ -132,7 +134,7 @@
         self.data[item] = val
 
     def _get_data_source_fields(self):
-        exclude = self.data_source._key_fields + ['pz','pdz','x','y','z']
+        exclude = self.data_source._key_fields + list(self._exclude_fields)
         for f in self.data_source.fields:
             if f not in exclude:
                 self[f]

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