py21cmmc.likelihood.Likelihood1DPowerLightcone.compute_power#

static Likelihood1DPowerLightcone.compute_power(box, length, 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:
  • box (py21cmfast.Lightcone instance) – The lightcone to take the power spectrum of.

  • length (3-tuple) – Size of the lightcone in its 3 dimensions (X,Y,Z)

  • 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, optional) – 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.