[yt-svn] commit/yt-doc: 2 new changesets

Bitbucket commits-noreply at bitbucket.org
Wed Dec 14 10:49:08 PST 2011


2 new commits in yt-doc:


https://bitbucket.org/yt_analysis/yt-doc/changeset/5408a9cd438b/
changeset:   5408a9cd438b
user:        MatthewTurk
date:        2011-12-14 19:26:01
summary:     Re-ran the helper scripts for objects, derived quantities, and callbacks
affected #:  6 files

diff -r a4e2a32822efc825df8b805b0f32f2e9cdac75cf -r 5408a9cd438b1fecd3034ef913378deb95244d74 helper_scripts/parse_cb_list.py
--- a/helper_scripts/parse_cb_list.py
+++ b/helper_scripts/parse_cb_list.py
@@ -2,7 +2,7 @@
 import inspect
 from textwrap import TextWrapper
 
-pf = load("/Users/matthewturk/Research/data/RD0005-mine/RedshiftOutput0005")
+pf = load("RD0005-mine/RedshiftOutput0005")
 
 output = open("source/visualizing/_cb_docstrings.inc", "w")
 


diff -r a4e2a32822efc825df8b805b0f32f2e9cdac75cf -r 5408a9cd438b1fecd3034ef913378deb95244d74 helper_scripts/parse_dq_list.py
--- a/helper_scripts/parse_dq_list.py
+++ b/helper_scripts/parse_dq_list.py
@@ -2,7 +2,7 @@
 import inspect
 from textwrap import TextWrapper
 
-pf = load("/Users/matthewturk/Research/data/RD0005-mine/RedshiftOutput0005")
+pf = load("RD0005-mine/RedshiftOutput0005")
 
 output = open("source/analyzing/_dq_docstrings.inc", "w")
 


diff -r a4e2a32822efc825df8b805b0f32f2e9cdac75cf -r 5408a9cd438b1fecd3034ef913378deb95244d74 helper_scripts/parse_object_list.py
--- a/helper_scripts/parse_object_list.py
+++ b/helper_scripts/parse_object_list.py
@@ -2,7 +2,7 @@
 import inspect
 from textwrap import TextWrapper
 
-pf = load("/home/jsoishi/data/enzo/RD0005-mine/RedshiftOutput0005")
+pf = load("RD0005-mine/RedshiftOutput0005")
 
 output = open("source/analyzing/_obj_docstrings.inc", "w")
 


diff -r a4e2a32822efc825df8b805b0f32f2e9cdac75cf -r 5408a9cd438b1fecd3034ef913378deb95244d74 source/analyzing/_dq_docstrings.inc
--- a/source/analyzing/_dq_docstrings.inc
+++ b/source/analyzing/_dq_docstrings.inc
@@ -35,11 +35,19 @@
 
 
 
-.. function:: CenterOfMass():
+.. function:: CenterOfMass(use_cells=True, use_particles=False):
 
    (This is a proxy for :func:`~yt.data_objects.derived_quantities._CenterOfMass`.)
-   This function takes no arguments and returns the location of the center
-   of mass of the *non-particle* data in the object.
+   This function returns the location of the center
+   of mass. By default, it computes of the *non-particle* data in the object. 
+   
+   Parameters
+   ----------
+   
+   use_cells : bool
+       If True, will include the cell mass (default: True)
+   use_particles : bool
+       if True, will include the particles in the object (default: False)
 
 
 
@@ -53,30 +61,57 @@
 
 
 
-.. function:: IsBound(truncate=True, include_thermal_energy=False):
+.. function:: IsBound(truncate=True, include_thermal_energy=False, treecode=True, opening_angle=1.0, periodic_test=False, include_particles=True):
 
    (This is a proxy for :func:`~yt.data_objects.derived_quantities._IsBound`.)
-   This returns whether or not the object is gravitationally bound
+   This returns whether or not the object is gravitationally bound. If this
+   returns a value greater than one, it is bound, and otherwise not.
    
