Hi all again, I tried to find mass fraction of each temperature component, but I got inconsistent results as below: == dd=pf.all_data() hot=dd.cut_region(["obj['temperature'] >= 1.e4"]) wnm=dd.cut_region(["obj['temperature'] < 1.e4"]) print dd.quantities.total_mass() print wnm.quantities.total_mass()+hot.quantities.total_mass() 2.88677799841e+38 g 2.91575727709e+38 g == I can't understand why those two are different. Have any idea? Chang-Goo
Hi Chang-Goo, On Tue, May 6, 2014 at 1:50 PM, Chang-Goo Kim <cgkim@astro.princeton.edu> wrote:
Hi all again,
I tried to find mass fraction of each temperature component, but I got inconsistent results as below:
==
dd=pf.all_data()
hot=dd.cut_region(["obj['temperature'] >= 1.e4"])
wnm=dd.cut_region(["obj['temperature'] < 1.e4"])
print dd.quantities.total_mass()
print wnm.quantities.total_mass()+hot.quantities.total_mass()
The total_mass includes particle fields, which will be incorrectly cut by the cut_region. We're trying to figure out a way to make this clearer, but you should get identical results if you use the .total_quantity("cell_mass") function. This was the subject of a recent bug report and discussion, as well: https://bitbucket.org/yt_analysis/yt/issue/812/derived-quantities-on-cut_reg... I thought we'd had a pull request discussion, too, but I can't find it right now. -Matt
2.88677799841e+38 g 2.91575727709e+38 g
==
I can't understand why those two are different. Have any idea?
Chang-Goo
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
participants (2)
-
Chang-Goo Kim
-
Matthew Turk