[yt-svn] commit/yt-doc: sskory: Adding radial column density docs.
Bitbucket
commits-noreply at bitbucket.org
Fri Dec 2 14:49:05 PST 2011
1 new commit in yt-doc:
https://bitbucket.org/yt_analysis/yt-doc/changeset/313cdf706147/
changeset: 313cdf706147
user: sskory
date: 2011-12-02 23:22:19
summary: Adding radial column density docs.
affected #: 3 files
diff -r 586e814b5be4d623ed65c51ce76a774c1b8f82f1 -r 313cdf7061478eea76cc8fc225a385cc540242cb source/analysis_modules/index.rst
--- a/source/analysis_modules/index.rst
+++ b/source/analysis_modules/index.rst
@@ -19,3 +19,4 @@
two_point_functions
merger_tree
clump_finding
+ radial_column_density
\ No newline at end of file
diff -r 586e814b5be4d623ed65c51ce76a774c1b8f82f1 -r 313cdf7061478eea76cc8fc225a385cc540242cb source/analysis_modules/radial_column_density.rst
--- /dev/null
+++ b/source/analysis_modules/radial_column_density.rst
@@ -0,0 +1,84 @@
+.. _radial_column_density:
+
+Radial Column Density
+=====================
+.. sectionauthor:: Stephen Skory <s at skory.us>
+.. versionadded:: 2.3
+
+This module allows the calculation of column densities around a point over a
+field such as ``NumberDensity`` or ``Density``.
+This uses :ref:`healpix_volume_rendering` to interpolate column densities
+on the grid cells.
+
+Details
+------
+
+This module allows the calculation of column densities around a single point.
+For example, this is useful for looking at the gas around a radiating source.
+Briefly summarized, the calculation is performed by first creating a number
+of HEALPix shells around the central point.
+Next, the value of the column density at cell centers is found by
+linearly interpolating the values on the inner and outer shell.
+This is added as derived field, which can be used like any other derived field.
+
+Basic Example
+-------------
+
+In this simple example below, the radial column density for the field
+``NumberDensity`` is calculated and added as a derived field named
+``RCDNumberDensity``.
+The calculations will use the starting point of (x, y, z) = (0.5, 0.5, 0.5) and
+go out to a maximum radius of 0.5 in code units.
+Due to the way normalization is handled in HEALPix, the column density
+calculation can extend out only as far as the nearest face of the volume.
+For example, with a center point of (0.2, 0.3, 0.4), the column density
+is calculated out to only a radius of 0.2.
+The column density will be output as zero (0.0) outside the maximum radius.
+Just like a real number column density, when the derived is added using
+``add_field``, we give the units as :math:`1/\rm{cm}^2`.
+
+.. code-block:: python
+
+ from yt.mods import *
+ from yt.analysis_modules.radial_column_density.api import *
+ pf = load("data0030")
+
+ rcdnumdens = RadialColumnDensity(pf, 'NumberDensity', [0.5, 0.5, 0.5],
+ max_radius = 0.5)
+ def _RCDNumberDensity(field, data, rcd = rcdnumdens):
+ return rcd._build_derived_field(data)
+
+ dd = pf.h.all_data()
+ print dd['RCDNumberDensity']
+
+The field ``RCDNumberDensity`` can be used just like any other derived field
+in yt.
+
+Additional Parameters
+---------------------
+
+Each of these parameters is added to the call to ``RadialColumnDensity()``,
+just like ``max_radius`` is used above.
+
+ * ``steps`` : integer - Because this implementation uses linear
+ interpolation to calculate the column
+ density at each cell, the accuracy of the solution goes up as the number of
+ HEALPix surfaces is increased.
+ The ``steps`` parameter controls the number of HEALPix surfaces, and a larger
+ number is more accurate, but slower. Default = 10.
+
+ * ``base`` : string - This controls where the surfaces are placed, with
+ linear "lin" or logarithmic "log" spacing. The inner-most
+ surface is always set to the size of the smallest cell.
+ Default = "lin".
+
+ * ``Nside`` : int
+ The resolution of column density calculation as performed by
+ HEALPix. Higher numbers mean higher quality. Max = 8192.
+ Default = 32.
+
+ * ``ang_divs`` : imaginary integer
+ This number controls the gridding of the HEALPix projection onto
+ the spherical surfaces. Higher numbers mean higher quality.
+ Default = 800j.
+
diff -r 586e814b5be4d623ed65c51ce76a774c1b8f82f1 -r 313cdf7061478eea76cc8fc225a385cc540242cb source/visualizing/volume_rendering.rst
--- a/source/visualizing/volume_rendering.rst
+++ b/source/visualizing/volume_rendering.rst
@@ -229,6 +229,8 @@
:meth:`~yt.visualization.volume_rendering.camera.StereoPairCamera.split`, that
will return two cameras, a left and a right.
+.. _healpix_volume_rendering:
+
HEALPix Volume Rendering
------------------------
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