[yt-svn] commit/yt-doc: chummels: Adding small note on how to display all native and derived fields for your own dataset in the field list doc.
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Fri Aug 16 17:23:11 PDT 2013
1 new commit in yt-doc:
https://bitbucket.org/yt_analysis/yt-doc/commits/696afea653e4/
Changeset: 696afea653e4
User: chummels
Date: 2013-08-17 00:44:04
Summary: Adding small note on how to display all native and derived fields for your own dataset in the field list doc.
Affected #: 1 file
diff -r 76d4a64d71bc73c8cc88ee81f4596222d5810642 -r 696afea653e44d82174fd460966e167d0f18dc19 source/field_list.rst
--- a/source/field_list.rst
+++ b/source/field_list.rst
@@ -7,7 +7,39 @@
This is a list of all fields available in ``yt``. It has been organized by the
type of code that each field is supported by. "Universal" fields are available
everywhere, "Enzo" fields in Enzo datasets, "Orion" fields in Orion datasets,
-and so on.
+and so on.
+
+Try using the ``pf.h.field_list`` and ``pf.h.derived_field_list`` to view the
+native and derived fields available for your dataset respectively. For example
+to display the native fields in alphabetical order:
+
+.. code-block:: python
+
+ from yt.mods import *
+ pf = load("Enzo_64/DD0043/data0043")
+ for i in sorted(pf.h.field_list):
+ print i
+
+ Dark_Matter_Density
+ Density
+ GasEnergy
+ Temperature
+ TotalEnergy
+ creation_time
+ dynamical_time
+ metallicity_fraction
+ particle_index
+ particle_mass
+ particle_position_x
+ particle_position_y
+ particle_position_z
+ particle_type
+ particle_velocity_x
+ particle_velocity_y
+ particle_velocity_z
+ x-velocity
+ y-velocity
+ z-velocity
.. note:: Universal fields will be overridden by a code-specific field.
Repository URL: https://bitbucket.org/yt_analysis/yt-doc/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
More information about the yt-svn
mailing list