[Yt-svn] commit/yt-doc: sskory: Adding docs on how to use the LoadHaloes class.

Bitbucket commits-noreply at bitbucket.org
Mon Mar 7 09:13:13 PST 2011


1 new changeset in yt-doc:

http://bitbucket.org/yt_analysis/yt-doc/changeset/4e0a5b6414d9/
changeset:   r35:4e0a5b6414d9
user:        sskory
date:        2011-03-07 18:05:30
summary:     Adding docs on how to use the LoadHaloes class.
affected #:  1 file (1.6 KB)

--- a/source/analysis_modules/running_halofinder.rst	Sat Mar 05 13:46:02 2011 -0500
+++ b/source/analysis_modules/running_halofinder.rst	Mon Mar 07 10:05:30 2011 -0700
@@ -4,10 +4,13 @@
 ============
 .. sectionauthor:: Stephen Skory <sskory at physics.ucsd.edu>
 
-There are two methods of finding particle haloes in yt. The recommended and default method is called HOP, a 
+There are three methods of finding particle haloes in yt. The recommended and default method is called HOP, a 
 method described in `Eisenstein and Hut (1998) <http://adsabs.harvard.edu/abs/1998ApJ...498..137E>`_. 
 A basic friends-of-friends (e.g. `Efstathiou et al. (1985) <http://adsabs.harvard.edu/abs/1985ApJS...57..241E>`_)
-halo finder is also implemented, however at this time it should be considered experimental.
+halo finder is also implemented.
+Finally, Parallel HOP (` Skory et al. (2010) <http://adsabs.harvard.edu/abs/2010ApJS..191...43S>`_)
+is a true parallelization of the HOP method can analyze massive datasets on
+hundreds of processors.
 
 HOP
 ---
@@ -117,7 +120,7 @@
 
   halo_list.write_out("HaloAnalysis.out")
 
-will output the results of HOP or FoF to a text file named ``HaloAnalysis.out``.
+will output the haloes to a text file named ``HaloAnalysis.out``.
 
   * .write_out(``name``) - Writes out the center of mass, maximum density point,
     number of particles, mass, index, bulk velocity and maximum radius for all the haloes
@@ -128,6 +131,9 @@
   * .write_particle_lists_txt(``name``) - Writes out one text file with prefix ``name`` that gives the
     location of the particle data for haloes in the HDF5 files. This is only
     necessary when running in parallel.
+  * .dump(``basename``) - Calls all of the above three functions using 
+    ``basename`` in each. This function is meant to be used in combination with
+    loading halos off disk (:ref:`load_haloes`).
   * .nearest_neighbors_3D(haloID, num_neighbors=int, search_radius=float) - 
     For a given halo ``haloID``, this finds the ``num_neighbors`` nearest (periodic)
     neighbors that are within ``search_radius`` distance from it.
@@ -141,6 +147,44 @@
     Returns a list of neighbors in the same format as the 3D case, but the distances
     are the 2D projected distance.
 
+.. _load_haloes:
+Loading Haloes Off Disk
+-----------------------
+
+It is possible to load haloes off disk and use them as if they had just been
+located by the halo finder. This has at least two advantages.
+Quite obviously this
+means that if the halos are properly saved (e.g. ``haloes.dump()``, see above
+and below),
+halo finding does not need to be run again, saving time. Another benefit is
+loaded haloes only use as much memory as needed because the particle data for
+the haloes is loaded off disk on demand. If only a few haloes are being
+examined, a dataset that required parallel analysis for halo finding can be
+analyzed in serial, interactively.
+
+The first step is to save the haloes in a consistent manner, which is made
+simple with the ``.dump()`` function:
+
+.. code-block:: python
+
+  from yt.mods import *
+  from yt.analysis_modules.halo_finding.api import *
+  pf = load("data0001")
+  haloes = HaloFinder(pf)
+  haloes.dump("basename")
+
+It is easy to load the halos using the ``LoadHaloes`` class:
+
+.. code-block:: python
+
+  from yt.mods import *
+  from yt.analysis_modules.halo_finding.api import *
+  pf = load("data0001")
+  haloes = LoadHaloes(pf, "basename")
+
+Everything that can be done with ``haloes`` in the first example should be
+possible with ``haloes`` in the second.
+
 General Parallel Halo Analysis
 ------------------------------

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