Hi Kuo-Chuan,

The trick is to generate a slice data object and then use that data object to create the SlicePlot:

    import yt

    ds = yt.load('IsolatedGalaxy/galaxy0030/galaxy0030')

    slc = ds.slice('x', 0.5)
    slc.max_level = 2

    plot = slc.to_pw('density')

This will generate a plot of 'density' sampled at a maximum AMR level of 2:


Note that all yt data objects support both a min_level and max_level attribute to control the levels at which data selection happens.

Hope that helps,


On Wed, Mar 21, 2018 at 10:01 AM, Kuo-Chuan Pan <astroodie@gmail.com> wrote:
Dear all,

Is there a simple way to create a data set with lower AMR levels?
something like:
ds = yt.load(fname, max_level=3)

I knew that there is an example to down sample for volume rendering with AMRKDTree,
but I don't know how to create a downsample data set which can be analysis and plot with SlicePlot, for example.

Many thanks,
yt-users mailing list -- yt-users@python.org
To unsubscribe send an email to yt-users-leave@python.org