[yt-svn] commit/yt: MatthewTurk: Merged in ngoldbaum/yt/yt-3.0 (pull request #913)
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Tue May 20 05:06:39 PDT 2014
1 new commit in yt:
https://bitbucket.org/yt_analysis/yt/commits/78d4ad6d2542/
Changeset: 78d4ad6d2542
Branch: yt-3.0
User: MatthewTurk
Date: 2014-05-20 14:06:33
Summary: Merged in ngoldbaum/yt/yt-3.0 (pull request #913)
Updating the cut_region docs to not use a mixed particle/fluid quantity.
Affected #: 1 file
diff -r 8057912c3b02f113b27afd252af5d21b4825757a -r 78d4ad6d25422503bf323322ab2ff8609c8da6ae doc/source/analyzing/objects.rst
--- a/doc/source/analyzing/objects.rst
+++ b/doc/source/analyzing/objects.rst
@@ -236,7 +236,7 @@
-------------------------------
Data objects can be cut by their field values using the ``cut_region``
-method. For example, this could be used to compute the total mass within
+method. For example, this could be used to compute the total gas mass within
a certain temperature range, as in the following example.
.. notebook-cell::
@@ -244,11 +244,11 @@
from yt.mods import *
ds = load("enzo_tiny_cosmology/DD0046/DD0046")
ad = ds.all_data()
- total_mass = ad.quantities.total_mass()
+ total_mass = ad.quantities.total_quantity('cell_mass')
# now select only gas with 1e5 K < T < 1e7 K.
new_region = ad.cut_region(['obj["temperature"] > 1e5',
'obj["temperature"] < 1e7'])
- cut_mass = new_region.quantities.total_mass()
+ cut_mass = new_region.quantities.total_quantity('cell_mass')
print "The fraction of mass in this temperature range is %f." % \
(cut_mass / total_mass)
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