<div dir="ltr">Hi Joseph,<div><br></div><div>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.</div><div><br></div><div>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.</div><div><br></div><div>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: <a href="http://yt-project.org/doc/cookbook/calculating_information.html#using-particle-filters-to-calculate-star-formation-rates">http://yt-project.org/doc/cookbook/calculating_information.html#using-particle-filters-to-calculate-star-formation-rates</a></div><div><br></div><div>This recipe also uses 'creation_time', so you will need to define a creation_time derived field here as well.</div><div><br></div><div>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.</div><div><br></div><div>Sorry I can't offer more detailed help, unfortunately I don't have time this week to work on this in detail.</div><div><br></div><div>-Nathan</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Oct 18, 2015 at 3:06 PM, Joseph Smidt <span dir="ltr"><<a href="mailto:josephsmidt@gmail.com" target="_blank">josephsmidt@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hey everyone,<br>
<br>
    I have a gadget file from which I can extract both stellar<br>
creation time and masses.  Following the example here [1], I thought I<br>
could use the StarFormationRate routine assuming I feed it both the<br>
creation time in Myr, and masses in Msun like this [2]. (The YT part<br>
of my code is under the "YT Stuff" header.)<br>
<br>
   Unfortunately, I get this error [3] that contains "Could not find<br>
field '('all', 'creation_time')'".  But I gave it the creation time by<br>
hand and so I naively thought YT would not need to search for this<br>
array.<br>
<br>
   Is there a way to use StarFormationRate with Gadget data?  Is there<br>
something more I need to do besides feed YT arrays for both star_mass<br>
and creation_time to get StarFormationRate to work without searching<br>
for this extra field that doesn't exist in Gadget?<br>
<br>
PS.  From my error you see that I am using a development snapshot of<br>
YT 3.2.  Thanks.<br>
<br>
[1] <a href="http://yt-project.org/doc/analyzing/analysis_modules/star_analysis.html" rel="noreferrer" target="_blank">http://yt-project.org/doc/analyzing/analysis_modules/star_analysis.html</a><br>
<br>
[2] <a href="http://pastebin.com/6smMT6AA" rel="noreferrer" target="_blank">http://pastebin.com/6smMT6AA</a><br>
<br>
[3] <a href="http://pastebin.com/1Yxwam1T" rel="noreferrer" target="_blank">http://pastebin.com/1Yxwam1T</a><br>
<br>
--<br>
------------------------------------------------------------------------<br>
Joseph Smidt <<a href="mailto:josephsmidt@gmail.com">josephsmidt@gmail.com</a>><br>
<br>
Theoretical Division<br>
P.O. Box 1663, Mail Stop B283<br>
Los Alamos, NM 87545<br>
Office: <a href="tel:505-665-9752" value="+15056659752">505-665-9752</a><br>
Fax:    <a href="tel:505-667-1931" value="+15056671931">505-667-1931</a><br>
_______________________________________________<br>
yt-users mailing list<br>
<a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" rel="noreferrer" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
</blockquote></div><br></div>