crow.recipes.binned_parent module
Module for defining the classes used in the BinnedClusterRecipe cluster recipe.
- class crow.recipes.binned_parent.BinnedClusterRecipe(cluster_theory, redshift_distribution, mass_distribution, completeness: Completeness = None, purity: Purity = None, mass_interval: tuple[float, float] = (11.0, 17.0), true_z_interval: tuple[float, float] = (0.0, 5.0))[source]
Bases:
objectCluster recipe.
Object used to compute cluster statistics.
- property completeness: Completeness | None
The completeness used to predict the cluster number count.
- evaluate_theory_prediction_counts(z_edges, mass_proxy_edges, sky_area: float, average_on: None | ClusterProperty = None) float[source]
Compute predicted cluster number counts in a bin.
This method must be implemented by subclasses. It evaluates the theoretical number of clusters within the specified redshift and mass-proxy bin.
- Parameters:
z_edges (array-like) -- Lower and upper edges of the redshift bin.
mass_proxy_edges (array-like) -- Lower and upper edges of the mass proxy bin (log10 scale).
sky_area (float) -- Survey area in square degrees.
average_on (ClusterProperty, optional) -- Property over which the prediction should be averaged.
- Returns:
Predicted number of clusters in the bin.
- Return type:
float
Notes
The implementation may include: - Mass–richness relations - Selection effects (completeness, purity) - Cosmological volume integration
- evaluate_theory_prediction_lensing_profile(z_edges, mass_proxy_edges, radius_centers, sky_area: float, average_on: None | ClusterProperty = None) float[source]
Compute predicted stacked lensing profile.
This method must be implemented by subclasses. It evaluates the theoretical lensing signal for clusters within the specified bin.
- Parameters:
z_edges (array-like) -- Redshift bin edges.
mass_proxy_edges (array-like) -- Mass proxy bin edges (log10 scale).
radius_centers (array-like) -- Radial positions at which the profile is evaluated.
sky_area (float) -- Survey area in square degrees.
average_on (ClusterProperty, optional) -- Property over which the prediction should be averaged.
- Returns:
Predicted lensing profile values.
- Return type:
float or ndarray
- setup()[source]
Perform any necessary pre-computation before evaluation.
This method is intended to be implemented by subclasses. It should initialize any internal quantities required for evaluating theoretical predictions (e.g., reseting/ precomputing grids, normalization factors, or integrators).
Notes
This method must be called before any evaluation method.