Classes
FFTCorr (first, mode[, Nmesh, BoxSize, …]) |
Algorithm to compute the 1d or 2d correlation and/or multipoles in a periodic box, using a Fast Fourier Transform (FFT). |
nbodykit.algorithms.fftcorr.
FFTCorr
(first, mode, Nmesh=None, BoxSize=None, second=None, los=[0, 0, 1], Nmu=5, dr=None, rmin=0.0, poles=[])[source]¶Algorithm to compute the 1d or 2d correlation and/or multipoles in a periodic box, using a Fast Fourier Transform (FFT).
This computes the power spectrum as the square of the Fourier modes of the density field, which are computed via a FFT. Then it is transformed back to obtain the correlation function.
Results are computed when the object is inititalized. See the documenation
of run()
for the attributes storing the results.
Note
This is very similar to FFTPower
.
Parameters: |
|
---|
Methods
load (output[, comm]) |
Load a saved FFTPower result. |
run () |
Compute the correlation function in a periodic box, using FFTs. |
save (output) |
Save the FFTPower result to disk. |
run
()[source]¶Compute the correlation function in a periodic box, using FFTs. This function returns nothing, but attaches several attributes to the class:
edges
¶array_like – the edges of the wavenumber bins
corr
¶BinnedStatistic
– a BinnedStatistic object that holds the measured \(\xi(r)\) or
\(\xi(r,\mu)\). It stores the following variables:
the mean value for each r
bin
mode=2d
onlythe mean value for each mu
bin
real array storing the correlation function
the number of modes averaged together in each bin
poles
¶BinnedStatistic
or None
– a BinnedStatistic object to hold the multipole results
\(\xi_\ell(r)\); if no multipoles were requested by the user,
this is None
. It stores the following variables:
r
binattrs
¶dict – dictionary of meta-data; in addition to storing the input parameters, it includes the following fields computed during the algorithm execution: