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

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Sat Jun 29 14:07:38 PDT 2013


4 new commits in yt:

https://bitbucket.org/yt_analysis/yt/commits/985e0f1536d4/
Changeset:   985e0f1536d4
Branch:      yt
User:        xarthisius
Date:        2013-06-22 11:43:35
Summary:     [gdf] read data_software string from gdf files
Affected #:  1 file

diff -r 3a638f82a37eb6a647ca4cda18446d94a055f221 -r 985e0f1536d43881328e47c7918e0ddb762209f4 yt/frontends/gdf/data_structures.py
--- a/yt/frontends/gdf/data_structures.py
+++ b/yt/frontends/gdf/data_structures.py
@@ -214,6 +214,8 @@
 
     def _parse_parameter_file(self):
         self._handle = h5py.File(self.parameter_filename, "r")
+        self.data_software = \
+                self._handle['gridded_data_format'].attrs['data_software']
         sp = self._handle["/simulation_parameters"].attrs
         self.domain_left_edge = sp["domain_left_edge"][:]
         self.domain_right_edge = sp["domain_right_edge"][:]


https://bitbucket.org/yt_analysis/yt/commits/3eec3d114f2d/
Changeset:   3eec3d114f2d
Branch:      yt
User:        xarthisius
Date:        2013-06-22 11:44:08
Summary:     [gdf] don't reduce dds to 1 for nonexisting dimensions for Piernik, as it breaks 2D data handling
Affected #:  1 file

diff -r 985e0f1536d43881328e47c7918e0ddb762209f4 -r 3eec3d114f2da8bb99d7bc09837049399ea4d9cc yt/frontends/gdf/data_structures.py
--- a/yt/frontends/gdf/data_structures.py
+++ b/yt/frontends/gdf/data_structures.py
@@ -74,8 +74,9 @@
             LE, RE = self.hierarchy.grid_left_edge[id,:], \
                      self.hierarchy.grid_right_edge[id,:]
             self.dds = np.array((RE-LE)/self.ActiveDimensions)
-        if self.pf.dimensionality < 2: self.dds[1] = 1.0
-        if self.pf.dimensionality < 3: self.dds[2] = 1.0
+        if self.pf.data_software != "piernik":
+            if self.pf.dimensionality < 2: self.dds[1] = 1.0
+            if self.pf.dimensionality < 3: self.dds[2] = 1.0
         self.field_data['dx'], self.field_data['dy'], self.field_data['dz'] = self.dds
 
 class GDFHierarchy(AMRHierarchy):


https://bitbucket.org/yt_analysis/yt/commits/3fa604abdc65/
Changeset:   3fa604abdc65
Branch:      yt
User:        xarthisius
Date:        2013-06-22 15:45:27
Summary:     [gdf] provide sane default for 'data_software' since it is an optional attribute. Thanks Matt!
Affected #:  1 file

diff -r 3eec3d114f2da8bb99d7bc09837049399ea4d9cc -r 3fa604abdc651b5bb46bd3e33b971fa9857040cb yt/frontends/gdf/data_structures.py
--- a/yt/frontends/gdf/data_structures.py
+++ b/yt/frontends/gdf/data_structures.py
@@ -215,8 +215,11 @@
 
     def _parse_parameter_file(self):
         self._handle = h5py.File(self.parameter_filename, "r")
-        self.data_software = \
+        if 'data_software' in self._handle['gridded_data_format'].attrs:
+            self.data_software = \
                 self._handle['gridded_data_format'].attrs['data_software']
+        else:
+            self.data_software = "unknown"
         sp = self._handle["/simulation_parameters"].attrs
         self.domain_left_edge = sp["domain_left_edge"][:]
         self.domain_right_edge = sp["domain_right_edge"][:]


https://bitbucket.org/yt_analysis/yt/commits/62e723e2f60c/
Changeset:   62e723e2f60c
Branch:      yt
User:        MatthewTurk
Date:        2013-06-29 23:07:35
Summary:     Merged in xarthisius/yt (pull request #535)

Fix 2D data handling for PIERNIK
Affected #:  1 file

diff -r 8e8bd5b353df99c1510058a7c982329e5212fcfe -r 62e723e2f60c980f48fca5f76f5fdd8862945b98 yt/frontends/gdf/data_structures.py
--- a/yt/frontends/gdf/data_structures.py
+++ b/yt/frontends/gdf/data_structures.py
@@ -74,8 +74,9 @@
             LE, RE = self.hierarchy.grid_left_edge[id,:], \
                      self.hierarchy.grid_right_edge[id,:]
             self.dds = np.array((RE-LE)/self.ActiveDimensions)
-        if self.pf.dimensionality < 2: self.dds[1] = 1.0
-        if self.pf.dimensionality < 3: self.dds[2] = 1.0
+        if self.pf.data_software != "piernik":
+            if self.pf.dimensionality < 2: self.dds[1] = 1.0
+            if self.pf.dimensionality < 3: self.dds[2] = 1.0
         self.field_data['dx'], self.field_data['dy'], self.field_data['dz'] = self.dds
 
 class GDFHierarchy(AMRHierarchy):
@@ -214,6 +215,11 @@
 
     def _parse_parameter_file(self):
         self._handle = h5py.File(self.parameter_filename, "r")
+        if 'data_software' in self._handle['gridded_data_format'].attrs:
+            self.data_software = \
+                self._handle['gridded_data_format'].attrs['data_software']
+        else:
+            self.data_software = "unknown"
         sp = self._handle["/simulation_parameters"].attrs
         self.domain_left_edge = sp["domain_left_edge"][:]
         self.domain_right_edge = sp["domain_right_edge"][:]

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