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

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Mon Oct 26 11:54:01 PDT 2015


4 new commits in yt:

https://bitbucket.org/yt_analysis/yt/commits/acb90547f0d7/
Changeset:   acb90547f0d7
Branch:      yt
User:        jzuhone
Date:        2015-10-25 14:16:24+00:00
Summary:     Make sure we set the velocity unit
Affected #:  1 file

diff -r a5d76f647fbb9a740e21cf5d8269660aea6736cc -r acb90547f0d72799ca44a56cca01abe9fed398ad yt/frontends/athena/data_structures.py
--- a/yt/frontends/athena/data_structures.py
+++ b/yt/frontends/athena/data_structures.py
@@ -489,12 +489,15 @@
     def set_code_units(self):
         super(AthenaDataset, self).set_code_units()
         mag_unit = getattr(self, "magnetic_unit", None)
+        vel_unit = getattr(self, "magnetic_unit", None)
         if mag_unit is None:
             self.magnetic_unit = np.sqrt(4*np.pi * self.mass_unit /
                                          (self.time_unit**2 * self.length_unit))
         self.magnetic_unit.convert_to_units("gauss")
-
         self.unit_registry.modify("code_magnetic", self.magnetic_unit)
+        if vel_unit is None:
+            self.velocity_unit = self.length_unit/self.time_unit
+        self.unit_registry.modify("code_velocity", self.velocity_unit)
 
     def _parse_parameter_file(self):
         self._handle = open(self.parameter_filename, "rb")


https://bitbucket.org/yt_analysis/yt/commits/fbaa5d9e2ef1/
Changeset:   fbaa5d9e2ef1
Branch:      yt
User:        jzuhone
Date:        2015-10-25 14:16:42+00:00
Summary:     Decode this for Python 3
Affected #:  1 file

diff -r acb90547f0d72799ca44a56cca01abe9fed398ad -r fbaa5d9e2ef11b6defeb22888696156230b19ebe yt/frontends/gdf/data_structures.py
--- a/yt/frontends/gdf/data_structures.py
+++ b/yt/frontends/gdf/data_structures.py
@@ -200,7 +200,7 @@
                 else:
                     current_field_units = \
                         just_one(current_field.attrs['field_units'])
-                self.field_units[field_name] = current_field_units
+                self.field_units[field_name] = current_field_units.decode("utf8")
             else:
                 self.field_units[field_name] = ""
 


https://bitbucket.org/yt_analysis/yt/commits/935ac0ec2111/
Changeset:   935ac0ec2111
Branch:      yt
User:        jzuhone
Date:        2015-10-25 14:18:24+00:00
Summary:     Oops
Affected #:  1 file

diff -r fbaa5d9e2ef11b6defeb22888696156230b19ebe -r 935ac0ec21110270342a5cb452f6f12ff1c91169 yt/frontends/athena/data_structures.py
--- a/yt/frontends/athena/data_structures.py
+++ b/yt/frontends/athena/data_structures.py
@@ -489,7 +489,7 @@
     def set_code_units(self):
         super(AthenaDataset, self).set_code_units()
         mag_unit = getattr(self, "magnetic_unit", None)
-        vel_unit = getattr(self, "magnetic_unit", None)
+        vel_unit = getattr(self, "velocity_unit", None)
         if mag_unit is None:
             self.magnetic_unit = np.sqrt(4*np.pi * self.mass_unit /
                                          (self.time_unit**2 * self.length_unit))


https://bitbucket.org/yt_analysis/yt/commits/0de661aae1fa/
Changeset:   0de661aae1fa
Branch:      yt
User:        ngoldbaum
Date:        2015-10-26 18:53:53+00:00
Summary:     Merged in jzuhone/yt (pull request #1831)

[bugfix] an Athena and a GDF bugfix
Affected #:  2 files

diff -r 2b6c44d4b501ef1e4fc55959f978ce596cf747c5 -r 0de661aae1faf32e535097b8f4557ac5e7f2a5a9 yt/frontends/athena/data_structures.py
--- a/yt/frontends/athena/data_structures.py
+++ b/yt/frontends/athena/data_structures.py
@@ -489,12 +489,15 @@
     def set_code_units(self):
         super(AthenaDataset, self).set_code_units()
         mag_unit = getattr(self, "magnetic_unit", None)
+        vel_unit = getattr(self, "velocity_unit", None)
         if mag_unit is None:
             self.magnetic_unit = np.sqrt(4*np.pi * self.mass_unit /
                                          (self.time_unit**2 * self.length_unit))
         self.magnetic_unit.convert_to_units("gauss")
-
         self.unit_registry.modify("code_magnetic", self.magnetic_unit)
+        if vel_unit is None:
+            self.velocity_unit = self.length_unit/self.time_unit
+        self.unit_registry.modify("code_velocity", self.velocity_unit)
 
     def _parse_parameter_file(self):
         self._handle = open(self.parameter_filename, "rb")

diff -r 2b6c44d4b501ef1e4fc55959f978ce596cf747c5 -r 0de661aae1faf32e535097b8f4557ac5e7f2a5a9 yt/frontends/gdf/data_structures.py
--- a/yt/frontends/gdf/data_structures.py
+++ b/yt/frontends/gdf/data_structures.py
@@ -200,7 +200,7 @@
                 else:
                     current_field_units = \
                         just_one(current_field.attrs['field_units'])
-                self.field_units[field_name] = current_field_units
+                self.field_units[field_name] = current_field_units.decode("utf8")
             else:
                 self.field_units[field_name] = ""

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