py21cmmc.likelihood.Likelihood1DPowerCoeval.compute_power#
- static Likelihood1DPowerCoeval.compute_power(brightness_temp, L, n_psbins, log_bins=True, ignore_kperp_zero=True, ignore_kpar_zero=False, ignore_k_zero=False)[source]#
Compute power spectrum from coeval box.
- Parameters:
brightness_temp (
py21cmfast.BrightnessTemp
instance) – The brightness temperature coeval box.L (float) – Size of the coeval cube along a side, in Mpc.
n_psbins (int) – Number of power spectrum bins to return.
log_bins (bool, optional) – Whether the bins are regular in log-space.
ignore_kperp_zero (bool, optional) – Whether to ignore perpendicular
k=0
modes when performing spherical average.ignore_kpar_zero (bool, optoinal) – Whether to ignore parallel
k=0
modes when performing spherical average.ignore_k_zero (bool, optional) – Whether to ignore the
|k|=0
mode when performing spherical average.
- Returns:
power (ndarray) – The power spectrum as a function of k
k (ndarray) – The centres of the k-bins defining the power spectrum.