nbodykit.algorithms.cgm¶
Functions
|
Perform the cylindrical grouping method |
|
Convert floating type data to unique integers for sorting |
Classes
|
Compute groups of objects using a cylindrical grouping method. |
- class nbodykit.algorithms.cgm.CylindricalGroups(source, rankby, rperp, rpar, flat_sky_los=None, periodic=False, BoxSize=None)[source]¶
Compute groups of objects using a cylindrical grouping method. We identify all satellites within a given cylindrical volume around a central object.
Results are computed when the object is inititalized, and the result is stored in the
groups
attribute; see the documenation ofrun()
.Input parameters are stored in the
attrs
attribute dictionary.- Parameters
source (subclass of
CatalogSource
) – the input source of particles providing the ‘Position’ column; the grouping algorithm is run on this catalogrperp (float) – the radius of the cylinder in the sky plane (i.e., perpendicular to the line-of-sight)
rpar (float) – the radius along the line-of-sight direction; this is 1/2 the height of the cylinder
rankby (str, list,
None
) – a single or list of column names to rank order the input source by before computing the cylindrical groups, such that objects ranked first are marked as CGM centrals; ifNone
is supplied, no sorting will be doneflat_sky_los (bool, optional) – a unit vector of length 3 providing the line-of-sight direction, assuming a fixed line-of-sight across the box, e.g., [0,0,1] to use the z-axis. If
None
, the observer at (0,0,0) is used to compute the line-of-sight for each pairperiodic (bool, optional) – whether to use periodic boundary conditions
BoxSize (float, 3-vector, optional) – the size of the box of the input data; must be provided as a keyword or in
source.attrs
ifperiodic=True
References
Okumura, Teppei, et al. “Reconstruction of halo power spectrum from redshift-space galaxy distribution: cylinder-grouping method and halo exclusion effect”, arXiv:1611.04165, 2016.
Methods
run
()Compute the cylindrical groups, saving the results to the
groups
attribute- run()[source]¶
Compute the cylindrical groups, saving the results to the
groups
attribute- groups¶
a catalog holding the result of the grouping. The length of the catalog is equal to the length of the input size, i.e., the length is equal to the
size
attribute. The relevant fields are:- cgm_type :
a flag specifying the type for each object, with 0 specifying CGM central and 1 denoting CGM satellite
- cgm_haloid :
The index of the CGM object this object belongs to; an integer between 0 and the total number of CGM halos
- num_cgm_sats :
The number of satellites in the CGM halo
- Type
- nbodykit.algorithms.cgm.cgm(comm, data, domain, rperp, rpar, los, boxsize)[source]¶
Perform the cylindrical grouping method
This outputs a structured array with the same length as the input data with the following fields for each object in the original data:
- cgm_type :
a flag specifying the type for each object, with 0 specifying CGM central and 1 denoting CGM satellite
- cgm_haloid :
The index of the CGM object this object belongs to; an integer between 0 and the total number of CGM halos
- num_cgm_sats :
The number of satellites in the CGM halo
- Parameters
comm – the MPI communicator
data (CatalogSource) – catalog with sorted input data, including Position
domain – the domain decomposition
rperp (float) – the maximum distances to group objects together in the directions perpendicular and parallel to the line-of-sight; the cylinder has radius
rperp
and height2 * rpar
rpar (float) – the maximum distances to group objects together in the directions perpendicular and parallel to the line-of-sight; the cylinder has radius
rperp
and height2 * rpar
los – the line-of-sight vector
boxsize – the boxsize, or
None
if not using periodic boundary conditions