[yt-users] Star formation rate with Gadget input

Nathan Goldbaum nathan12343 at gmail.com
Mon Oct 19 10:24:44 PDT 2015


Hi Joseph,

As far as I'm aware, the star analysis analysis module has only been used
with Enzo data. Indeed, 'creation_time' is a field that is normally defined
for Enzo datasets with star particles.

The solution to get past this point is going to be to define a
'creation_time' derived field that returns what yt is expecting for your
Gadget data.

In addition, you might also have success calculating the star formation
rate 'by hand' without using the star_analysis analysis module following
e.g. this cookbook recipe:
http://yt-project.org/doc/cookbook/calculating_information.html#using-particle-filters-to-calculate-star-formation-rates

This recipe also uses 'creation_time', so you will need to define a
creation_time derived field here as well.

Finally, if you do end up successfully using the star_analysis module and
need to make modifications to yt to get it working, a pull request would be
very much appreciated.

Sorry I can't offer more detailed help, unfortunately I don't have time
this week to work on this in detail.

-Nathan

On Sun, Oct 18, 2015 at 3:06 PM, Joseph Smidt <josephsmidt at gmail.com> wrote:

> Hey everyone,
>
>     I have a gadget file from which I can extract both stellar
> creation time and masses.  Following the example here [1], I thought I
> could use the StarFormationRate routine assuming I feed it both the
> creation time in Myr, and masses in Msun like this [2]. (The YT part
> of my code is under the "YT Stuff" header.)
>
>    Unfortunately, I get this error [3] that contains "Could not find
> field '('all', 'creation_time')'".  But I gave it the creation time by
> hand and so I naively thought YT would not need to search for this
> array.
>
>    Is there a way to use StarFormationRate with Gadget data?  Is there
> something more I need to do besides feed YT arrays for both star_mass
> and creation_time to get StarFormationRate to work without searching
> for this extra field that doesn't exist in Gadget?
>
> PS.  From my error you see that I am using a development snapshot of
> YT 3.2.  Thanks.
>
> [1]
> http://yt-project.org/doc/analyzing/analysis_modules/star_analysis.html
>
> [2] http://pastebin.com/6smMT6AA
>
> [3] http://pastebin.com/1Yxwam1T
>
> --
> ------------------------------------------------------------------------
> Joseph Smidt <josephsmidt at gmail.com>
>
> Theoretical Division
> P.O. Box 1663, Mail Stop B283
> Los Alamos, NM 87545
> Office: 505-665-9752
> Fax:    505-667-1931
> _______________________________________________
> 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/20151019/d52e2819/attachment.html>


More information about the yt-users mailing list