-   :param truncate: Should the calculation stop once the ratio of
-                    gravitational:kinetic is 1.0?
-   :param include_thermal_energy: Should we add the energy from ThermalEnergy
-                                  on to the kinetic energy to calculate 
-                                  binding energy?
+   Parameters
+   ----------
+   truncate : Bool
+       Should the calculation stop once the ratio of
+       gravitational:kinetic is 1.0?
+   include_thermal_energy : Bool
+       Should we add the energy from ThermalEnergy
+       on to the kinetic energy to calculate 
+       binding energy?
+   treecode : Bool
+       Whether or not to use the treecode.
+   opening_angle : Float 
+       The maximal angle a remote node may subtend in order
+       for the treecode method of mass conglomeration may be
+       used to calculate the potential between masses.
+   periodic_test : Bool 
+       Used for testing the periodic adjustment machinery
+       of this derived quantity.
+   include_particles : Bool
+       Should we add the mass contribution of particles
+       to calculate binding energy?
+   
+   Examples
+   --------
+   >>> sp.quantities["IsBound"](truncate=False,
+   ... include_thermal_energy=True, treecode=False, opening_angle=2.0)
+   0.32493
 
 
 
 .. function:: MaxLocation(field):
 
    (This is a proxy for :func:`~yt.data_objects.derived_quantities._MaxLocation`.)
-   This function returns six values: the maximum value of a set
-   of fields, the index of that maximum, its three physical coordinate
-   location and the index of the grid it is on. 
+   This function returns the location of the maximum of a set
+   of fields.
+
+
 
 .. function:: MinLocation(field):
 
    (This is a proxy for :func:`~yt.data_objects.derived_quantities._MinLocation`.)
-   As above but for the minimum point of a field.
+   This function returns the location of the minimum of a set
+   of fields.
+
+
 
 .. function:: ParticleSpinParameter():
 
@@ -86,6 +121,14 @@
 
 
 
+.. function:: StarAngularMomentumVector():
+
+   (This is a proxy for :func:`~yt.data_objects.derived_quantities._StarAngularMomentumVector`.)
+   This function returns the mass-weighted average angular momentum vector 
+   for stars.
+
+
+
 .. function:: TotalMass():
 
    (This is a proxy for :func:`~yt.data_objects.derived_quantities._TotalMass`.)


diff -r a4e2a32822efc825df8b805b0f32f2e9cdac75cf -r 5408a9cd438b1fecd3034ef913378deb95244d74 source/analyzing/_obj_docstrings.inc
--- a/source/analyzing/_obj_docstrings.inc
+++ b/source/analyzing/_obj_docstrings.inc
@@ -1,120 +1,126 @@
+
+
+.. class:: boolean(self, regions, fields=None, pf=None, **field_parameters):
+
+   For more information, see :ref:`physical-object-api`
+   (This is a proxy for :class:`~yt.data_objects.data_containers.AMRBooleanRegionBase`.)
 
 
 .. class:: covering_grid(self, level, left_edge, dims, fields=None, pf=None, num_ghost_zones=0, use_pbar=True, **field_parameters):
 
-For more information, see :ref:`physical-object-api`
+   For more information, see :ref:`physical-object-api`
    (This is a proxy for :class:`~yt.data_objects.data_containers.AMRCoveringGridBase`.)
 
 
 .. class:: cutting(self, normal, center, fields=None, node_name=None, **field_parameters):
 
-For more information, see :ref:`physical-object-api`
+   For more information, see :ref:`physical-object-api`
    (This is a proxy for :class:`~yt.data_objects.data_containers.AMRCuttingPlaneBase`.)
 
 
 .. class:: disk(self, center, normal, radius, height, fields=None, pf=None, **field_parameters):
 
-For more information, see :ref:`physical-object-api`
+   For more information, see :ref:`physical-object-api`
    (This is a proxy for :class:`~yt.data_objects.data_containers.AMRCylinderBase`.)
 
 
 .. class:: extracted_region(self, base_region, indices, force_refresh=True, **field_parameters):
 
-For more information, see :ref:`physical-object-api`
+   For more information, see :ref:`physical-object-api`
    (This is a proxy for :class:`~yt.data_objects.data_containers.ExtractedRegionBase`.)
 
 
 .. class:: fixed_res_cutting(self, normal, center, width, dims, fields=None, node_name=None, **field_parameters):
 
