PowerSpectrum

class cosmax.spectral_ops.PowerSpectrum(elements: int, bins: int, size: float = 1.0)

Bases: SpectralOperation

Power spectrum from a 3D density field.

Parameters:
  • elements – number of grid points in each dimension

  • bins – number of bins for the power spectrum

  • size – size of the box in real space

elements

number of grid points in each dimension

Type:

int

size

size of the box in real space

Type:

float

bins

number of bins for the power spectrum

Type:

int

k

wavenumber of each bin

index_grid

index of the bin for each wavenumber

Type:

jax.Array

n_modes

number of modes in each bin

Type:

jax.Array

Methods Summary

__call__(delta)

Compute the power spectrum from a 3D density field

Methods Documentation

__call__(delta: Array) Tuple[Array, Array]

Compute the power spectrum from a 3D density field

Parameters:

delta – 3D density field

Returns:

wavenumber and power spectrum