[yt-users] Density / DMDensity

Nathan Goldbaum nathan12343 at gmail.com
Wed Oct 11 13:24:26 PDT 2017


OK, in that case I wouldn't try to infer the stellar mass from the
Dark_Matter_Density field (which does include stellar mass despite the
name), instead I would define a particle filter for stars (
http://yt-project.org/doc/analyzing/filtering.html#filtering-particle-fields)
and then use the new particle type defined by the filter to create a
deposited particle field (
http://yt-project.org/doc/analyzing/fields.html#deposited-particle-fields).

There's an example in the docs for how to do this with Tipsy data here:
http://yt-project.org/doc/cookbook/constructing_data_objects.html#creating-particle-filters

For Enzo, you should use the particle_type field to create the filter -
star particles in Enzo have particle_type equal to 2. Here's a short worked
example:

https://gist.github.com/anonymous/acd4007dbff283fc3587a47e8ba41dc3

Hope that helps! And I hope to hear more from you - your name is
particularly well suited to the yt project ;)

-Nathan


On Wed, Oct 11, 2017 at 12:58 PM, tyuta <y0u1t1a5.t at gmail.com> wrote:

> Yes, it's Enzo data.
>
> 2017-10-11 10:17 GMT-04:00 Nathan Goldbaum <nathan12343 at gmail.com>:
>
>> What simulation code are you working with? From the field names it sounds
>> like Enzo data.
>>
>> On Wed, Oct 11, 2017 at 9:13 AM tyuta <y0u1t1a5.t at gmail.com> wrote:
>>
>>> Dear yt-users,
>>>
>>> Hi, I'm a new user of yt. I have a question about the default 'Density'
>>> field and 'Dark_Matter_Density' field. Do they contain stellar mass? If so,
>>> how can I read and subtract stellar mass from the data?
>>>
>>> Sincerely,
>>> Y.T.
>>> _______________________________________________
>>> 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/20171011/050f8779/attachment.html>


More information about the yt-users mailing list