[Yt-svn] commit/yt: MatthewTurk: Adding another check for CellVolume / CellMass in the standalone profiler

Bitbucket commits-noreply at bitbucket.org
Wed May 25 19:09:38 PDT 2011


1 new changeset in yt:

http://bitbucket.org/yt_analysis/yt/changeset/6309a0d544d4/
changeset:   r4289:6309a0d544d4
branch:      yt
user:        MatthewTurk
date:        2011-05-26 04:09:31
summary:     Adding another check for CellVolume / CellMass in the standalone profiler
affected #:  1 file (236 bytes)

--- a/yt/visualization/profile_plotter.py	Wed May 25 00:37:32 2011 -0400
+++ b/yt/visualization/profile_plotter.py	Wed May 25 19:09:31 2011 -0700
@@ -268,7 +268,10 @@
                                   y_bins, field_y, y_min, y_max, y_log,
                                   lazy_reader)
         # This is a fallback, in case we forget.
-        if field_z == "CellMassMsun": weight = None
+        if field_z.startswith("CellMass") or \
+           field_z.startswith("CellVolume"):
+            mylog.warning("Setting weight to None")
+            weight = None
         profile.add_fields(field_z, weight=weight, accumulation=accumulation, fractional=fractional)
         self._current_field = field_z
         self.profile = profile
@@ -392,7 +395,10 @@
                                   x_bins, field_x, x_min, x_max, x_log,
                                   lazy_reader)
         # This is a fallback, in case we forget.
-        if field_y == "CellMassMsun": weight = None
+        if field_y.startswith("CellMass") or \
+           field_y.startswith("CellVolume"):
+            mylog.warning("Setting weight to None")
+            weight = None
         profile.add_fields(field_y, weight=weight, accumulation=accumulation, fractional=fractional)
         self._current_field = field_y
         self.profile = profile

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