-For more information, see :ref:`physical-object-api`
+   For more information, see :ref:`physical-object-api`
    (This is a proxy for :class:`~yt.data_objects.data_containers.AMRFixedResCuttingPlaneBase`.)
 
 
 .. class:: fixed_res_proj(self, axis, level, left_edge, dims, fields=None, pf=None, **field_parameters):
 
-For more information, see :ref:`physical-object-api`
+   For more information, see :ref:`physical-object-api`
    (This is a proxy for :class:`~yt.data_objects.data_containers.AMRFixedResProjectionBase`.)
 
 
 .. class:: grid_collection(self, center, grid_list, fields=None, pf=None, **field_parameters):
 
-For more information, see :ref:`physical-object-api`
+   For more information, see :ref:`physical-object-api`
    (This is a proxy for :class:`~yt.data_objects.data_containers.AMRGridCollectionBase`.)
 
 
 .. class:: inclined_box(self, origin, box_vectors, fields=None, pf=None, **field_parameters):
 
-For more information, see :ref:`physical-object-api`
+   For more information, see :ref:`physical-object-api`
    (This is a proxy for :class:`~yt.data_objects.data_containers.AMRInclinedBoxBase`.)
 
 
 .. class:: ortho_ray(self, axis, coords, fields=None, pf=None, **field_parameters):
 
-For more information, see :ref:`physical-object-api`
+   For more information, see :ref:`physical-object-api`
    (This is a proxy for :class:`~yt.data_objects.data_containers.AMROrthoRayBase`.)
 
 
 .. class:: overlap_proj(self, axis, field, weight_field=None, max_level=None, center=None, pf=None, source=None, node_name=None, field_cuts=None, preload_style='level', serialize=True, **field_parameters):
 
-For more information, see :ref:`physical-object-api`
+   For more information, see :ref:`physical-object-api`
    (This is a proxy for :class:`~yt.data_objects.data_containers.AMRProjBase`.)
 
 
 .. class:: periodic_region(self, center, left_edge, right_edge, fields=None, pf=None, **field_parameters):
 
-For more information, see :ref:`physical-object-api`
+   For more information, see :ref:`physical-object-api`
    (This is a proxy for :class:`~yt.data_objects.data_containers.AMRPeriodicRegionBase`.)
 
 
 .. class:: periodic_region_strict(self, center, left_edge, right_edge, fields=None, pf=None, **field_parameters):
 
-For more information, see :ref:`physical-object-api`
+   For more information, see :ref:`physical-object-api`
    (This is a proxy for :class:`~yt.data_objects.data_containers.AMRPeriodicRegionStrictBase`.)
 
 
 .. class:: proj(self, axis, field, weight_field=None, max_level=None, center=None, pf=None, source=None, node_name=None, field_cuts=None, preload_style='level', serialize=True, **field_parameters):
 
-For more information, see :ref:`physical-object-api`
+   For more information, see :ref:`physical-object-api`
    (This is a proxy for :class:`~yt.data_objects.data_containers.AMRQuadTreeProjBase`.)
 
 
 .. class:: ray(self, start_point, end_point, fields=None, pf=None, **field_parameters):
 
-For more information, see :ref:`physical-object-api`
+   For more information, see :ref:`physical-object-api`
    (This is a proxy for :class:`~yt.data_objects.data_containers.AMRRayBase`.)
 
 
 .. class:: region(self, center, left_edge, right_edge, fields=None, pf=None, **field_parameters):
 
-For more information, see :ref:`physical-object-api`
+   For more information, see :ref:`physical-object-api`
    (This is a proxy for :class:`~yt.data_objects.data_containers.AMRRegionBase`.)
 
 
 .. class:: region_strict(self, center, left_edge, right_edge, fields=None, pf=None, **field_parameters):
 
-For more information, see :ref:`physical-object-api`
+   For more information, see :ref:`physical-object-api`
    (This is a proxy for :class:`~yt.data_objects.data_containers.AMRRegionStrictBase`.)
 
 
 .. class:: slice(self, axis, coord, fields=None, center=None, pf=None, node_name=False, **field_parameters):
 
-For more information, see :ref:`physical-object-api`
+   For more information, see :ref:`physical-object-api`
    (This is a proxy for :class:`~yt.data_objects.data_containers.AMRSliceBase`.)
 
 
 .. class:: smoothed_covering_grid(self, *args, **field_parameters):
 
