University of Washington N-Body Shop log
  About Us      Search      Contact Info 
University of Washington Department of Astronomy Computer Science and Engineering Department of Physics
 
 
 
Topics:
 Participants
 Multimedia Picture Gallery
 Local HPCC Software Exchange Site
 Recent Papers by the HPCC Group
 

       Directions on how to 

      build a catalog of subhalos

 


Step 1

Obtain tipsy binary file with particle data.  If necessary extract a subset of particles corresponding to the region of interest. Run SKID on the data file.

Example of SKIDcommand lines for a cluster halo in an Omega=0.3, Lambda=0.7 universe:
 

skid -tau 0.0001 -z 0. -O 0.3 -H 2.894405 -Lambda 0.7 -s 48 -d 25 -m 16 \

     -o cl1c6.432.00512.0 -stats -std < ./cl1c6.432.00512 >& skid.0.log &

The linking length  tau  is the most crucial parameter. For this run the softening length is eps=2.5e-05; according to my experience tau should be set to at least 3 times the softening eps. In order to make sure that the subhalo properties are independent of SKID's linking length it is best to run SKID for 3 values of tau - for this case choose
 tau=10 and 15e-05; tau=10 is the most balanced choice (adequately identifies both tiny and biggy  subalos -- I consider this the fiducial SKID run) .
[Considerations based on the analyses I have carried out for the "Virgo" and "SuperVirgo" cluster runs]

For instance the command line for a SKID run with minimal tau is:
 

#skid run 2:
skid -tau 0.000075 -z 0. -O 0.3 -H 2.894405 -Lambda 0.7  -s 32 -d 30  -m 16 \
-o cl1c6.432.00512.2 -stats -std  < ./cl1c6.432.00512 >& skid.2.log
 

For our purposes, the most important output of SKID is the .stat file which contains all the properties of the subhalos.

Step 2

You must find the center of the dark matter halo and its virial radius R_vir (usually the radius for which the average overdensity  within is n times the critical density rho_critical,where n=200 for a SCDM cosmology, n=200*Omega_matter^0.45 forLCDM cosmology).  This can be easily done
visually using TIPSY  (use mbox to define a box as small as possible around the densest region of the halo, boxstat to find its center of mass and
setsphere  to draw a  sphere of radius R_vir).  In this way the center of the halo virtually coincides with the most bound particle.

