nbodykit.algorithms.threeptcf

Classes

Multipoles3PCF(source, poles, edges[, …]) Compute the multipoles of the isotropic, three-point correlation function in configuration space.
YlmCache(ells, comm) A class to compute spherical harmonics \(Y_{lm}\) up
class nbodykit.algorithms.threeptcf.Multipoles3PCF(source, poles, edges, BoxSize=None, periodic=True, weight='Weight', selection='Selection')[source]

Compute the multipoles of the isotropic, three-point correlation function in configuration space.

This uses the algorithm of Slepian and Eisenstein, 2015 which scales as \(\mathcal{O}(N^2)\), where \(N\) is the number of objects.

Results are computed when the object is inititalized. See the documenation of run() for the attributes storing the results.

Parameters:
  • source (CatalogSource) – the input source of particles providing the ‘Position’ column
  • poles (list of int) – the list of multipole numbers to compute
  • edges (array_like) – the edges of the bins of separation to use; length of nbins+1
  • BoxSize (float, 3-vector, optional) – the size of the box; if periodic boundary conditions used, and ‘BoxSize’ not provided in the source attrs, it must be provided here
  • periodic (bool, optional) – whether to use periodic boundary conditions when computing separations between objects
  • weight (str, optional) – the name of the column in the source specifying the particle weights
  • selection (str, optional) – if not None, the name of the column to use to select certain objects; should be the name of a boolean column

References

Slepian and Eisenstein, MNRAS 454, 4142-4158 (2015)

Methods

load(filename[, comm]) Load a Multipoles3PCF result from filename that has been saved to disk with save().
run() Compute the three-point CF multipoles.
save(output) Save the poles result to a JSON file with name output
classmethod load(filename, comm=None)[source]

Load a Multipoles3PCF result from filename that has been saved to disk with save().

run()[source]

Compute the three-point CF multipoles. This attaches the following the attributes to the class:

poles

BinnedStatistic – a BinnedStatistic object to hold the multipole results; the binned statistics stores the multipoles as variables zeta_0, zeta_1, etc for \(\ell=0,1,\) etc. The coordinates of the binned statistic are r1 and r2, which give the separations between the three objects in CF

save(output)[source]

Save the poles result to a JSON file with name output

class nbodykit.algorithms.threeptcf.YlmCache(ells, comm)[source]

A class to compute spherical harmonics \(Y_{lm}\) up to a specified maximum \(\ell\)

During calculation, the necessary power of Cartesian unit vectors are cached in memory to avoid repeated calculations for separate harmonics.

Methods

__call__(xpyhat, zhat) Return a dictionary holding Ylm for each (l,m) combination
__call__(xpyhat, zhat)[source]

Return a dictionary holding Ylm for each (l,m) combination required

Parameters:
  • xpyhat (array_like) – a complex array holding xhat + i * yhat, where xhat and yhat are the two cartesian unit vectors
  • zhat (array_like) – the third cartesian unit vector