[Yt-svn] commit/yt: MatthewTurk: Fixing ObliqueFixedResolutionBuffer
Bitbucket
commits-noreply at bitbucket.org
Thu Jun 30 11:32:32 PDT 2011
1 new changeset in yt:
http://bitbucket.org/yt_analysis/yt/changeset/48b25ca8b7f2/
changeset: 48b25ca8b7f2
branch: yt
user: MatthewTurk
date: 2011-06-30 20:32:23
summary: Fixing ObliqueFixedResolutionBuffer
affected #: 1 file (97 bytes)
--- a/yt/visualization/fixed_resolution.py Wed Jun 29 15:16:27 2011 -0600
+++ b/yt/visualization/fixed_resolution.py Thu Jun 30 11:32:23 2011 -0700
@@ -29,6 +29,7 @@
y_dict, \
axis_names
import _MPL
+import numpy as na
class FixedResolutionBuffer(object):
def __init__(self, data_source, bounds, buff_size, antialias = True,
@@ -96,15 +97,16 @@
self.periodic = periodic
# Handle periodicity, just in case
- DLE = self.pf.domain_left_edge
- DRE = self.pf.domain_right_edge
- DD = float(self.periodic)*(DRE - DLE)
- axis = self.data_source.axis
- xax = x_dict[axis]
- yax = y_dict[axis]
- self._period = (DD[xax], DD[yax])
- self._edges = ( (DLE[xax], DRE[xax]), (DLE[yax], DRE[yax]) )
-
+ if self.data_source.axis < 3:
+ DLE = self.pf.domain_left_edge
+ DRE = self.pf.domain_right_edge
+ DD = float(self.periodic)*(DRE - DLE)
+ axis = self.data_source.axis
+ xax = x_dict[axis]
+ yax = y_dict[axis]
+ self._period = (DD[xax], DD[yax])
+ self._edges = ( (DLE[xax], DRE[xax]), (DLE[yax], DRE[yax]) )
+
def __getitem__(self, item):
if item in self.data: return self.data[item]
mylog.info("Making a fixed resolution buffer of %d by %d" % \
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