-For more information, see :ref:`physical-object-api`
+   For more information, see :ref:`physical-object-api`
    (This is a proxy for :class:`~yt.data_objects.data_containers.AMRSmoothedCoveringGridBase`.)
 
 
 .. class:: sphere(self, center, radius, fields=None, pf=None, **field_parameters):
 
-For more information, see :ref:`physical-object-api`
+   For more information, see :ref:`physical-object-api`
    (This is a proxy for :class:`~yt.data_objects.data_containers.AMRSphereBase`.)
 
 
 .. class:: streamline(self, positions, fields=None, pf=None, **field_parameters):
 
-For more information, see :ref:`physical-object-api`
+   For more information, see :ref:`physical-object-api`
    (This is a proxy for :class:`~yt.data_objects.data_containers.AMRStreamlineBase`.)


diff -r a4e2a32822efc825df8b805b0f32f2e9cdac75cf -r 5408a9cd438b1fecd3034ef913378deb95244d74 source/visualizing/_cb_docstrings.inc
--- a/source/visualizing/_cb_docstrings.inc
+++ b/source/visualizing/_cb_docstrings.inc
@@ -65,13 +65,12 @@
 
    (This is a proxy for :class:`~yt.visualization.plot_modifications.HopCircleCallback`.)
 
-   Accepts a :class:`yt.HopList` *hop_output* and
-   plots up to *max_number* (None for unlimited) halos as
-   circles.
+   Accepts a :class:`yt.HopList` *hop_output* and plots up
+   to *max_number* (None for unlimited) halos as circles.
 
 
 
-.. function:: hop_particles(self, hop_output, p_size=1.0, max_number=None, min_size=20, alpha=0.20000000000000001):
+.. function:: hop_particles(self, hop_output, max_number, p_size=1.0, min_size=20, alpha=0.2):
 
    (This is a proxy for :class:`~yt.visualization.plot_modifications.HopParticleCallback`.)
 
@@ -83,7 +82,7 @@
 
 
 
-.. function:: image_line(self, p1, p2, plot_args=None):
+.. function:: image_line(self, p1, p2, data_coords=False, plot_args=None):
 
    (This is a proxy for :class:`~yt.visualization.plot_modifications.ImageLineCallback`.)
 
@@ -100,17 +99,6 @@
 
 
 
-.. function:: level_grids(self, level, alpha=1.0, min_pix=1, annotate=False, periodic=True, color=(0.0, 0.0, 0.0)):
-
-   (This is a proxy for :class:`~yt.visualization.plot_modifications.LevelGridBoundaryCallback`.)
-
-   Adds grid boundaries from a given *level* to a plot,
-   optionally with *alpha*-blending.  Cuttoff for display is
-   at *min_pix* wide. *annotate* puts the grid id in the
-   corner of the grid, and *color* specifies the color.
-
-
-
 .. function:: line(self, x, y, plot_args=None):
 
    (This is a proxy for :class:`~yt.visualization.plot_modifications.LinePlotCallback`.)
@@ -119,12 +107,18 @@
 
 
 
-.. function:: magnetic_field(self, factor=16):
+.. function:: magnetic_field(self, factor=16, scale=None, scale_units=None, normalize=False):
 
    (This is a proxy for :class:`~yt.visualization.plot_modifications.MagFieldCallback`.)
 
    Adds a 'quiver' plot of magnetic field to the plot,
-   skipping all but every *factor* datapoint
+   skipping all but every *factor* datapoint. *scale* is the
+   data units per arrow length unit using *scale_units* (see
+   matplotlib.axes.Axes.quiver for more info). if
+   *normalize* is True, the magnetic fields will be scaled
+   by their local (in-plane) length, allowing morphological
+   features to be more clearly seen for fields with
+   substantial variation in field strength.
 
 
 
@@ -163,13 +157,15 @@
 
 
 
-.. function:: quiver(self, field_x, field_y, factor):
+.. function:: quiver(self, field_x, field_y, factor, scale=None, scale_units=None, normalize=False):
 
    (This is a proxy for :class:`~yt.visualization.plot_modifications.QuiverCallback`.)
 
    Adds a 'quiver' plot to any plot, using the *field_x* and
    *field_y* from the associated data, skipping every
