[yt-svn] commit/yt-3.0: MatthewTurk: A few minor fixes, including the most important one of how the QuadProj is

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Thu Jun 13 12:29:19 PDT 2013


1 new commit in yt-3.0:

https://bitbucket.org/yt_analysis/yt-3.0/commits/266b7da460ae/
Changeset:   266b7da460ae
Branch:      yt-3.0
User:        MatthewTurk
Date:        2013-06-13 21:20:23
Summary:     A few minor fixes, including the most important one of how the QuadProj is
initialized on a chunk-by-chunk basis.
Affected #:  1 file

diff -r 958e5e2c321e930877cd3b554a979ec16213742e -r 266b7da460ae2be60f36d5713ec6676ce46e9c7c yt/data_objects/construction_data_containers.py
--- a/yt/data_objects/construction_data_containers.py
+++ b/yt/data_objects/construction_data_containers.py
@@ -281,7 +281,7 @@
             chunk_fields.append(self.weight_field)
         tree = self._get_tree(len(fields))
         # We do this once
-        for chunk in self.data_source.chunks(None, "io"):
+        for chunk in self.data_source.chunks([], "io"):
             self._initialize_chunk(chunk, tree)
         # This needs to be parallel_objects-ified
         for chunk in parallel_objects(self.data_source.chunks(
@@ -335,8 +335,8 @@
 
     def _initialize_chunk(self, chunk, tree):
         icoords = chunk.icoords
-        i1 = icoords[:,0]
-        i2 = icoords[:,1]
+        i1 = icoords[:,x_dict[self.axis]]
+        i2 = icoords[:,y_dict[self.axis]]
         ilevel = chunk.ires
         tree.initialize_chunk(i1, i2, ilevel)
 
@@ -430,6 +430,7 @@
         self._data_source.max_level = self.level
 
     def get_data(self, fields = None):
+        if fields is None: return
         fields = self._determine_fields(ensure_list(fields))
         fields_to_get = [f for f in fields if f not in self.field_data]
         fields_to_get = self._identify_dependencies(fields_to_get)

Repository URL: https://bitbucket.org/yt_analysis/yt-3.0/

--

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