[yt-svn] commit/yt: 2 new changesets
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Wed Sep 7 11:22:35 PDT 2016
2 new commits in yt:
https://bitbucket.org/yt_analysis/yt/commits/654f1de8664b/
Changeset: 654f1de8664b
Branch: yt
User: MatthewTurk
Date: 2016-09-06 00:12:05+00:00
Summary: Some notes about creating profiles from data objects
Affected #: 1 file
diff -r 58f60e6a6799a2ee44bd18ebd5619814307a4c99 -r 654f1de8664b1b756cf823aa08cc3c64f6d5ce45 doc/source/analyzing/generating_processed_data.rst
--- a/doc/source/analyzing/generating_processed_data.rst
+++ b/doc/source/analyzing/generating_processed_data.rst
@@ -107,11 +107,10 @@
import yt
ds = yt.load("galaxy0030/galaxy0030")
source = ds.sphere( "c", (10, "kpc"))
- profile = yt.create_profile(source,
- [("gas", "density")], # the bin field
- [("gas", "temperature"), # profile field
- ("gas", "radial_velocity")], # profile field
- weight_field=("gas", "cell_mass"))
+ profile = source.profile([("gas", "density")], # the bin field
+ [("gas", "temperature"), # profile field
+ ("gas", "radial_velocity")], # profile field
+ weight_field=("gas", "cell_mass"))
The binning, weight, and profile data can now be access as:
@@ -142,11 +141,10 @@
.. code-block:: python
- profile2d = yt.create_profile(source,
- [("gas", "density"), # the x bin field
- ("gas", "temperature")], # the y bin field
- [("gas", "cell_mass")], # the profile field
- weight_field=None)
+ profile2d = source.profile([("gas", "density"), # the x bin field
+ ("gas", "temperature")], # the y bin field
+ [("gas", "cell_mass")], # the profile field
+ weight_field=None)
Accessing the x, y, and profile fields work just as with one-dimensional profiles:
@@ -161,7 +159,10 @@
phase plot that shows the distribution of mass in the density-temperature
plane, with the average temperature overplotted. The
:func:`~matplotlib.pyplot.pcolormesh` function can be used to manually plot
-the 2D profile.
+the 2D profile. If you want to generate a default profile plot, you can simply
+call:::
+
+ profile.plot()
Three-dimensional profiles can be generated and accessed following
the same procedures. Additional keyword arguments are available to control
https://bitbucket.org/yt_analysis/yt/commits/3d49fd15b416/
Changeset: 3d49fd15b416
Branch: yt
User: ngoldbaum
Date: 2016-09-07 18:22:08+00:00
Summary: Merged in MatthewTurk/yt (pull request #2364)
Add documentation for profiler helpers. Closes #1265.
Affected #: 1 file
diff -r bbef88a523bf205db3cd01a936927d3e82a26507 -r 3d49fd15b41660d3c05fdedec035162835d88756 doc/source/analyzing/generating_processed_data.rst
--- a/doc/source/analyzing/generating_processed_data.rst
+++ b/doc/source/analyzing/generating_processed_data.rst
@@ -107,11 +107,10 @@
import yt
ds = yt.load("galaxy0030/galaxy0030")
source = ds.sphere( "c", (10, "kpc"))
- profile = yt.create_profile(source,
- [("gas", "density")], # the bin field
- [("gas", "temperature"), # profile field
- ("gas", "radial_velocity")], # profile field
- weight_field=("gas", "cell_mass"))
+ profile = source.profile([("gas", "density")], # the bin field
+ [("gas", "temperature"), # profile field
+ ("gas", "radial_velocity")], # profile field
+ weight_field=("gas", "cell_mass"))
The binning, weight, and profile data can now be access as:
@@ -142,11 +141,10 @@
.. code-block:: python
- profile2d = yt.create_profile(source,
- [("gas", "density"), # the x bin field
- ("gas", "temperature")], # the y bin field
- [("gas", "cell_mass")], # the profile field
- weight_field=None)
+ profile2d = source.profile([("gas", "density"), # the x bin field
+ ("gas", "temperature")], # the y bin field
+ [("gas", "cell_mass")], # the profile field
+ weight_field=None)
Accessing the x, y, and profile fields work just as with one-dimensional profiles:
@@ -161,7 +159,10 @@
phase plot that shows the distribution of mass in the density-temperature
plane, with the average temperature overplotted. The
:func:`~matplotlib.pyplot.pcolormesh` function can be used to manually plot
-the 2D profile.
+the 2D profile. If you want to generate a default profile plot, you can simply
+call:::
+
+ profile.plot()
Three-dimensional profiles can be generated and accessed following
the same procedures. Additional keyword arguments are available to control
Repository URL: https://bitbucket.org/yt_analysis/yt/
--
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