[yt-svn] commit/yt: chummels: Merged in chummels/yt/yt-3.0 (pull request #1100)

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Tue Jul 29 17:56:46 PDT 2014


1 new commit in yt:

https://bitbucket.org/yt_analysis/yt/commits/4e9c0b37712e/
Changeset:   4e9c0b37712e
Branch:      yt-3.0
User:        chummels
Date:        2014-07-30 02:56:38
Summary:     Merged in chummels/yt/yt-3.0 (pull request #1100)

Docs fixes
Affected #:  4 files

diff -r 36678d53bb71968ad981d021c804905e543f1177 -r 4e9c0b37712e26fd0befcd752ff0de76affa2573 doc/source/cookbook/simple_plots.rst
--- a/doc/source/cookbook/simple_plots.rst
+++ b/doc/source/cookbook/simple_plots.rst
@@ -10,21 +10,32 @@
 
 This script shows the simplest way to make a slice through a dataset.
 
-.. yt_cookbook:: simple_slice.py
-
 Note that, by default,
 :class:`~yt.visualization.plot_window.SlicePlot` shifts the
 coordinates on the axes such that the origin is at the center of the
 slice.  To instead use the coordinates as defined in the dataset, use
 the optional argument: ``origin="native"``
 
-Simple Projections
-~~~~~~~~~~~~~~~~~~
+.. yt_cookbook:: simple_slice.py
 
-This is the simplest way to make a projection through a dataset.
+Simple Projections (Non-Weighted)
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+This is the simplest way to make a projection through a dataset.  There are
+several different :ref:`projection-types`, but non-weighted line integrals
+and weighted line integrals are the two most common.  Here we create 
+density projections (non-weighted line integral):
 
 .. yt_cookbook:: simple_projection.py
 
+Simple Projections (Weighted)
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+And here we produce density-weighted temperature projections (weighted line 
+integral) for the same dataset as the non-weighted projections above:
+
+.. yt_cookbook:: simple_projection_weighted.py
+
 Simple Phase Plots
 ~~~~~~~~~~~~~~~~~~
 

diff -r 36678d53bb71968ad981d021c804905e543f1177 -r 4e9c0b37712e26fd0befcd752ff0de76affa2573 doc/source/cookbook/simple_projection.py
--- a/doc/source/cookbook/simple_projection.py
+++ b/doc/source/cookbook/simple_projection.py
@@ -3,9 +3,8 @@
 # Load the dataset.
 ds = yt.load("GalaxyClusterMerger/fiducial_1to3_b0.273d_hdf5_plt_cnt_0175")
 
-# Create projections of the density-weighted mean density.
+# Create projections of the density (non-weighted line integrals).
 
-yt.ProjectionPlot(ds, "x", "density", weight_field = "density").save()
-yt.ProjectionPlot(ds, "y", "density", weight_field = "density").save()
-yt.ProjectionPlot(ds, "z", "density", weight_field = "density").save()
-
+yt.ProjectionPlot(ds, "x", "density").save()
+yt.ProjectionPlot(ds, "y", "density").save()
+yt.ProjectionPlot(ds, "z", "density").save()

diff -r 36678d53bb71968ad981d021c804905e543f1177 -r 4e9c0b37712e26fd0befcd752ff0de76affa2573 doc/source/cookbook/simple_projection_weighted.py
--- /dev/null
+++ b/doc/source/cookbook/simple_projection_weighted.py
@@ -0,0 +1,10 @@
+import yt
+
+# Load the dataset.
+ds = yt.load("GalaxyClusterMerger/fiducial_1to3_b0.273d_hdf5_plt_cnt_0175")
+
+# Create density-weighted projections of temperature (weighted line integrals)
+
+yt.ProjectionPlot(ds, "x", "temperature", weight_field="density").save()
+yt.ProjectionPlot(ds, "y", "temperature", weight_field="density").save()
+yt.ProjectionPlot(ds, "z", "temperature", weight_field="density").save()

diff -r 36678d53bb71968ad981d021c804905e543f1177 -r 4e9c0b37712e26fd0befcd752ff0de76affa2573 doc/source/visualizing/plots.rst
--- a/doc/source/visualizing/plots.rst
+++ b/doc/source/visualizing/plots.rst
@@ -237,25 +237,26 @@
 ``integrate`` (unweighted)
     This is the default projection style. It simply integrates the 
     requested field  :math:`f(x)` along a line of sight  :math:`\hat{n}` , 
-    given by the axis parameter.  The units of the projected field  
+    given by the axis parameter (e.g. :math:`\hat{i},\hat{j},` or 
+    :math:`\hat{k}`).  The units of the projected field  
     :math:`g(X)` will be the units of the unprojected field  :math:`f(x)` 
     multiplied by the appropriate length unit, e.g., density in  
     :math:`\mathrm{g\ cm^{-3}}` will be projected to  :math:`\mathrm{g\ cm^{-2}}`. 
 
 .. math::
 
-    g(\textbf{X}) = {\Big\int\ {f(\textbf{r})\textbf{\hat{n}}\cdot{\mathrm{d\textbf{x}}}}}
+    g(X) = {\int\ {f(x)\hat{n}\cdot{dx}}}
 
 ``integrate`` (weighted)
     When using the ``integrate``  style, a ``weight_field`` argument may also 
-    be specified, which will produce a weighted projection.  :math:`w(\textbf{x})` 
+    be specified, which will produce a weighted projection.  :math:`w(x)` 
     is the field used as a weight. One common example would 
     be to weight the "temperature" field by the "density" field. In this case, 
     the units of the projected field are the same as the unprojected field.
 
 .. math::
 
-    g(\textbf{X}) = \frac{\Big\int\ {f(\textbf{x})w(\textbf{x})\textbf{\hat{n}}\cdot{\mathrm{d\textbf{x}}}}}{\Big\int\ {w(\textbf{x})\textbf{\hat{n}}\cdot{\mathrm{d\textbf{x}}}}}
+    g(X) = \frac{\int\ {f(x)w(x)\hat{n}\cdot{dx}}}{\int\ {w(x)\hat{n}\cdot{dx}}}
 
 ``mip`` 
     This style picks out the maximum value of a field along the line of

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