[yt-svn] commit/yt: 2 new changesets
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Thu Aug 22 07:24:11 PDT 2013
2 new commits in yt:
https://bitbucket.org/yt_analysis/yt/commits/90adcd3925c4/
Changeset: 90adcd3925c4
Branch: yt
User: xarthisius
Date: 2013-08-22 11:34:56
Summary: Respect units and projected_units while creating known fields from translation table
Affected #: 1 file
diff -r 7e42ac327db55ab369e31419af6f40276ca58fc7 -r 90adcd3925c48c0c7beff50d642a8527c5180a54 yt/frontends/gdf/fields.py
--- a/yt/frontends/gdf/fields.py
+++ b/yt/frontends/gdf/fields.py
@@ -84,8 +84,11 @@
units=r"\rm{cm}/\rm{s}")
for f,v in log_translation_dict.items():
- add_field(f, TranslationFunc(v), take_log=True)
+ add_field(f, TranslationFunc(v), take_log=True,
+ units=KnownGDFFields[v].get_units(),
+ projected_units=KnownGDFFields[v].get_projected_units())
for f,v in translation_dict.items():
- add_field(f, TranslationFunc(v), take_log=False)
-
+ add_field(f, TranslationFunc(v), take_log=False,
+ units=KnownGDFFields[v].get_units(),
+ projected_units=KnownGDFFields[v].get_projected_units())
https://bitbucket.org/yt_analysis/yt/commits/f453938f3360/
Changeset: f453938f3360
Branch: yt
User: xarthisius
Date: 2013-08-22 11:35:56
Summary: Don't treat string as an array of chars while assinging units
Affected #: 1 file
diff -r 90adcd3925c48c0c7beff50d642a8527c5180a54 -r f453938f33603440430a81fbb5a9ad6a62bd2320 yt/frontends/gdf/data_structures.py
--- a/yt/frontends/gdf/data_structures.py
+++ b/yt/frontends/gdf/data_structures.py
@@ -203,7 +203,10 @@
else:
self.units[field_name] = 1.0
if 'field_units' in current_field.attrs:
- current_fields_unit = just_one(current_field.attrs['field_units'])
+ if type(current_field.attrs['field_units']) == str:
+ current_fields_unit = current_field.attrs['field_units']
+ else:
+ current_fields_unit = just_one(current_field.attrs['field_units'])
else:
current_fields_unit = ""
self._fieldinfo_known.add_field(field_name, function=NullFunc, take_log=False,
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