[yt-users] find_point function with EnzoDataset

Nathan Goldbaum nathan12343 at gmail.com
Fri Jun 16 05:59:57 PDT 2017


Hi Carla,

First, apologies for the frustration. You've run across a place in the docs
that is out of date and unfortunately contains incorrect information due to
an API change a while ago. In the best of all possible worlds our docs
would always be up-to-date. Unfortunately sometimes stuff slips through the
cracks. Thanks so much for reporting the issue, which will ensure that it
gets fixed for future users of the library.

Here is a code snippet that does what you want:

point = ds.point(coord)
max_amr_level = point['grid_level']

Coord must be either a YTArray or a 3-element iterable. If it's not a
YTArray then the point is assumed to be in code units.

I've filed an issue here to mark that the documentation you ran into is out
of date, it will be updated by the next release:

https://github.com/yt-project/yt/issues/1455

-Nathan

On Fri, Jun 16, 2017 at 3:37 AM, Carla Bernhardt <
carla.j.bernhardt at gmail.com> wrote:

> Hi yt-users,
>
> I am trying to use the find_point() function as described as a low-level
> data inspection example here
> <http://yt-project.org/doc/examining/low_level_inspection.html#finding-data-at-fixed-points>.
> However, when I try the given example, I get this error:
> >>> gs,gi=ds.find_point((0.5, 0.5, 0.5))
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
> AttributeError: 'EnzoDataset' object has no attribute 'find_point'
>
> If this function doesn't work with an EnzoDataset, what does it work with?
> I am ultimately trying to find the highest AMR level at a given point.
>
> Cheers,
> Carla Bernhardt
> PhD Student
> ZAH Institut für Theoretische Astrophysik
> Universität Heidelberg
>
> _______________________________________________
> 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/20170616/20236aea/attachment.html>


More information about the yt-users mailing list