[Yt-svn] yt-commit r1423 - trunk/yt/lagos

britton at wrangler.dreamhost.com britton at wrangler.dreamhost.com
Wed Sep 2 15:20:41 PDT 2009


Author: britton
Date: Wed Sep  2 15:20:40 2009
New Revision: 1423
URL: http://yt.spacepope.org/changeset/1423

Log:
The profiles write_out routine was writing the header with the list of fields 
in an incorrect order, because the bin field was not removed from the list 
before writing, but is removed before writing the actual data so that it can 
be the first column.  This is now fixed so that the bin field name is written 
out first in the header to match the actual data.


Modified:
   trunk/yt/lagos/Profiles.py

Modified: trunk/yt/lagos/Profiles.py
==============================================================================
--- trunk/yt/lagos/Profiles.py	(original)
+++ trunk/yt/lagos/Profiles.py	Wed Sep  2 15:20:40 2009
@@ -298,8 +298,8 @@
         '''
         fid = open(filename,"w")
         fields = [field for field in sorted(self._data.keys()) if field != "UsedBins"]
-        fid.write("\t".join(["#"] + fields + ["\n"]))
         fields.remove(self.bin_field)
+        fid.write("\t".join(["#"] + [self.bin_field] + fields + ["\n"]))
 
         field_data = na.array(self.choose_bins(bin_style)) 
         if bin_style is 'both':



More information about the yt-svn mailing list