[Yt-svn] yt-commit r1695 - trunk/yt/lagos
mturk at wrangler.dreamhost.com
mturk at wrangler.dreamhost.com
Fri Apr 23 17:17:45 PDT 2010
Author: mturk
Date: Fri Apr 23 17:17:44 2010
New Revision: 1695
URL: http://yt.enzotools.org/changeset/1695
Log:
Fixing a bug where the generated fields were not being sorted correctly in
rays. The double check for "field in self.hierarchy.field_list" was causing
fields that were not successfully created with self._generate_field to be
unsorted, but those fields that were generated successfully were already
skipped over.
Modified:
trunk/yt/lagos/BaseDataTypes.py
Modified: trunk/yt/lagos/BaseDataTypes.py
==============================================================================
--- trunk/yt/lagos/BaseDataTypes.py (original)
+++ trunk/yt/lagos/BaseDataTypes.py Fri Apr 23 17:17:44 2010
@@ -426,8 +426,10 @@
continue
if self._sortkey is None:
self._sortkey = na.argsort(self[self.sort_by])
- if (field in self.hierarchy.field_list or field == self.sort_by):
- self[field] = self[field][self._sortkey]
+ # We *always* sort the field here if we have not successfully
+ # generated it above. This way, fields that are grabbed from the
+ # grids are sorted properly.
+ self[field] = self[field][self._sortkey]
class AMROrthoRayBase(AMR1DData):
_key_fields = ['x','y','z','dx','dy','dz']
More information about the yt-svn
mailing list