[Yt-svn] commit/yt: MatthewTurk: Adding a check for "Density" to "yt stats"

Bitbucket commits-noreply at bitbucket.org
Fri Jun 10 07:04:22 PDT 2011


1 new changeset in yt:

http://bitbucket.org/yt_analysis/yt/changeset/9d3f293a1c07/
changeset:   9d3f293a1c07
branch:      yt
user:        MatthewTurk
date:        2011-06-10 16:01:10
summary:     Adding a check for "Density" to "yt stats"
affected #:  1 file (45 bytes)

--- a/yt/utilities/command_line.py	Fri Jun 10 01:15:28 2011 -0700
+++ b/yt/utilities/command_line.py	Fri Jun 10 07:01:10 2011 -0700
@@ -556,7 +556,8 @@
         """
         pf = _fix_pf(arg)
         pf.h.print_stats()
-        v, c = pf.h.find_max("Density")
+        if "Density" in pf.h.field_list:
+            v, c = pf.h.find_max("Density")
         print "Maximum density: %0.5e at %s" % (v, c)
         if opts.output is not None:
             t = pf.current_time * pf['years']

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