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

mturk at wrangler.dreamhost.com mturk at wrangler.dreamhost.com
Wed Jun 4 09:10:37 PDT 2008


Author: mturk
Date: Wed Jun  4 09:10:36 2008
New Revision: 527
URL: http://yt.spacepope.org/changeset/527

Log:
Added a progress bar to the binner...



Modified:
   trunk/yt/lagos/Profiles.py

Modified: trunk/yt/lagos/Profiles.py
==============================================================================
--- trunk/yt/lagos/Profiles.py	(original)
+++ trunk/yt/lagos/Profiles.py	Wed Jun  4 09:10:36 2008
@@ -54,7 +54,9 @@
             data[field] = self._get_empty_field()
             weight_data[field] = self._get_empty_field()
         used = self._get_empty_field().astype('bool')
-        for grid in self._data_source._grids:
+        pbar = get_pbar('Binning grids', len(self._data_source._grids))
+        for gi,grid in enumerate(self._data_source._grids):
+            pbar.update(gi)
             mylog.debug("Binner adding fields from grid %s", grid)
             args = self._get_bins(grid, check_cut=True)
             if not args:
@@ -66,6 +68,7 @@
                 weight_data[field] += w
                 used = (used | u)
             grid.clear_data()
+        pbar.finish()
         ub = na.where(used)
         for field in fields:
             if weight:



More information about the yt-svn mailing list