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

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Wed Jun 4 17:03:04 PDT 2014


2 new commits in yt:

https://bitbucket.org/yt_analysis/yt/commits/16498add4a6b/
Changeset:   16498add4a6b
Branch:      yt-3.0
User:        hegan
Date:        2014-06-03 21:32:24
Summary:     changes so that inline frontend can recognize particle fields
Affected #:  1 file

diff -r 80b6a3399f45da6e13828a947813cbe0e057f63d -r 16498add4a6ba8729a8e67c32d6d206c8198c258 yt/frontends/enzo/io.py
--- a/yt/frontends/enzo/io.py
+++ b/yt/frontends/enzo/io.py
@@ -235,7 +235,18 @@
         BaseIOHandler.__init__(self, pf)
 
     def _read_field_names(self, grid):
-        return [("enzo", field) for field in self.grids_in_memory[grid.id].keys()]
+        fields = []
+        add_io = "io" in grid.pf.particle_types
+        for name, v in self.grids_in_memory[grid.id].items():
+
+            # NOTE: This won't work with 1D datasets or references.
+            if not hasattr(v, "shape") or v.dtype == "O":
+                continue
+            elif v.ndim == 1:
+                if add_io: fields.append( ("io", str(name)) )
+            else:
+                fields.append( ("enzo", str(name)) )
+        return fields
 
     def _read_fluid_selection(self, chunks, selector, fields, size):
         rv = {}
@@ -296,7 +307,7 @@
                     x, y, z = self.grids_in_memory[g.id]['particle_position_x'], \
                                         self.grids_in_memory[g.id]['particle_position_y'], \
                                         self.grids_in_memory[g.id]['particle_position_z']
-                    mask = selector.select_points(x, y, z)
+                    mask = selector.select_points(x, y, z, 0.0)
                     if mask is None: continue
                     for field in field_list:
                         data = self.grids_in_memory[g.id][field]


https://bitbucket.org/yt_analysis/yt/commits/fe4b3e445a40/
Changeset:   fe4b3e445a40
Branch:      yt-3.0
User:        MatthewTurk
Date:        2014-06-05 02:02:59
Summary:     Merged in hegan/yt/yt-3.0 (pull request #931)

changes so that inline frontend can recognize particle fields
Affected #:  1 file

diff -r 094b6fc944711b4d719fb70770c8e79548bfd919 -r fe4b3e445a40ed0af3a9ce4740b88f4bb35a8a54 yt/frontends/enzo/io.py
--- a/yt/frontends/enzo/io.py
+++ b/yt/frontends/enzo/io.py
@@ -235,7 +235,18 @@
         BaseIOHandler.__init__(self, pf)
 
     def _read_field_names(self, grid):
-        return [("enzo", field) for field in self.grids_in_memory[grid.id].keys()]
+        fields = []
+        add_io = "io" in grid.pf.particle_types
+        for name, v in self.grids_in_memory[grid.id].items():
+
+            # NOTE: This won't work with 1D datasets or references.
+            if not hasattr(v, "shape") or v.dtype == "O":
+                continue
+            elif v.ndim == 1:
+                if add_io: fields.append( ("io", str(name)) )
+            else:
+                fields.append( ("enzo", str(name)) )
+        return fields
 
     def _read_fluid_selection(self, chunks, selector, fields, size):
         rv = {}
@@ -296,7 +307,7 @@
                     x, y, z = self.grids_in_memory[g.id]['particle_position_x'], \
                                         self.grids_in_memory[g.id]['particle_position_y'], \
                                         self.grids_in_memory[g.id]['particle_position_z']
-                    mask = selector.select_points(x, y, z)
+                    mask = selector.select_points(x, y, z, 0.0)
                     if mask is None: continue
                     for field in field_list:
                         data = self.grids_in_memory[g.id][field]

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