[yt-users] Enzo Fields Definition -- regarding

Cameron Hummels chummels at gmail.com
Tue Jul 9 14:12:09 PDT 2013


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:

http://yt-project.org/doc/field_list.html

Cameron


On Tue, Jul 9, 2013 at 1:19 AM, Nathan Goldbaum <nathan12343 at gmail.com>wrote:

> Hi Reju,
>
> 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:
>
> >>> pf = load('DD0050/DD0050')
> >>> pf.h
>
> 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:
>
> >>> len(pf.h.field_list)
> >>> sorted(pf.h.field_list)
> >>> for f in pf.h.field_list: print f
>
> 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:
>
> >>> print pf.field_info['RadialVelocity'].get_source()
>
> 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.
>
>
> On Mon, Jul 8, 2013 at 9:48 PM, Reju Sam John <rejusamjohn at gmail.com>wrote:
>
>> Dear all,
>>
>> In yt distribution where I can find the definition of Enzo Fields that YT
>> knows (like TotalEnergy, GasEnergy, etc. ).
>>
>> Please help me.
>>
>>
>> --
>> Reju Sam John
>>
>> _______________________________________________
>> 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
>
>


-- 
Cameron Hummels
Postdoctoral Researcher
Steward Observatory
University of Arizona
http://chummels.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20130709/2e5bca5f/attachment.html>


More information about the yt-users mailing list