-   *factor* datapoints.
+   *factor* datapoints *scale* is the data units per arrow
+   length unit using *scale_units*  (see
+   matplotlib.axes.Axes.quiver for more info)
 
 
 
@@ -197,12 +193,14 @@
 
 
 
-.. function:: text(self, pos, text, text_args=None):
+.. function:: text(self, pos, text, data_coords=False, text_args=None):
 
    (This is a proxy for :class:`~yt.visualization.plot_modifications.TextLabelCallback`.)
 
    Accepts a position in (0..1, 0..1) of the image, some
-   text and optionally some text arguments.
+   text and optionally some text arguments. If data_coords
+   is True, position will be in code units instead of image
+   coordinates.
 
 
 
@@ -224,12 +222,19 @@
 
 
 
-.. function:: velocity(self, factor=16):
+.. function:: velocity(self, factor=16, scale=None, scale_units=None, normalize=False):
 
    (This is a proxy for :class:`~yt.visualization.plot_modifications.VelocityCallback`.)
 
    Adds a 'quiver' plot of velocity to the plot, skipping
-   all but every *factor* datapoint
+   all but every *factor* datapoint. *scale* is the data
+   units per arrow length unit using *scale_units* (see
+   matplotlib.axes.Axes.quiver for more info). if
+   *normalize* is True, the velocity fields will be scaled
+   by their local (in-plane) length, allowing morphological
+   features to be more clearly seen for fields with
+   substantial variation in field strength (normalize is not
+   implemented and thus ignored for Cutting Planes).
 
 
 
@@ -237,6 +242,6 @@
 
    (This is a proxy for :class:`~yt.visualization.plot_modifications.VobozCircleCallback`.)
 
-   x.__init__(...) initializes x; see x.__class__.__doc__
-   for signature
+   x.__init__(...) initializes x; see help(type(x)) for
+   signature
 



https://bitbucket.org/yt_analysis/yt-doc/changeset/5b9c86452b83/
changeset:   5b9c86452b83
user:        MatthewTurk
date:        2011-12-14 19:42:14
summary:     Updating the .inc files for the cookbook.
affected #:  10 files

diff -r 5408a9cd438b1fecd3034ef913378deb95244d74 -r 5b9c86452b8307e33e90986e1ea63a8858deec8e .hgignore
--- a/.hgignore
+++ b/.hgignore
@@ -5,3 +5,4 @@
 build/*
 source/reference/api/generated/*
 **/.DS_Store
