Hi Elizabeth,
On Wed, Jan 16, 2013 at 9:57 AM, Elizabeth Tasker
Hi,
I'm working with Nick Gnedin on looking at the density properties of my galaxy on different AMR levels.
For this, we'd like to grab all the cells on one AMR level, divide them so that they have a fixed cell size and output.
I'm not entirely sure I understand this process... :(
Is there a quick way of doing this in yt?
I *think* the answer will be no, since (for example) covering_grid will grab the best data available to make the mesh, not just the data from a single level. Is that right? We specifically need to avoid interpolation.
If so, probably it's easiest just to grab the cells on one level via:
gridnum = [g for g in pf.h.grids if g.Level == l]
You can also do this with pf.h.select_grids( level )
then divide them into the right size. Is there a way of passing a grid to covering_grid to make it a particular size? i.e. something like:
for g in gridnum: grid_fixedcellsize = g.covering_grid(......)
Covering grids go up to a given level, specified in the constructor, which might accomplish what you're looking for; i.e., you specify a left edge, a level (which fixes the dx) and a dimensionality (which fixes the right_edge). What you are describing here is similar to what's done if you do: g.retrieve_ghost_zones( N, [field_list], smoothed = False) You can also explore grid_collection, which accepts any list of grids and then returns a data object. If you describe a bit more exactly the format you want to get out, perhaps I can give a better example? I think what you're describing is probably doable, I'm just not sure precisely what it will look like so I can't quite envision it. -Matt
Elizabeth
_______________________________________________ yt-dev mailing list yt-dev@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org