SpectroLikelihood#

class cosmicjellyfish.likelihood.spectro_like.SpectroLikelihood(*, cosmoFM_data, cosmoFM_theory=None, leg_flag='wedges', data_obs=None, nuisance_shot=None, covariance_from='theory')[source]#

Bases: Likelihood, NautilusMixin

Likelihood for spectroscopic clustering using CosmicFish Fisher matrices.

property data_wedges: ndarray | None#

Return wedge data even when the likelihood operates in Legendre space.

compute_data()[source]#

Compute and return the observed data representation.

This method should be implemented by subclasses to return the data in the appropriate format (e.g., wedges or multipoles) for likelihood calculations.

Return type:

ndarray

Returns:

The observed data representation

compute_theory(param_dict)[source]#

Compute and return the theory prediction.

This method should be implemented by subclasses to return the theory prediction in the same representation as the observed data.

Parameters:

param_dict (Dict[str, Any]) – Dictionary of cosmological parameters

Return type:

ndarray

Returns:

The theory prediction in the same format as the observed data

compute_chi2(theory_obs)[source]#

Compute and return the chi-squared value.

This method should be implemented by subclasses to compute the chi-squared value between the observed data and theory prediction.

Parameters:

theory_obs (ndarray) – Theory prediction in the same format as observed data

Return type:

float

Returns:

The chi-squared value