Re: [yt-users] cannot SlicePlot() using cut_region() filter on data from yt.load_uniform_grid()

Hi Nathan, Here is a script whose output will show the same problem. I'm using version 3.4.0 -------------------- import yt import numpy as np arr = np.random.random(size=(41,56,47)) data = dict(density = (arr,"g/cm**3")) bbox = np.array([[-4.0,4.2],[-5.5,5.7],[-4.175872,5.22413]]) ds = yt.load_uniform_grid(data, arr.shape, length_unit="cm", bbox=bbox) ad = ds.all_data() print ad.quantities.extrema([("gas", "density")]) den = ad.cut_region(['obj["density"] > 0.0']) print den.quantities.extrema([("gas", "density")]) p = yt.SlicePlot(ds, 'x','density', center="m", data_source=den) ---------------------- thanks for investigating, Dale

Hi Dale, I was able to reproduce the issue and have filed a ticket: https://github.com/yt-project/yt/issues/1646 I'm going to try to look closer at this issue this afternoon. To get updates to that ticket, click the "subscribe" button. Let's move discussion to github from here. -Nathan On Sun, Dec 10, 2017 at 11:43 PM, Dale Braden <genghis17@comcast.net> wrote:
Hi Nathan,
Here is a script whose output will show the same problem. I'm using version 3.4.0
-------------------- import yt import numpy as np
arr = np.random.random(size=(41,56,47)) data = dict(density = (arr,"g/cm**3")) bbox = np.array([[-4.0,4.2],[-5.5,5.7],[-4.175872,5.22413]]) ds = yt.load_uniform_grid(data, arr.shape, length_unit="cm", bbox=bbox)
ad = ds.all_data() print ad.quantities.extrema([("gas", "density")])
den = ad.cut_region(['obj["density"] > 0.0']) print den.quantities.extrema([("gas", "density")])
p = yt.SlicePlot(ds, 'x','density', center="m", data_source=den) ----------------------
thanks for investigating,
Dale _______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
participants (2)
-
Dale Braden
-
Nathan Goldbaum