The friends-of-friends (FOF) is an algorithm which aims to identify overdense objects in observed galaxy distributions as well as cosmological simulations of dark matter. The earliest description of the algorithm can be found in Huchra and Geller (1982). The group finder by design roughly selects all particles that lie within a specific iso-density contour which is determined by a free parameter called the linking length. The linking length is usually quoted in units of the mean inter-particle separation
where
denotes the average number density of particles and denoted by the symbol b. The isodensity contour (roughly) selected by the FOF algorithm is given by
where the number
is a dimensionless number that comes from continuum percolation theory (see More et al. 2011). For the commonly used value of b=0.2, this corresponds to a density contour which is 81.62 times the background density. The fact that FOF selects an isodensity contour implies that the volume averaged overdensity of FOF haloes is dependent on the density profile (concentration parameter in case of the Navarro, Frenk & White (1997) density profile). The concentration of a halo depends upon its mass and it also changes as a function of cosmology and redshift. Thus the overdensity of FOF haloes is not constant. In More et al. (2011), it was also shown that the boundary of FOF haloes is fuzzy, and the fuzziness depends upon the numerical resolution which causes haloes selected by FOF to have masses which depend upon numerical resolution. Although this effect can be perfectly well corrected for mock haloes with smooth density profiles, the presence of substructure causes this correction to fail at the few percent level (see discussion for more details). Since the amount of substructure in haloes is also a function of cosmology and redshift, this implies that the FOF halo masses cannot in general be corrected for the numerical resolution effects.
Codes related to the friends-of-friends algorithm:
Code to calculate overdensity of FOF haloes given a cosmology, a value
for the linking length parameter, and a redshift.
To code requires you to have the GNU scientific library, gsl to be
installed. In case the gsl library and headers are in standard
locations then just type make. Otherwise, you have to type:
make LDFLAGS=-L/path/to/gsl-library -I/path/to/gsl-headers
The script getmandc can get the concentration mass relation code from D. Zhao
for you and set it up so that the main program can use the concentrations
output by that code. Please run:
./getmandc
once to get that code setup
If cfile is provided the concentration-mass relation from the file is used
else the code by Zhao et al. is used to calculate concentrations.
The cfile should contain log10(Mvir) log10(cVir) at number of points <=200.
By default output is redirected to stdout, the code will save the
concentrations output by the code by Zhao in the file c_Zhao
(overwritten everytime you use the code) to use later in case you need
to run the ./odcode.exe with the -cfile option. The code also creates
temporary files: tmpin tmpout tmpout2 s_aumout sigma_aumout while
running. Please do not store your important files with these names as
these get overwritten and deleted when the program is run.
The options can be given in any order, options that are not given will use the default values
./odcode.exe -h prints usage
Please report bugs if any to:
surhud [at] kicp.uchicago.edu
If you use this code in your work, kindly cite:
More, S., Kravtsov, A., Dalal, N., \& Gottl{\"o}ber, S.\ 2011, ApJ, in press
1.1 Friends-of-Friends Masses
The friends-of-friends (FOF) is an algorithm which aims to identify overdense objects in observed galaxy distributions as well as cosmological simulations of dark matter. The earliest description of the algorithm can be found in Huchra and Geller (1982). The group finder by design roughly selects all particles that lie within a specific iso-density contour which is determined by a free parameter called the linking length. The linking length is usually quoted in units of the mean inter-particle separation
where
denotes the average number density of particles and denoted by the symbol b. The isodensity contour (roughly) selected by the FOF algorithm is given by
where the number
is a dimensionless number that comes from continuum percolation theory (see More et al. 2011). For the commonly used value of b=0.2, this corresponds to a density contour which is 81.62 times the background density. The fact that FOF selects an isodensity contour implies that the volume averaged overdensity of FOF haloes is dependent on the density profile (concentration parameter in case of the Navarro, Frenk & White (1997) density profile). The concentration of a halo depends upon its mass and it also changes as a function of cosmology and redshift. Thus the overdensity of FOF haloes is not constant. In More et al. (2011), it was also shown that the boundary of FOF haloes is fuzzy, and the fuzziness depends upon the numerical resolution which causes haloes selected by FOF to have masses which depend upon numerical resolution. Although this effect can be perfectly well corrected for mock haloes with smooth density profiles, the presence of substructure causes this correction to fail at the few percent level (see discussion for more details). Since the amount of substructure in haloes is also a function of cosmology and redshift, this implies that the FOF halo masses cannot in general be corrected for the numerical resolution effects.
Codes related to the friends-of-friends algorithm:
1) Calculate the overdensity as a function of FOF halo mass.
Code to calculate overdensity of FOF haloes given a cosmology, a value
for the linking length parameter, and a redshift.
To code requires you to have the GNU scientific library, gsl to be
installed. In case the gsl library and headers are in standard
locations then just type make. Otherwise, you have to type:
make LDFLAGS=-L/path/to/gsl-library -I/path/to/gsl-headers
The script getmandc can get the concentration mass relation code from D. Zhao
for you and set it up so that the main program can use the concentrations
output by that code. Please run:
./getmandc
once to get that code setup
Usage: ./odcode.exe [OPTIONS]
Supported options:
-b [linking length parameter]
-z [redshift]
-Om0 [Omega0]
-Omb [Omegab]
-h0 [H0/100]
-s8 [sigma8]
-ns [ns]
-th [CMB Temperature]
-op [outfile]
-cfile [Concentration]
Default values are:
b=0.2, z=0.0, Omega0=0.27, h0=0.7, sigma8=0.82, ns=0.95,th=2.726, Omegab=0.047
If cfile is provided the concentration-mass relation from the file is used
else the code by Zhao et al. is used to calculate concentrations.
The cfile should contain log10(Mvir) log10(cVir) at number of points <=200.
By default output is redirected to stdout, the code will save the
concentrations output by the code by Zhao in the file c_Zhao
(overwritten everytime you use the code) to use later in case you need
to run the ./odcode.exe with the -cfile option. The code also creates
temporary files: tmpin tmpout tmpout2 s_aumout sigma_aumout while
running. Please do not store your important files with these names as
these get overwritten and deleted when the program is run.
The options can be given in any order, options that are not given will use the default values
./odcode.exe -h prints usage
Please report bugs if any to:
surhud [at] kicp.uchicago.edu
If you use this code in your work, kindly cite:
More, S., Kravtsov, A., Dalal, N., \& Gottl{\"o}ber, S.\ 2011, ApJ, in press