Skip to content

ShanghuoLi/sfarrens-sfof

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Friends-of-Friends Galaxy Cluster Detection Algorithm

Author: Samuel Farrens

Year: 2016

Version: 3.2

Email: samuel.farrens@gmail.com

Contents

  1. Introduction
  2. Notice
  3. Contributors
  4. Scientific Background and Method
  5. Angular Percolation
  6. Redshift Binning
  7. Line-of-Sight Linking
  8. Cluster Properties
  9. Optimisation
  10. Installation and Execution
  11. Examples
  12. Doxygen Documentation

Introduction

FOF_OMP is a friends-of-friends galaxy cluster detection algorithm that operates in either spectroscopic or photometric redshift space. The linking parameters, both transverse and along the line-of-sight, change as a function of redshift to account for selection effects.

The code is written in C++ and implements OMP to loop through the photometric redshift bins.

Larger catalogues can be split into overlapping pieces using the cat_split.cpp code. These pieces can than be run through the FoF independently and the subsequent results merged using the cat_merge.cpp code.

Notice

This software is fully open source and all are welcome to use or modify it for any purpose.

I would kindly request that any scientific publications making use of this software cite Farrens et. al (2011).

Contributors

The vast majority of this code has been written from scratch by Samuel Farrens. Additional contributions have been made by:

  • Filipe Abdalla - (debugging, concepts and ideas)
  • Eduardo Cypriano - (proto-code, concepts and ideas )
  • Stefano Sartor - (optimisation)
  • Luca Tornatore - (optimisation)

Scientific Background and Method

Angular Percolation

Unlike a standard FoF this algorithm percolates in angular space. The angular distance in radians between two galaxies is calculated as follows:

D = arcos(sin(Dec1)sin(Dec2) + cos(Dec1)cos(Dec2)cos(RA1-RA2))

For two galaxies in a given redshift bin to be considered friends (i.e. linked) they must satisfy the following condition:

D <= Dfriend(z)

where Dfriend(z) is the transverse linking length in radians for a given redshift bin.

Redshift Binning

This section is only relevant for fof_mode = dynamic.

The first task the code performs is to bin all of the input galaxies by redshift. This is used to calculate dn/dz where dn is the number of galaxies in a given bin and dz is the bin width. Each galaxy is only counted once for this calculation, thus for photometric data the peak photometric redshift value of the galaxy is used.

NOTE: If a predefined N(z) is provided, then these values are used for the dn/dz calculation.

The differential comoving volume as a function of redshift, dV/dz, and the agular diameter distance, da, are then calculated for each bin using the values of H0, OmegaM and OmegaL provided.

Finally the angular linking length, Dfriend(z), for each bin is defined as:

Dfriend(z) = ((dn(z)/dz x dz/dV(z)) ^ -0.5 x rref) / da(z)

where rref is:

rref = (dn(zref)/dz x dz/dV(zref)) ^ 0.5 x linkr

zref is the specified reference redshift and linkr is the input transverse linking parameter. This calculation ensures that:

Dfriend(zref) = linkr / da(zref)

and that for bins with less galaxies (e.g. at higher redshifts when selection effects have a stronger impact) the value of Dfriend(z) will increase, while for bins with more galaxies the value of Dfriend(z) will decrease. This produces Ngal values that are more redshift independent.

Line-of-Sight Linking

• Spectroscopic Data

In spectroscopic mode the line-of-sight linking length is calculated as follows:

zfriend = linkz / (1 + z)

For two galaxies to be friends they must satisfy:

|z1 - z2| <= zfriend

In this sense the percolation is peformed in 3 dimensions.

• Photometric Data

In photometric mode a galaxy is allocated to a redshift bin if it satisfies the following:

|zgal - zbin| <= zgal_err x linkz

In this case linkz is a factor that determines how much the galaxies smear along the line-of-sight.

In this mode percolation is performed in 2 dimensions for each redshift bin independently. As galaxies can exist in multiple bins it is possible to form "proto-clusters" in different bins with similar members.

When the percolation has finished for all of the bins proto-clusters with common members are merged to form the final detections.

Cluster properties

• Centre

The cluster centre (RA, Dec, z) is calculated as the median of the galaxy members. The errors are calculated as the standard error on the median (i.e. sigma/n^0.5).

• Richness

The cluster richness is calculated a the number of member galaxies.

• Singal-to-Noise

The cluster singal-to-noise ratio is calculated as follows:

S/N = (Ngal - A * Bg) / (A * Bg)0.5

where A is the cluster area and Bg is the background level at the cluster redshift. Unless an N(z) is provided the code simply takes the number of objects at the cluster redshift divided by the catalogue area as Bg.

• Radius

The cluster radius is calculated as the distance from the cluster center to the position of the farthest member in the units specified.

• Area

The cluster area is calculated as:

pi x radius ^ 2

in the units specified.

Optimisation

• k-d Tree

The code make us of an angular k-d Tree (implemented by Luca Tornatore) to reduce the number of calculations required.

• Union-Find

The code also makes use of a union-find data structure (implemented by Stefano Sartor) to speed up the processes of merging proto-clusters.

• OpenMP

OpenMP is used to perform the redshift bin percolations in parallel.

• Splitting

The cat_split.cpp code can be used to divide large data sets into overlapping pieces that can be processed individually. The cat_merge.cpp code can then reassemble the full catalogue using the results with little to no loss of information.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages