[yt-users] selecting data by refinement level

Matthew Turk matthewturk at gmail.com
Wed Jun 7 10:21:25 PDT 2017


Hi Klaus,

Whoops, I said "grid_collection" but I meant "data_collection".

-Matt

On Tue, Jun 6, 2017 at 9:18 PM, Matthew Turk <matthewturk at gmail.com> wrote:
> Hi Klaus,
>
> There are two ways to do this. The first is to create a collection of grids
> (ds.grid_collection) from grids at the refinement level you're interested
> in. But, I think this will include all points (including overlapping) which
> will give undesirable results if you just want a Max refinement or Min
> refinement.
>
> The other way would be to make a data objects as per usual, for instance
> with ds.all_data(), and before accessing any fields, set the attributes
> min_level and max_level on that object. That should restrict the selection,
> and will correctly remove overlapping points (up to max_level) if the two
> values are different.
>
> Let us know if that helps!
>
> Matt
>
> On Jun 6, 2017 6:37 PM, "Klaus Weide" <klaus at flash.uchicago.edu> wrote:
>>
>> Hi all,
>>
>> I have recently started using yt to for processing some FLASH results.
>>
>> Here is something that I think should be easy, but I haven't found an
>> obvious and simple way in the documentation. I would like to analyze only
>> cells (blocks) that are at a specific refinement level (let's say the
>> highest) and discard all other cells (blocks). Is there an interface
>> for defining a region by refinement level(s), immediately after loading an
>> AMR file?
>>
>> I know I have access to cell properties like 'dx', 'dy' and could select
>> cells based on that, but hopefully there is a more direct (and perhaps
>> more efficient) way.
>>
>> Klaus
>> _______________________________________________
>> yt-users mailing list
>> yt-users at lists.spacepope.org
>> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org



More information about the yt-users mailing list