Once you have the coordinates of the center of the halo, you start building the catalog of halos with distances relative to the center (you can also find
the index of the central halo as found by SKID running find_neighbour.f  for the given coordinates.  This straightforward code reads the
subhalo positions from a default file skid.stat, so remember to copy your .stat file to skid.stat. Also, once you have the index of a halo, you can easily look at its data in the skid.stat file, using popup.f.

Step 3 

Use program  make_halo_table.f  to build  a catalog of halos. Here is an example of how the input looks like:  make_halo_table.inp

The program reads some standard info about the simulation from a .sim file. This information is then used to convert the data from PKDGRAV code units
to physical units. Here is an example of a .sim  file for a LCDM simulation in a box of 100 Mpc a side:
 

# Simulation parameters: box L (Mpc) at z=0, Omega0, h0, softening_length, particle_mass
#
  100.     0.3       0.7      2.50e-05      3.721e-09

 
This program can also be fed the orbital parameters of the subhalos, but they have to be computed separately (and before this stage) using  orbits.f (see Step 4 below).
 The output of make_halo_table.f is a table file listing all the relevant properties of the subhalos (within the selected radial distance). Units are physical kpc, 
km/s and M_sun  (units of  (km/s)^2  for energy per unit mass Ene and   kpc*(km/s)  for angular momentum angM).  The 'circularity' eps is the ratio
between the angular momentum of the orbit and that of a circular orbit with the same energy. 
[If you do not provide orbital data the columns for peri,apo, eps, etc.. will show zeros]

Here is an example of a table of subhalos for a LCDM run:

#Generated from: cl1c6.432.00512.0.stat
#center ID,X and V:   -1  0.655386E-01  0.129486E-01  0.300210E-01  0.606948E-01  0.335960E-01  0.782948E-01
# skid_index  radial_distance  r_at_vcpeak  vc_at_peak Mass outer_radius Vradial |V| x y z  Vx Vy Vz peri apo eps v_at_peri Ene angM :
    90  4552.      34.2      51.1     0.369361E+11  138.      -334.       621  -2499.      -1584.      -3459.      -45.96       584.2       205.3      2394.      4556.00     0.9502  994.7     -260000.        0.238100E+07
    97  3075.      11.7      49.2     0.242868E+11  102.      -834.       962.  -2553.      -1123.      -1295.       900.1       330.1      -80.20      670.0      5752.00     0.6116  2198.     -281300.     0.147300E+07
............
[from file halos.cl1c6.432.0.table]

Step 4

How to compute the orbital parameters....   The orbits are computed in the spherically simmetric static potential approximation. 

Use code orbits.f. Here is an example of input file for a Virgo-sized cluster run at redshift zero: orbits.inp 

 The input files are a SKID .stat file for the subhalo properties and a tipsy profile of the (main) halo. The latter file must give the density profile over a wide radial range
 so that the  potential  profile, and thus the orbits, are computed correctly (typically for a cluster with virial radius ~ 2 Mpc I allow a buffer of  10 Mpc -- ideally a plateau
 of uniform density should be reached).  For reasons of laziness and for being overcautious the input density profile must be quite finely binned (bins are linearly equally     spaced).  Such a profile cannot be directly computed using TIPSY (because of the 200 bin limit of the profile command).  I use a tipsy macro, e.g. makeclustprf.tip,  which can be generated using C-code like makeclustprf.c. The sequence of tipsy profile files thus generated can be glued together using glue_tipsyprofiles.c.
 

 The outputs consist of two files. One tabulates the spline fitted potential profile (but it is scarcely of interest). The main output is the file listing the
 orbital parameters of the subhalos (groups), conventionally tagged .orb 
 These are the columns in the output file:

1 SKID group index
2 R(kpc)  radial distance from center
3 rper        pericentric distance
4 rapo        apocentric distance
5 vradial (km/s)     radial velocity
6 vrelative                velocity relative to the center (modulus) 
7 theta      cylindrical angular coordinates in radiants
8 phi
9 energy per unit mass [unit of (km/s)**2 ]
10 angular momentum per unit mass [unit of kpc*km/s]
11 circularity J/J_circular  [dimensionless]
12-14 vxxr,vyyr,vzzr   components of the velocity relative to the center [km/s]
15 velocity at pericenter
16 radial orbital period  (10^6 years)       [ WARNING! not sure that the orbital period is in these units ]

 An example output for a LCDM virgo-sized cluster: cl1c6.432.00512.0.orb 

 As said at point 3 above,  the .orb file can be input into make_halo_table.f so that the final halo table contains also the orbital parameters. 

Don't be put off (too easily) by error messages from orbit.f. They warn you that some of the orbital parameters could not be computed (typically the orbital period for very radial orbits). All these pathological cases have negative or 0 values in the output table.

Step 5

What to do with the subhalo data in the .table files? ... Things to look at are the mass function or the the circular velocity function of the subhalos (the latter is the distribution of the peak values of the circular velocity profiles for the subhalos, as computed by SKID). Here is an SM macro to plot the mass function dMDF.normalized.sm ("normalized" in the sense that masses and volumes are measured in units of the virial mass and the virial volume of the parent halo). Here is another for the circular velocity function: dVDF.normalized.sm (normalized to the circular velocity of the parent halo at its virial radius).

Typically, in order to make the plots, you will use the fiducial subhalo .table for the fiducial SKID run. According to my experience this is enough (I have also tried fancier solutions combining tables for different SKID runs but the results were essentially unaffected). Here is an SM macro that I used to compare different subhalo catalogs for different SCDM cluster runs: SCDM.checks.sm; here is another for LCDM cluster runs: LCDM.checks.sm; and one more for various galaxy runs: Galaxies.checks.sm.

The SM macros listed above may need this collection of additional macros my_macros.sm, which could be useful for other occasions too.

Just in case, here is a list of other SM macros to draw plots for halo and subhalo properties:


N-Body Shop
University of Washington
Box 351580
Seattle, WA  98195-1580
(206) 543-9849 voice, (206) 685-0403 FAX
[comments to ghigna@astro.washington.edu]