+RD0005-mine/*


diff -r 5408a9cd438b1fecd3034ef913378deb95244d74 -r 5b9c86452b8307e33e90986e1ea63a8858deec8e helper_scripts/update_recipes.py
--- a/helper_scripts/update_recipes.py
+++ b/helper_scripts/update_recipes.py
@@ -43,6 +43,7 @@
     title = ".. _cookbook-%s:\n\n%s" % (fn, title)
     if lines[0] != '"""':
         print "    Bad docstring: breaking."
+        print file
     di = lines[1:].index('"""')
     docstring = lines[1:di+1]
     recipe = lines[di+2:]


diff -r 5408a9cd438b1fecd3034ef913378deb95244d74 -r 5b9c86452b8307e33e90986e1ea63a8858deec8e source/cookbook/camera_movement.inc
--- a/source/cookbook/camera_movement.inc
+++ b/source/cookbook/camera_movement.inc
@@ -59,4 +59,10 @@
    
    
 
+.. rubric:: Sample Output
 
+.. image:: _camera_movement/camera_movement_camera_movement_0029.png
+   :width: 240
+   :target: ../_images/camera_movement_camera_movement_0029.png
+
+


diff -r 5408a9cd438b1fecd3034ef913378deb95244d74 -r 5b9c86452b8307e33e90986e1ea63a8858deec8e source/cookbook/find_clumps.inc
--- a/source/cookbook/find_clumps.inc
+++ b/source/cookbook/find_clumps.inc
@@ -59,15 +59,5 @@
    # the "clumps" callback on a plot.
    
 
-.. rubric:: Sample Output
 
 
-``RedshiftOutput0005_clump_hierarchy.txt``
-
-.. literalinclude:: _find_clumps/find_clumps_RedshiftOutput0005_clump_hierarchy.txt
-
-``RedshiftOutput0005_clumps.txt``
-
-.. literalinclude:: _find_clumps/find_clumps_RedshiftOutput0005_clumps.txt
-
-


diff -r 5408a9cd438b1fecd3034ef913378deb95244d74 -r 5b9c86452b8307e33e90986e1ea63a8858deec8e source/cookbook/halo_finding.inc
--- a/source/cookbook/halo_finding.inc
+++ b/source/cookbook/halo_finding.inc
@@ -3,7 +3,7 @@
 Halo finding
 ------------
 
-This script shows the simples way of getting halo information.  For more
+This script shows the simplest way of getting halo information.  For more
 information, see :ref:`halo_finding`.
 
 The latest version of this recipe can be downloaded here: http://hg.yt-project.org/cookbook/raw/tip/recipes/halo_finding.py .


diff -r 5408a9cd438b1fecd3034ef913378deb95244d74 -r 5b9c86452b8307e33e90986e1ea63a8858deec8e source/cookbook/make_light_ray.inc
--- a/source/cookbook/make_light_ray.inc
+++ b/source/cookbook/make_light_ray.inc
@@ -3,62 +3,69 @@
 Make light ray
 --------------
 
-The following example will make a light ray (see :ref:`light-ray-generator`) from 
-z = 0 to z = 0.1.  In this example, we will also get the distance and mass of the 
-halo nearest to every element of the ray.
+This is a recipe to make a light ray through a simulation.
 
 The latest version of this recipe can be downloaded here: http://hg.yt-project.org/cookbook/raw/tip/recipes/make_light_ray.py .
 
 .. code-block:: python
 
-  import os
-  import sys
-  
-  from yt.mods import *
-  from yt.analysis_modules.halo_profiler.api import *
-  from yt.analysis_modules.light_ray.api import *
-  
-  # Get the simulation parameter file from the command line.
-  par_file = sys.argv[1]
-  
-  # Instantiate a ray object from z = 0 to z = 0.1 using the 
-  # minimum number of datasets.
-  lr = LightRay(par_file, 0.0, 0.1, use_minimum_datasets=True)
-  
-  # The next three variable are used when get_nearest_galaxy is set to True.
-  # This option will calculate the distance and mass of the halo nearest to 
-  # each element of the ray.
-  # The light ray tool accomplishes this by using the HaloProfiler.
-  # Here we are providing the LightRay with instructions to give the HaloProfiler.
-  # This is a dictionary of standard halo profiler keyword arguments and values.
-  halo_profiler_kwargs = {'halo_list_format': {'id':0, 'center':[4, 5, 6], 
-                                               'TotalMassMsun':1},
-                          'halo_list_file': 'HopAnalysis.out'}
-  # This is a list of actions we want the HaloProfiler to perform.
-  # Note that each list item (only one item in this example) is a dictionary 
-  # with the following three entries: 'function', 'args', and 'kwargs'.
-  # These are the function to be called, the arguments to that function, and 
-  # any keyword arguments.
-  halo_profiler_actions = [{'function': make_profiles,
-                            'args': None,
-                            'kwargs': {'filename': 'VirializedHalos.out'}}]
-  # This option can only be 'all' or 'filtered' and tells the HaloProfiler to 
-  # use either the full halo list or the filtered list made after calling make_profiles.
-  halo_list = 'filtered'
+   import os
+   import sys
    
-  # This is the name of the field from the halo list that represents the halo mass.
-  halo_mass_field = 'TotalMassMsun_200'
+   from yt.mods import *
+   from yt.analysis_modules.halo_profiler.api import *
+   from yt.analysis_modules.light_ray.api import *
    
-  # Make the ray and get the Density and Temperature fields, the nearest galaxy information, and 
-  # the line of sight velocity.
-  lr.make_light_ray(seed=8675309,
-                    solution_filename='lightraysolution.txt',
-                    data_filename='lightray.h5',
-                    fields=['Temperature', 'Density'],
-                    get_nearest_galaxy=True, 
-                    halo_profiler_kwargs=halo_profiler_kwargs,
-                    halo_profiler_actions=halo_profiler_actions, 
-                    halo_list=halo_list,
-                    halo_mass_field=halo_mass_field,
-                    get_los_velocity=True)
+   # Get the simulation parameter file from the command line.
+   par_file = sys.argv[1]
+   
+   # Instantiate a ray object from z = 0 to z = 0.1 using the 
+   # minimum number of datasets.
+   lr = LightRay(par_file, 0.0, 0.1, use_minimum_datasets=True)
+   
+   # The next four variables are used when get_nearest_galaxy is set to True.
+   # This option will calculate the distance and mass of the halo nearest to 
+   # each element of the ray.
+   # The light ray tool accomplishes this by using the HaloProfiler.
+   # Here we are providing the LightRay with instructions to give the HaloProfiler.
+   # This is a dictionary of standard halo profiler keyword arguments and values.
+   halo_profiler_kwargs = {'halo_list_format': {'id':0, 'center':[4, 5, 6], 
+                                                'TotalMassMsun':1},
+                           'halo_list_file': 'HopAnalysis.out'}
+   # This is a list of actions we want the HaloProfiler to perform.
+   # Note that each list item is a dictionary with the following three 
+   # entries: 'function', 'args', and 'kwargs'.
+   # These are the function to be called, the arguments to that function, and 
+   # any keyword arguments.
+   halo_profiler_actions = [{'function': make_profiles,
+                             'args': None,
+                             'kwargs': {'filename': 'VirializedHalos.out'}},
+                            {'function': add_halo_filter,
+                             'args': VirialFilter,
+                             'kwargs': {'overdensity_field': 'ActualOverdensity',
+                                        'virial_overdensity': 200,
+                                        'virial_filters': [['TotalMassMsun','>=','1e14']],
+                                        'virial_quantities': ['TotalMassMsun','RadiusMpc']}}]
+   # This option can only be 'all' or 'filtered' and tells the HaloProfiler to 
+   # use either the full halo list or the filtered list made after calling make_profiles.
+   halo_list = 'filtered'
+   
+   # This is the name of the field from the halo list that represents the halo mass.
+   halo_mass_field = 'TotalMassMsun_200'
+   
+   # Make the ray and get the Density and Temperature fields, the nearest galaxy information, and 
+   # the line of sight velocity.
+   lr.make_light_ray(seed=8675309, 
+                     solution_filename='lightraysolution.txt',
+                     data_filename='lightray.h5',
+                     fields=['Temperature', 'Density'],
+                     get_nearest_galaxy=True, 
+                     halo_profiler_kwargs=halo_profiler_kwargs,
+                     halo_profiler_actions=halo_profiler_actions, 
+                     halo_list=halo_list,
+                     halo_mass_field=halo_mass_field,
+                     get_los_velocity=True)
+   
 
+
+


diff -r 5408a9cd438b1fecd3034ef913378deb95244d74 -r 5b9c86452b8307e33e90986e1ea63a8858deec8e source/cookbook/offaxis_projection.inc
--- a/source/cookbook/offaxis_projection.inc
+++ b/source/cookbook/offaxis_projection.inc
@@ -3,12 +3,10 @@
 Offaxis projection
 ------------------
 
-This recipe shows how to volume render a dataset.  There are a number of
-twiddles, and rough edges, and the process is still very much in beta.
+This recipe shows how to make a projection of a dataset from an arbitrary
+projection angle (so you are not confined to the x, y, and z axes).  
 See :ref:`volume_rendering` for more information.
 
-Additionally, for the purposes of the recipe, we have simplified the image
-considerably.
 
 The latest version of this recipe can be downloaded here: http://hg.yt-project.org/cookbook/raw/tip/recipes/offaxis_projection.py .
 
@@ -20,14 +18,6 @@
    
    pf = load(fn) # load data
    
-   # This operates on a pass-through basis, so you should not need to specify
-   # limits.
-   tf = ProjectionTransferFunction()
-   
-   # We don't want to take the log of Density, so we need to disable that here.
-   # Note that if using the Camera interface, this does not need to be done.
-   pf.field_info["Density"].take_log=False
-   
    # Now we need a center of our volume to render.  Here we'll just use
    # 0.5,0.5,0.5, because volume renderings are not periodic.
    c = [0.5, 0.5, 0.5]
@@ -44,21 +34,20 @@
    W = 0.8
    
    # Now we decide how big an image we want.  512x512 should be sufficient.
-   Nvec = 512
+   N = 512
    
-   # Now we call the ray caster, which handles the rest.
-   # Note that we feed whole_box, which means that it won't apply any cuts to the
-   # considered grids.  This may be unnecessary for most appliations.
-   vp = pf.h.volume_rendering(L, W, c, Nvec, tf, whole_box=True)
+   # Now we call the off_axis_projection function, which handles the rest.
+   # Note that we set no_ghost equal to False, so that we *do* include ghost
+   # zones in our data.  This takes longer to calculate, but the results look
+   # much cleaner than when you ignore the ghost zones.
+   # Also note that we set the field which we want to project as "Density", but
+   # really we could use any arbitrary field like "Temperature", "Metallicity"
+   # or whatever.
+   image = off_axis_projection(pf, c, L, W, N, "Density", no_ghost=False)
    
-   # Now we tell the volume rendering object to cast the rays
-   vp.ray_cast()
-   
-   # All the channels are the same, so we only grab one.
-   image = na.log10(vp.image[:,:,0]) 
-   
+   # Image is now an NxN array representing the intensities of the various pixels.
    # And now, we call our direct image saver.  We save the log of the result.
-   write_image(image, "%s_offaxis_projection.png" % pf)
+   write_image(na.log10(image), "%s_offaxis_projection.png" % pf)
    
 
 .. rubric:: Sample Output


diff -r 5408a9cd438b1fecd3034ef913378deb95244d74 -r 5b9c86452b8307e33e90986e1ea63a8858deec8e source/cookbook/simple_projection.inc
--- a/source/cookbook/simple_projection.inc
+++ b/source/cookbook/simple_projection.inc
@@ -4,8 +4,9 @@
 -----------------
 
 This is a simple recipe to show how to open a dataset and then take a
-weighted-average projection through it, centered at its most dense point.  For
-more information see :ref:`methods-projections`.
+weighted-average projection through it, centered at its most dense point. 
+This will only project along grid axes (i.e. x,y,z).  In order to do 
+project along arbitrary projection angles, see the entry for Offaxis Projections. For more information see :ref:`methods-projections`.
 
 The latest version of this recipe can be downloaded here: http://hg.yt-project.org/cookbook/raw/tip/recipes/simple_projection.py .
 


diff -r 5408a9cd438b1fecd3034ef913378deb95244d74 -r 5b9c86452b8307e33e90986e1ea63a8858deec8e source/cookbook/simple_volume_rendering.inc
--- a/source/cookbook/simple_volume_rendering.inc
+++ b/source/cookbook/simple_volume_rendering.inc
@@ -3,11 +3,9 @@
 Simple volume rendering
 -----------------------
 
-This recipe shows how to volume render a dataset.  There are a number of
-twiddles, and rough edges, and the process is still very much in beta.
-See :ref:`volume_rendering` for more information.  In particular, this
-interface will do some things very easily, but it provides almost no
-customizability.  The Camera interface is recommended.
+This recipe shows how to volume render a dataset. 
+See :ref:`volume_rendering` for more information, as there is considerably more
+functionality than is demonstrated here.
 
 Additionally, for the purposes of the recipe, we have simplified the image
 considerably.
@@ -71,12 +69,8 @@
    
    # Othwerwise, we can then write out the image using our direct bitmap writer
    write_bitmap(image, "%s_volume_rendered.png" % pf)
+   
+   
 
 
-.. rubric:: Sample Output
 
-.. image:: _simple_volume_rendering/simple_volume_rendering_RedshiftOutput0005_volume_rendered.png
-   :width: 240
-   :target: ../_images/simple_volume_rendering_RedshiftOutput0005_volume_rendered.png
-
-


diff -r 5408a9cd438b1fecd3034ef913378deb95244d74 -r 5b9c86452b8307e33e90986e1ea63a8858deec8e source/orientation/index.rst
--- a/source/orientation/index.rst
+++ b/source/orientation/index.rst
@@ -20,7 +20,7 @@
     * `Dive Into Python <http://diveintopython.org>`_
 
 If you encounter any problems here, or anywhere in yt, please visit the 
-:ref:`_asking-for-help` page to figure out a solution.
+:ref:`asking-for-help` page to figure out a solution.
 
 .. toctree::
    :maxdepth: 2

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