[yt-users] Extracting a list of star particles, their positions and masses from enzo
Nathan Goldbaum
nathan12343 at gmail.com
Tue Mar 14 08:32:00 PDT 2017
You need to define some particle filters. Enzo only has one on-disk
particle type. Particle filters let you define new particle types based on
some filtering criterion. For Enzo it's usually sufficient to filter on the
('io', 'particle_type') field.
There is an example of adding a particle filter with enzo data in the docs
here:
http://yt-project.org/docs/dev/cookbook/calculating_information.html#using-particle-filters-to-calculate-star-formation-rates
And more information on particle filters here:
http://yt-project.org/docs/dev/analyzing/filtering.html?highlight=filter#filtering-particle-fields
The Enzo frontend does not predefine any particle fields since we don't
want to accidentally cause users to generate anaylsis or visualization
results based on a particle filter definition that does not apply to all
data types.
-Nathan
On Tue, Mar 14, 2017 at 10:28 AM, Carla Bernhardt <
carla.j.bernhardt at gmail.com> wrote:
> Nathan,
>
> Yes, of course. Here is what I tried
> <http://paste.yt-project.org/show/7082/> and here is the error message
> <http://paste.yt-project.org/show/7084/> I get. What I tried might not be
> the right way to get this list, but I was hoping someone else has done this
> before and has some insight.
>
> Best,
> Carla
>
> 2017-03-14 16:00 GMT+01:00 Nathan Goldbaum <nathan12343 at gmail.com>:
>
>> Hi Carla,
>>
>> Can you share the script you're running and the full error message and
>> traceback you're seeing? If you can, it helps if you can make your script
>> that triggers your issue as minimal as possible.
>>
>> We have the yt pastebin set up for sharing snippets of code and text:
>> paste.yt-project.org.
>>
>> -Nathan
>>
>> On Tue, Mar 14, 2017 at 2:30 AM, Carla Bernhardt <
>> carla.j.bernhardt at gmail.com> wrote:
>>
>>> Dear yt users,
>>>
>>> I am trying to extract a list of star particles and their positions and
>>> masses from enzo. This seems to be right along the lines of this
>>> tutorial <http://yt-project.org/doc/analyzing/fields.html>, but I am
>>> still stuck. If I try
>>>
>>> print(ad["dark_matter", "particle_position"])
>>> print(ad["stars", "particle_position"])
>>> print(ad["black_holes", "particle_position"])
>>>
>>> I get that none of these fields are available in my provided data. I am
>>> using Stochastic Star Formation with a MBH inserted (i.e.
>>> StarParticleCreation=514).
>>>
>>> Thanks in advance,
>>> Carla Bernhardt
>>> PhD Student
>>> Universität Heidelberg
>>> ZAH Institut für Theoretische Astrophysik
>>>
>>>
>>> _______________________________________________
>>> 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
>>
>>
>
> _______________________________________________
> 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/20170314/aaf0d92e/attachment.html>
More information about the yt-users
mailing list