[yt-svn] commit/yt: 5 new changesets

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


5 new commits in yt:

https://bitbucket.org/yt_analysis/yt/commits/fc3c8cfe1d2b/
Changeset:   fc3c8cfe1d2b
Branch:      yt-3.0
User:        chummels
Date:        2014-07-30 01:57:27
Summary:     Adding a non-weighted projection to the cookbook
Affected #:  3 files

diff -r 6c919453204c25e586644eed8f04f1659760c471 -r fc3c8cfe1d2b6c17130ae5381d5d5f42fbb08ca5 doc/source/cookbook/simple_plots.rst
--- a/doc/source/cookbook/simple_plots.rst
+++ b/doc/source/cookbook/simple_plots.rst
@@ -12,13 +12,24 @@
 
 .. yt_cookbook:: simple_slice.py
 
-Simple Projections
-~~~~~~~~~~~~~~~~~~
+Simple Projections (Non-Weighted)
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-This is the simplest way to make a projection through a dataset.
+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:
+
+.. yt_cookbook:: simple_projection_weighted.py
+
 Simple Phase Plots
 ~~~~~~~~~~~~~~~~~~
 

diff -r 6c919453204c25e586644eed8f04f1659760c471 -r fc3c8cfe1d2b6c17130ae5381d5d5f42fbb08ca5 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 6c919453204c25e586644eed8f04f1659760c471 -r fc3c8cfe1d2b6c17130ae5381d5d5f42fbb08ca5 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()


https://bitbucket.org/yt_analysis/yt/commits/bf8fc2df0517/
Changeset:   bf8fc2df0517
Branch:      yt-3.0
User:        chummels
Date:        2014-07-30 02:08:50
Summary:     Correcting a latex error in projection types docs.
Affected #:  1 file

diff -r fc3c8cfe1d2b6c17130ae5381d5d5f42fbb08ca5 -r bf8fc2df0517dcbdce9db28a2be3899e387dca66 doc/source/visualizing/plots.rst
--- a/doc/source/visualizing/plots.rst
+++ b/doc/source/visualizing/plots.rst
@@ -244,7 +244,7 @@
 
 .. math::
 
-    g(\textbf{X}) = {\Big\int\ {f(\textbf{r})\textbf{\hat{n}}\cdot{\mathrm{d\textbf{x}}}}}
+    g(\textbf{X}) = {\int\ {f(\textbf{r})\textbf{\hat{n}}\cdot{\mathrm{d\textbf{x}}}}}
 
 ``integrate`` (weighted)
     When using the ``integrate``  style, a ``weight_field`` argument may also 
@@ -255,7 +255,7 @@
 
 .. 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(\textbf{X}) = \frac{\int\ {f(\textbf{x})w(\textbf{x})\textbf{\hat{n}}\cdot{\mathrm{d\textbf{x}}}}}{\int\ {w(\textbf{x})\textbf{\hat{n}}\cdot{\mathrm{d\textbf{x}}}}}
 
 ``mip`` 
     This style picks out the maximum value of a field along the line of 


https://bitbucket.org/yt_analysis/yt/commits/9434eb72d3e2/
Changeset:   9434eb72d3e2
Branch:      yt-3.0
User:        chummels
Date:        2014-07-30 02:13:38
Summary:     Merging.
Affected #:  3 files

diff -r bf8fc2df0517dcbdce9db28a2be3899e387dca66 -r 9434eb72d3e2be971367735a11c63c0b4fb46cd1 doc/source/cookbook/simple_plots.rst
--- a/doc/source/cookbook/simple_plots.rst
+++ b/doc/source/cookbook/simple_plots.rst
@@ -10,6 +10,12 @@
 
 This script shows the simplest way to make a slice through a dataset.
 
+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"``
+
 .. yt_cookbook:: simple_slice.py
 
 Simple Projections (Non-Weighted)
@@ -23,10 +29,10 @@
 .. 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:
+integral) for the same dataset as the non-weighted projections above:
 
 .. yt_cookbook:: simple_projection_weighted.py
 

diff -r bf8fc2df0517dcbdce9db28a2be3899e387dca66 -r 9434eb72d3e2be971367735a11c63c0b4fb46cd1 doc/source/yt3differences.rst
--- a/doc/source/yt3differences.rst
+++ b/doc/source/yt3differences.rst
@@ -152,8 +152,8 @@
 ++++++++++++++++++++++++++++++++
 
 Wherever possible, we have attempted to replace the term "parameter file"
-(i.e., ``ds``) with the term "dataset."  Future revisions will change most of
-the ``ds`` atrributes of objects into ``ds`` or ``dataset`` attributes.
+(i.e., ``pf``) with the term "dataset."  In yt-3.0, all of the 
+the ``pf`` atrributes of objects are now ``ds`` or ``dataset`` attributes.
 
 Hierarchy is Now Index
 ++++++++++++++++++++++

diff -r bf8fc2df0517dcbdce9db28a2be3899e387dca66 -r 9434eb72d3e2be971367735a11c63c0b4fb46cd1 yt/analysis_modules/halo_finding/rockstar/rockstar_interface.pyx
--- a/yt/analysis_modules/halo_finding/rockstar/rockstar_interface.pyx
+++ b/yt/analysis_modules/halo_finding/rockstar/rockstar_interface.pyx
@@ -172,7 +172,7 @@
 
 cdef void rh_read_particles(char *filename, particle **p, np.int64_t *num_p):
     global SCALE_NOW
-    cdef np.float64_t conv[6], left_edge[6]
+    cdef np.float64_t left_edge[6]
     cdef np.ndarray[np.int64_t, ndim=1] arri
     cdef np.ndarray[np.float64_t, ndim=1] arr
     cdef unsigned long long pi,fi,i
@@ -203,8 +203,6 @@
 
     p[0] = <particle *> malloc(sizeof(particle) * local_parts)
 
-    conv[0] = conv[1] = conv[2] = ds.length_unit.in_units("Mpccm/h")
-    conv[3] = conv[4] = conv[5] = ds.velocity_unit.in_units("km/s")
     left_edge[0] = ds.domain_left_edge[0]
     left_edge[1] = ds.domain_left_edge[1]
     left_edge[2] = ds.domain_left_edge[2]
@@ -225,9 +223,13 @@
                       "particle_position_z",
                       "particle_velocity_x", "particle_velocity_y",
                       "particle_velocity_z"]:
-            arr = chunk[rh.particle_type, field].astype("float64")
+            if "position" in field:
+                unit = "Mpccm/h"
+            else:
+                unit = "km/s"
+            arr = chunk[rh.particle_type, field].in_units(unit).astype("float64")
             for i in range(npart):
-                p[0][i+pi].pos[fi] = (arr[i]-left_edge[fi])*conv[fi]
+                p[0][i+pi].pos[fi] = (arr[i]-left_edge[fi])
             fi += 1
         pi += npart
     num_p[0] = local_parts


https://bitbucket.org/yt_analysis/yt/commits/1e378f9aabd8/
Changeset:   1e378f9aabd8
Branch:      yt-3.0
User:        chummels
Date:        2014-07-30 02:33:34
Summary:     Correcting the latex commands in plot types docs
Affected #:  1 file

diff -r 9434eb72d3e2be971367735a11c63c0b4fb46cd1 -r 1e378f9aabd83e1bdeb1a828950267a60e6c28bc 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}) = {\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{\int\ {f(\textbf{x})w(\textbf{x})\textbf{\hat{n}}\cdot{\mathrm{d\textbf{x}}}}}{\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 


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