[Yt-svn] commit/yt-doc: brittonsmith: Updated light ray documentation.
Bitbucket
commits-noreply at bitbucket.org
Tue Jun 7 08:52:41 PDT 2011
1 new changeset in yt-doc:
http://bitbucket.org/yt_analysis/yt-doc/changeset/c4231670c814/
changeset: c4231670c814
branches:
user: brittonsmith
date: 2011-06-07 17:52:34
summary: Updated light ray documentation.
affected #: 2 files (246 bytes)
--- a/source/analysis_modules/light_ray_generator.rst Mon Jun 06 22:11:11 2011 -0400
+++ b/source/analysis_modules/light_ray_generator.rst Tue Jun 07 11:52:34 2011 -0400
@@ -101,6 +101,8 @@
halo_list = 'filtered'
+ halo_mass_field = 'TotalMassMsun_200'
+
lr.make_light_ray(seed=8675309,
solution_filename='lightraysolution.txt',
data_filename='lightray.h5',
@@ -109,6 +111,7 @@
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)
--- a/source/cookbook/make_light_ray.inc Mon Jun 06 22:11:11 2011 -0400
+++ b/source/cookbook/make_light_ray.inc Tue Jun 07 11:52:34 2011 -0400
@@ -11,49 +11,54 @@
.. code-block:: python
- import os
- import sys
+ 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'
- from yt.mods import *
- from yt.analysis_modules.halo_profiler.api import *
- from yt.analysis_modules.light_ray.api import *
+ # This is the name of the field from the halo list that represents the halo mass.
+ halo_mass_field = 'TotalMassMsun_200'
- # 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'
-
- # 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,
- get_los_velocity=True)
+ # 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)
+
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