Functions
project_to_basis (y3d, edges[, los, poles]) |
Project a 3D statistic on to the specified basis. |
Classes
FFTBase (first, second, Nmesh, BoxSize) |
Base class provides functions for periodic FFT based Power spectrum code |
FFTPower (first, mode[, Nmesh, BoxSize, …]) |
Algorithm to compute the 1d or 2d power spectrum and/or multipoles in a periodic box, using a Fast Fourier Transform (FFT). |
ProjectedFFTPower (first[, Nmesh, BoxSize, …]) |
The power spectrum of a field in a periodic box, projected over certain axes. |
nbodykit.algorithms.fftpower.
FFTBase
(first, second, Nmesh, BoxSize)[source]¶Base class provides functions for periodic FFT based Power spectrum code
Parameters: |
|
---|
Methods
load (output[, comm]) |
Load a saved FFTPower result. |
save (output) |
Save the FFTPower result to disk. |
nbodykit.algorithms.fftpower.
FFTPower
(first, mode, Nmesh=None, BoxSize=None, second=None, los=[0, 0, 1], Nmu=5, dk=None, kmin=0.0, poles=[])[source]¶Algorithm to compute the 1d or 2d power spectrum 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.
Results are computed when the object is inititalized. See the documenation
of run()
for the attributes storing the results.
Note
A full tutorial on the class is available in the documentation here.
Parameters: |
|
---|
Methods
load (output[, comm]) |
Load a saved FFTPower result. |
run () |
Compute the power spectrum in a periodic box, using FFTs. |
save (output) |
Save the FFTPower result to disk. |
run
()[source]¶Compute the power spectrum 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
power
¶BinnedStatistic
– a BinnedStatistic object that holds the measured \(P(k)\) or
\(P(k,\mu)\). It stores the following variables:
the mean value for each k
bin
mode=2d
onlythe mean value for each mu
bin
complex array storing the real and imaginary components of the power
the number of Fourier modes averaged together in each bin
poles
¶BinnedStatistic
or None
– a BinnedStatistic object to hold the multipole results
\(P_\ell(k)\); if no multipoles were requested by the user,
this is None
. It stores the following variables:
k
binattrs
¶dict – dictionary of meta-data; in addition to storing the input parameters, it includes the following fields computed during the algorithm execution:
nbodykit.algorithms.fftpower.
ProjectedFFTPower
(first, Nmesh=None, BoxSize=None, second=None, axes=(0, 1), dk=None, kmin=0.0)[source]¶The power spectrum of a field in a periodic box, projected over certain axes.
This is not really always physically meaningful, but convenient for making sense of Lyman-Alpha forest or lensing maps.
This is usually called the 1d power spectrum or 2d power spectrum.
Results are computed when the object is inititalized. See the documenation
of run()
for the attributes storing the results.
Parameters: |
|
---|
Methods
load (output[, comm]) |
Load a saved FFTPower result. |
run () |
Run the algorithm. |
save (output) |
Save the FFTPower result to disk. |
run
()[source]¶Run the algorithm. This attaches the following attributes to the class:
edges
¶array_like – the edges of the wavenumber bins
power
¶BinnedStatistic
– a BinnedStatistic object that holds the projected power.
It stores the following variables:
k
binnbodykit.algorithms.fftpower.
project_to_basis
(y3d, edges, los=[0, 0, 1], poles=[])[source]¶Project a 3D statistic on to the specified basis. The basis will be one of:
Note
The 2D (x, mu) bins will be computed only if poles is specified. See return types for further details.
Notes
Parameters: |
|
---|---|
Returns: |
|