compute_wedge_chi2#

cosmicjellyfish.likelihood.spectro_like.compute_wedge_chi2(P_obs_data, P_obs_theory, cosmoFM_data, covariance_spectrum=None)[source]#

Compute χ² for wedges using fully vectorized operations. Matches the loop implementation exactly.

Parameters:
  • P_obs_data (array_like) – Synthetic data power spectrum (n_z, n_mu, n_k)

  • P_obs_theory (array_like) – Theory power spectrum (n_z, n_mu, n_k)

  • cosmoFM_data (cosmicfish.FisherMatrix) – Configuration providing the k and mu grids and the survey volumes.

  • covariance_spectrum (array_like, optional) – Spectrum used to build the Gaussian covariance. Defaults to P_obs_theory, following Eq. (9) of arXiv:2303.09451. Pass P_obs_data to freeze the covariance at the fiducial instead.

Returns:

χ² value

Return type:

float