[yt-users] Enzo Fields Definition -- regarding

Nathan Goldbaum nathan12343 at gmail.com
Mon Jul 8 22:19:11 PDT 2013


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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20130708/b5c4977f/attachment.htm>


More information about the yt-users mailing list