Enzo Fields Definition -- regarding
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
Hi Reju,
The Enzo-specific fields, including TotalEnergy and GasEnergy, are defined
in yt-hg/yt/frontends/enzo/fields.py. There is also
yt-hg/yt/data_objects/universal_fields.py, which contains some field
definitions (like 'CellMass') common to all the frontends.
-Andrew
On Mon, Jul 8, 2013 at 9:48 PM, Reju Sam John
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@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
Thank You very much...
On Tue, Jul 9, 2013 at 10:40 AM, Andrew Myers
Hi Reju,
The Enzo-specific fields, including TotalEnergy and GasEnergy, are defined in yt-hg/yt/frontends/enzo/fields.py. There is also yt-hg/yt/data_objects/universal_fields.py, which contains some field definitions (like 'CellMass') common to all the frontends.
-Andrew
On Mon, Jul 8, 2013 at 9:48 PM, Reju Sam John
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@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
-- Reju Sam John
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
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@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
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
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
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@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
_______________________________________________ yt-users mailing list yt-users@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
participants (4)
-
Andrew Myers
-
Cameron Hummels
-
Nathan Goldbaum
-
Reju Sam John