[yt-users] YT-3.3.1 : selecting cells in a sphere

Nathan Goldbaum nathan12343 at gmail.com
Thu Oct 27 13:37:16 PDT 2016


On Thu, Oct 27, 2016 at 3:26 PM, Vincent Picouet <
vincent.picouet at student.ecp.fr> wrote:

> Hi,
>
> I am getting an issue with a very basic YT code:
>
> I am using the 3.3.1 version and I can not access the cells contained in a
> sphere (it returns all the cells of the ENZO simulation):
> The YT cookbook explains that to access the different fields (for example
> the x position) of the cells contained in a sphere one must code :
> ds.sphere[(0.5,0.5,0.5),0.1)][‘x’] …
>

Are you sure this is the exact code you're using? I think this is a syntax
error.

Here's a copy/paste of an interactive session I just went though using yt
3.3.1 and a test Enzo dataset we have on yt-project.org/data:

http://paste.yt-project.org/show/6904/

If you follow along with that, do you get that ad['x'].shape and
sph['x'].shape are the same?

-Nathan



> But it gives me exactly the same results of ds.all_data().[‘x’] which is a
> 100M cells’ list.
> Do you have an idea about selecting only the sphere region easily?
>
> Thanks
>
> Vincent
> _______________________________________________
> 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/20161027/8dfbc921/attachment.htm>


More information about the yt-users mailing list