[yt-svn] commit/yt: MatthewTurk: Adding periodic (default: False) to to_frb.

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Tue Nov 12 08:22:18 PST 2013


1 new commit in yt:

https://bitbucket.org/yt_analysis/yt/commits/c53475f4d73a/
Changeset:   c53475f4d73a
Branch:      yt
User:        MatthewTurk
Date:        2013-11-12 15:56:29
Summary:     Adding periodic (default: False) to to_frb.
Affected #:  1 file

diff -r 8edd9984fef09ff48eb753a88e6305cd41760574 -r c53475f4d73a1643a6e07d22c7b4d5843595d002 yt/data_objects/data_containers.py
--- a/yt/data_objects/data_containers.py
+++ b/yt/data_objects/data_containers.py
@@ -874,7 +874,8 @@
         pw.set_axes_unit(axes_unit)
         return pw
 
-    def to_frb(self, width, resolution, center=None, height=None):
+    def to_frb(self, width, resolution, center=None, height=None,
+               periodic = False):
         r"""This function returns a FixedResolutionBuffer generated from this
         object.
 
@@ -899,6 +900,9 @@
         center : array-like of floats, optional
             The center of the FRB.  If not specified, defaults to the center of
             the current object.
+        periodic : bool
+            Should the returned Fixed Resolution Buffer be periodic?  (default:
+            False).
 
         Returns
         -------
@@ -932,7 +936,8 @@
         yax = y_dict[self.axis]
         bounds = (center[xax] - width*0.5, center[xax] + width*0.5,
                   center[yax] - height*0.5, center[yax] + height*0.5)
-        frb = FixedResolutionBuffer(self, bounds, resolution)
+        frb = FixedResolutionBuffer(self, bounds, resolution,
+                                    periodic = periodic)
         return frb
 
     def interpolate_discretize(self, LE, RE, field, side, log_spacing=True):

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