no change even if cut through np.median(dense_ad["x"].in_units("code_length"))_______________________________________________2020年9月3日(木) 22:49 Matthew Turk <matthewturk@gmail.com>:Hi Akimi,I think I might have an idea why it's not working, which I probably should have thought of before. Is it possible that the slice center specified does not pass through any of these cells? What happens if you supply a center where the x value (the direction you're slicing along) is chosen as, say, np.median(dense_ad["x"].in_units("code_length")) ?_______________________________________________On Wed, Sep 2, 2020 at 11:17 PM Fujita, Akimi <fujitaa@shinshu-u.ac.jp> wrote:Thank you for your quick response.ad = ds.all_data()
dense_ad =ad.cut_region(['(obj["Density"].in_cgs() >= 0)'])
print(dense_ad["ones"].size)189404dense_ad = ad.cut_region(["obj['Density'].in_cgs() < 0"])
print(dense_ad["ones"].size)0I hope this helps you to fix the problem. thank you.Akimi_______________________________________________2020年9月3日(木) 3:22 Matthew Turk <matthewturk@gmail.com>:Hi,This is indeed odd! It's possible that the cut region is causing some oddness. Can you try doing this, and telling us how it looks?print(dense_ad["ones"].size)The other thing to look at would be:dense_ad = ad.cut_region(["obj['Density'] < 0"])print(dense_ad["ones"].size)Since that's the complement, we'd expect it to return something.It's also possible, but I would defer to Britton Smith on this (since he did the cut region work), that the comparison being executed is ignoring units, and potentially silently failing._______________________________________________On Wed, Sep 2, 2020 at 1:18 PM <fujitaa@shinshu-u.ac.jp> wrote:Hello,
data_source in SlicePlot does not work (data_source in ProjectionPlot works). Would you explain how to enable it or fix the problem?
ds= yt.load("../DD2000/jf2000")
ad = ds.all_data()
dense_ad = ad.cut_region(["obj['Density'] >= 0"])
p = yt.SlicePlot(ds, 'x',"density",center=[6.5536/2, 6.5536/2,(15.5/2+2.5)],origin=["lower", "center", "domain"]
,data_source=dense_ad )
I chose 0 so that it will pick up all the gas but it does not.
There is no error message. It just does not show anything much in the figure. How can I attach figures here?
_______________________________________________
yt-users mailing list -- yt-users@python.org
To unsubscribe send an email to yt-users-leave@python.org
https://mail.python.org/mailman3/lists/yt-users.python.org/
Member address: matthewturk@gmail.com
yt-users mailing list -- yt-users@python.org
To unsubscribe send an email to yt-users-leave@python.org
https://mail.python.org/mailman3/lists/yt-users.python.org/
Member address: fujitaa@shinshu-u.ac.jp
yt-users mailing list -- yt-users@python.org
To unsubscribe send an email to yt-users-leave@python.org
https://mail.python.org/mailman3/lists/yt-users.python.org/
Member address: matthewturk@gmail.com
yt-users mailing list -- yt-users@python.org
To unsubscribe send an email to yt-users-leave@python.org
https://mail.python.org/mailman3/lists/yt-users.python.org/
Member address: fujitaa@shinshu-u.ac.jp
yt-users mailing list -- yt-users@python.org
To unsubscribe send an email to yt-users-leave@python.org
https://mail.python.org/mailman3/lists/yt-users.python.org/
Member address: stonnes@gmail.com