Functions
pk_to_xi(k, Pk[, extrap]) |
Return a callable function returning the correlation function, as computed from the Fourier transform of the input \(k\) and \(P(k)\) arrays. |
xi_to_pk(r, xi[, extrap]) |
Return a callable function returning the power spectrum, as computed from the Fourier transform of the input \(r\) and \(\xi(r)\) arrays. |
Classes
CorrelationFunction(power) |
Evaluate the correlation function by Fourier transforming a power spectrum object, with automatic re-scaling with redshift and sigma8. |
nbodykit.cosmology.correlation.CorrelationFunction(power)[source]¶Evaluate the correlation function by Fourier transforming a power spectrum object, with automatic re-scaling with redshift and sigma8.
| Parameters: | power (callable) – a callable power spectrum that returns the power at a given k;
this should have redshift, sigma8, and cosmo attributes |
|---|
Attributes
attrs |
|
cosmo |
|
redshift |
|
sigma8 |
Methods
__call__(r[, smoothing, kmin, kmax]) |
Return the correlation function (dimensionless) for separations r |
__call__(r, smoothing=0.0, kmin=1e-05, kmax=10.0)[source]¶Return the correlation function (dimensionless) for separations r
| Parameters: |
|
|---|
nbodykit.cosmology.correlation.pk_to_xi(k, Pk, extrap=True)[source]¶Return a callable function returning the correlation function, as computed from the Fourier transform of the input \(k\) and \(P(k)\) arrays.
This uses the mcfit package perform the FFT.
| Parameters: |
|
|---|---|
| Returns: | a spline holding the interpolated correlation function values |
| Return type: | InterpolatedUnivariateSpline |
nbodykit.cosmology.correlation.xi_to_pk(r, xi, extrap=False)[source]¶Return a callable function returning the power spectrum, as computed from the Fourier transform of the input \(r\) and \(\xi(r)\) arrays.
This uses the mcfit package perform the FFT.
| Parameters: |
|
|---|---|
| Returns: | a spline holding the interpolated power spectrum values |
| Return type: | InterpolatedUnivariateSpline |