[yt-svn] commit/yt: MatthewTurk: Adding to_frb routine to cutting planes
Bitbucket
commits-noreply at bitbucket.org
Tue Dec 13 08:15:35 PST 2011
1 new commit in yt:
https://bitbucket.org/yt_analysis/yt/changeset/d6495258ac92/
changeset: d6495258ac92
branch: yt
user: MatthewTurk
date: 2011-12-13 17:15:10
summary: Adding to_frb routine to cutting planes
affected #: 1 file
diff -r bdd0b1bfc80dd2963f010fcba4cf41384bb392eb -r d6495258ac92b87b6df5b0fdde821823a03c5a65 yt/data_objects/data_containers.py
--- a/yt/data_objects/data_containers.py
+++ b/yt/data_objects/data_containers.py
@@ -1272,6 +1272,17 @@
return "%s/c%s_L%s" % \
(self._top_node, cen_name, L_name)
+ def to_frb(self, width, resolution):
+ if iterable(width):
+ w, u = width
+ width = w/self.pf[u]
+ if not iterable(resolution):
+ resolution = (resolution, resolution)
+ from yt.visualization.fixed_resolution import ObliqueFixedResolutionBuffer
+ bounds = (-width/2.0, width/2.0, -width/2.0, width/2.0)
+ frb = ObliqueFixedResolutionBuffer(self, bounds, resolution)
+ return frb
+
class AMRFixedResCuttingPlaneBase(AMR2DData):
"""
AMRFixedResCuttingPlaneBase is an oblique plane through the data,
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