[yt-svn] commit/yt: 2 new changesets

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Wed Jun 11 15:16:44 PDT 2014


2 new commits in yt:

https://bitbucket.org/yt_analysis/yt/commits/d1de2160a4a8/
Changeset:   d1de2160a4a8
Branch:      yt-3.0
User:        ngoldbaum
Date:        2014-06-11 22:25:17
Summary:     Fixing two issues with FixedResolutionBuffer.

First, the CylindricalFixedResolutionBuffer would not accept a single width,
only a tuple.

Second, the old pf.h.plots is now ds.plots. There was a commented out bit of code
in the cartesian FRB that handled this and an uncommented but now buggy bit in the
Cylindrical FRB.
Affected #:  3 files

diff -r 4212f2e4935a998a06fceea23f1382976ef2748a -r d1de2160a4a81ac968d3bc382a778ef956a260a1 doc/source/visualizing/manual_plotting.rst
--- a/doc/source/visualizing/manual_plotting.rst
+++ b/doc/source/visualizing/manual_plotting.rst
@@ -16,7 +16,7 @@
 packages.
 
 Note that the index object associated with your snapshot file contains a
-list of plots you've made in ``pf.h.plots``.
+list of plots you've made in ``ds.plots``.
 
 .. _fixed-resolution-buffers:
 

diff -r 4212f2e4935a998a06fceea23f1382976ef2748a -r d1de2160a4a81ac968d3bc382a778ef956a260a1 yt/data_objects/data_containers.py
--- a/yt/data_objects/data_containers.py
+++ b/yt/data_objects/data_containers.py
@@ -807,7 +807,10 @@
                     "Currently we only support images centered at R=0. " +
                     "We plan to generalize this in the near future")
             from yt.visualization.fixed_resolution import CylindricalFixedResolutionBuffer
-            if iterable(width): radius = max(width)
+            if iterable(width):
+                radius = max(width)
+            else:
+                radius = width
             if iterable(resolution): resolution = max(resolution)
             frb = CylindricalFixedResolutionBuffer(self, radius, resolution)
             return frb

diff -r 4212f2e4935a998a06fceea23f1382976ef2748a -r d1de2160a4a81ac968d3bc382a778ef956a260a1 yt/visualization/fixed_resolution.py
--- a/yt/visualization/fixed_resolution.py
+++ b/yt/visualization/fixed_resolution.py
@@ -90,9 +90,9 @@
         self.axis = data_source.axis
         self.periodic = periodic
 
-        #h = getattr(data_source, "index", None)
-        #if h is not None:
-        #    h.plots.append(weakref.proxy(self))
+        ds = getattr(data_source, "pf", None)
+        if ds is not None:
+            ds.plots.append(weakref.proxy(self))
 
         # Handle periodicity, just in case
         if self.data_source.axis < 3:
@@ -349,9 +349,9 @@
         self.antialias = antialias
         self.data = {}
         
-        h = getattr(data_source, "index", None)
-        if h is not None:
-            h.plots.append(weakref.proxy(self))
+        ds = getattr(data_source, "pf", None)
+        if ds is not None:
+            ds.plots.append(weakref.proxy(self))
 
     def __getitem__(self, item) :
         if item in self.data: return self.data[item]


https://bitbucket.org/yt_analysis/yt/commits/ea182fc68fae/
Changeset:   ea182fc68fae
Branch:      yt-3.0
User:        MatthewTurk
Date:        2014-06-12 00:16:37
Summary:     Merged in ngoldbaum/yt/yt-3.0 (pull request #946)

Fixing two issues with FixedResolutionBuffer.
Affected #:  3 files

diff -r 4c6ab89b70c77a17c58535053ec4f319f71b06e3 -r ea182fc68faeecd6c8b189da3a145811f9cb150a doc/source/visualizing/manual_plotting.rst
--- a/doc/source/visualizing/manual_plotting.rst
+++ b/doc/source/visualizing/manual_plotting.rst
@@ -16,7 +16,7 @@
 packages.
 
 Note that the index object associated with your snapshot file contains a
-list of plots you've made in ``pf.h.plots``.
+list of plots you've made in ``ds.plots``.
 
 .. _fixed-resolution-buffers:
 

diff -r 4c6ab89b70c77a17c58535053ec4f319f71b06e3 -r ea182fc68faeecd6c8b189da3a145811f9cb150a yt/data_objects/data_containers.py
--- a/yt/data_objects/data_containers.py
+++ b/yt/data_objects/data_containers.py
@@ -814,7 +814,10 @@
                     "Currently we only support images centered at R=0. " +
                     "We plan to generalize this in the near future")
             from yt.visualization.fixed_resolution import CylindricalFixedResolutionBuffer
-            if iterable(width): radius = max(width)
+            if iterable(width):
+                radius = max(width)
+            else:
+                radius = width
             if iterable(resolution): resolution = max(resolution)
             frb = CylindricalFixedResolutionBuffer(self, radius, resolution)
             return frb

diff -r 4c6ab89b70c77a17c58535053ec4f319f71b06e3 -r ea182fc68faeecd6c8b189da3a145811f9cb150a yt/visualization/fixed_resolution.py
--- a/yt/visualization/fixed_resolution.py
+++ b/yt/visualization/fixed_resolution.py
@@ -90,9 +90,9 @@
         self.axis = data_source.axis
         self.periodic = periodic
 
-        #h = getattr(data_source, "index", None)
-        #if h is not None:
-        #    h.plots.append(weakref.proxy(self))
+        ds = getattr(data_source, "pf", None)
+        if ds is not None:
+            ds.plots.append(weakref.proxy(self))
 
         # Handle periodicity, just in case
         if self.data_source.axis < 3:
@@ -349,9 +349,9 @@
         self.antialias = antialias
         self.data = {}
         
-        h = getattr(data_source, "index", None)
-        if h is not None:
-            h.plots.append(weakref.proxy(self))
+        ds = getattr(data_source, "pf", None)
+        if ds is not None:
+            ds.plots.append(weakref.proxy(self))
 
     def __getitem__(self, item) :
         if item in self.data: return self.data[item]

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