[yt-svn] commit/yt: MatthewTurk: Adding periodicity to QuiverCallback. Closes #684 .

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Tue Oct 22 07:28:23 PDT 2013


1 new commit in yt:

https://bitbucket.org/yt_analysis/yt/commits/9c6caa6a1fa8/
Changeset:   9c6caa6a1fa8
Branch:      yt
User:        MatthewTurk
Date:        2013-10-22 15:53:22
Summary:     Adding periodicity to QuiverCallback.  Closes #684 .
Affected #:  1 file

diff -r 30d1bf8d7effe85074aa4142722dde348c50efd9 -r 9c6caa6a1fa8f2eb73e37dd65f4ee5637e51cd79 yt/visualization/plot_modifications.py
--- a/yt/visualization/plot_modifications.py
+++ b/yt/visualization/plot_modifications.py
@@ -186,20 +186,30 @@
         plot._axes.hold(True)
         nx = plot.image._A.shape[0] / self.factor
         ny = plot.image._A.shape[1] / self.factor
+        # periodicity
+        ax = plot.data.axis
+        pf = plot.data.pf
+        period_x = pf.domain_width[x_dict[ax]]
+        period_y = pf.domain_width[y_dict[ax]]
+        periodic = int(any(pf.periodicity))
         pixX = _MPL.Pixelize(plot.data['px'],
                              plot.data['py'],
                              plot.data['pdx'],
                              plot.data['pdy'],
                              plot.data[self.field_x] - self.bv_x,
                              int(nx), int(ny),
-                           (x0, x1, y0, y1),).transpose()
+                             (x0, x1, y0, y1), 0, # bounds, antialias
+                             (period_x, period_y), periodic,
+                           ).transpose()
         pixY = _MPL.Pixelize(plot.data['px'],
                              plot.data['py'],
                              plot.data['pdx'],
                              plot.data['pdy'],
                              plot.data[self.field_y] - self.bv_y,
                              int(nx), int(ny),
-                           (x0, x1, y0, y1),).transpose()
+                             (x0, x1, y0, y1), 0, # bounds, antialias
+                             (period_x, period_y), periodic,
+                           ).transpose()
         X,Y = np.meshgrid(np.linspace(xx0,xx1,nx,endpoint=True),
                           np.linspace(yy0,yy1,ny,endpoint=True))
         if self.normalize:

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