[yt-users] Downsampling AMR data for plotting isocontours

Daniel Fenn dsfenn at gmail.com
Thu Jul 28 12:59:12 PDT 2016


Thank you, Nathan. That worked perfectly! I didn't realize it would be so
simple.

Thanks again,

Dan

2016-07-28 15:33 GMT-04:00 Nathan Goldbaum <nathan12343 at gmail.com>:

> Hi Dan,
>
> I think you should be able to set the max_level attribute on the data
> object you're creating the surface from. Here's an example:
>
>     import yt
>     ds = yt.load('IsolatedGalaxy/galaxy0030/galaxy0030')
>     ad = ds.all_data()
>     ad.max_level = 6
>     ds.surface(ad, 'density', 5e-27)
>     surf = ds.surface(ad, 'density', 5e-27)
>
> You can then export the surface if you want (I used export_ply) to verify
> that that degrading the resolution produces a reasonable low-resolution
> representation:
>
> http://imgur.com/a/WkOjA
>
> Here I'm using meshlab to view the surfaces outside of yt after exporting
> them to ply files. The left-hand one has max_level = 4, the right-hand one
> is with no max_level.
>
> -Nathan
>
>
> On Thu, Jul 28, 2016 at 2:05 PM, Daniel Fenn <dsfenn at gmail.com> wrote:
>
>> Hi,
>>
>> I'm trying to figure out the best way to downsample FLASH AMR data for
>> making isocontours. I'd like to be able to specify the maximum refinement
>> level that should be used for creating the isocontours.
>>
>> My first thought was to use a covering grid, but I'm uncertain how to use
>> that to create a YTSurface object.
>>
>> If anyone can offer any suggestions, I'd appreciate it.
>>
>> Thanks,
>>
>> Dan
>>
>> _______________________________________________
>> yt-users mailing list
>> yt-users at lists.spacepope.org
>> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>>
>>
>
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20160728/2d1cb527/attachment.htm>


More information about the yt-users mailing list