<div dir="ltr">As a late addition to these responses, I would also add that there is a full listing of the defined fields in the online documentation. The fields are listed for the general yt code as well as for each simulation-code-specific field:<div>
<br></div><div><a href="http://yt-project.org/doc/field_list.html">http://yt-project.org/doc/field_list.html</a><br></div><div><br></div><div style>Cameron</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Tue, Jul 9, 2013 at 1:19 AM, Nathan Goldbaum <span dir="ltr"><<a href="mailto:nathan12343@gmail.com" target="_blank">nathan12343@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Hi Reju,<div><br></div><div>Well, that depends on your dataset, since enzo will not necessarily write the same fields to disk for every simulation. Suppose you've loaded a dataset like so:</div><div>
<br></div><div>>>> pf = load('DD0050/DD0050')</div><div>>>> pf.h</div><div><br></div><div>then pf.h.field_list will be the list of the fields that are in the dataset on disk and pf.h.derived_field_list will be the list of derived fields that are available based on pf.field_list (i.e. the list of fields enzo originally wrote to disk). These are just regular python lists, so you can count them, sort them, and iterate over them:</div>
<div><br></div><div>>>> len(pf.h.field_list)</div><div>>>> sorted(pf.h.field_list)</div><div>>>> for f in pf.h.field_list: print f</div><div><br></div><div>You might also find pf.field_info useful. This object is a mapping from field names to FieldInfo objects that contain information about fields. For example, if I wanted to know more about the RadialVelocity field, I could do:</div>
<div><br></div><div>>>> print pf.field_info['RadialVelocity'].get_source()</div><div><br></div><div>This prints out the python source code for the field. You can also just look in universal_fields.py for the same information, although sometimes it's nice to see the source for a derived field from inside a running python session.</div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote"><div class="im">On Mon, Jul 8, 2013 at 9:48 PM, Reju Sam John <span dir="ltr"><<a href="mailto:rejusamjohn@gmail.com" target="_blank">rejusamjohn@gmail.com</a>></span> wrote:<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr"><font face="arial, helvetica, sans-serif" size="4">Dear all,</font><div><font face="arial, helvetica, sans-serif" size="4"><br>
</font></div><div><font face="arial, helvetica, sans-serif" size="4">In yt distribution where I can find the definition of Enzo Fields that YT knows (like <span style="line-height:22.390625px;text-align:justify">TotalEnergy, </span><span style="line-height:22.390625px;text-align:justify">GasEnergy, etc. </span><span style="text-align:justify">). </span></font></div>
<div><span style="text-align:justify"><font face="arial, helvetica, sans-serif" size="4"><br></font></span></div><div><span style="text-align:justify"><font face="arial, helvetica, sans-serif" size="4">Please help me. </font></span></div>
<span><font color="#888888">
<div><span style="text-align:justify"><font face="arial, helvetica, sans-serif" size="4"><br></font></span></div><div><span style="text-align:justify"><font face="arial, helvetica, sans-serif" size="4"><br></font></span></div>
<div><font face="arial, helvetica, sans-serif" size="4">-- <br></font><div dir="ltr"><font face="arial, helvetica, sans-serif" size="4">Reju Sam John</font></div>
</div></font></span></div>
<br></div></div><div class="im">_______________________________________________<br>
yt-users mailing list<br>
<a href="mailto:yt-users@lists.spacepope.org" target="_blank">yt-users@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
<br></div></blockquote></div><br></div>
<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" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br>Cameron Hummels<div>Postdoctoral Researcher</div><div>Steward Observatory</div><div>University of Arizona</div><div><a href="http://chummels.org" target="_blank">http://chummels.org</a></div>
</div>