[yt-svn] commit/yt: ngoldbaum: Merged in jzuhone/yt (pull request #1831)
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Mon Oct 26 11:54:04 PDT 2015
1 new commit in yt:
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