crow.cluster_modules.projection_effects.richness_bias module
- class crow.cluster_modules.projection_effects.richness_bias.CostanziRichnessBias(tau: ndarray[tuple[Any, ...], dtype[float64]] | None = None, delta_mu: ndarray[tuple[Any, ...], dtype[float64]] | None = None, fractional_sig_pure: ndarray[tuple[Any, ...], dtype[float64]] | None = None, fprj: ndarray[tuple[Any, ...], dtype[float64]] | None = None, fmsk: ndarray[tuple[Any, ...], dtype[float64]] | None = None)[source]
Bases:
objectProjection effects model from Costanzi+19.
Each instance owns one calibration in
parameters. Parameter values may be scalars or one-dimensional arrays broadcastable to the true-richness grid.fractional_sig_pureis the dimensionless fractional scatter, such thatsig_pure = fractional_sig_pure * rich_tru.Implemented as a CROW module.
- Sprob_at_richtru(rich_obs_eds: ndarray[tuple[Any, ...], dtype[float64]], rich_obs_res: ndarray[tuple[Any, ...], dtype[float64]], rich_tru: ndarray[tuple[Any, ...], dtype[float64]]) ndarray[tuple[Any, ...], dtype[floating]][source]
Integrate the observed richness over an interval defined by (rich_obs_low, rich_obs_hgh, rich_obs_res)
- Parameters:
rich_obs_eds (ndarray) -- The boundaries defining the richness intervals. It has a dimension of 1 and length at least 2.
rich_obs_res (ndarray) -- The resolution used in the integration over each richness integral. If a constant is provided, all richness integrals use the same resolution. If an array provided, it has a dimension of 1 and length exactly of len(rich_obs_eds) - 1. The resolution is defined as the fractional increase of 1 + rich_obs_res. Smaller rich_obs_res means higher resolutions.
rich_tru (ndarray) -- The true richness
- Returns:
Sprob_at_richtru -- The probability of int drich_obs P(rich_obs | rich_tru). The shape is (len(rich_obs_eds) - 1, len(rich_tru))
- Return type:
ndarray
- prob_richobs_at_richtru(rich_obs: ndarray[tuple[Any, ...], dtype[float64]], rich_tru: ndarray[tuple[Any, ...], dtype[float64]]) ndarray[tuple[Any, ...], dtype[floating]][source]
Calculate the probability of observing the observed richness given the true richness. Equation 15 in Costanzi+19.
- Parameters:
rich_obs (ndarray) -- The observed richness
rich_tru (ndarray) -- The true richness
Notes
This calculation uses
tau,delta_mu,fractional_sig_pure,fprj, andfmskfromparameters.- Returns:
prob -- The probability of P(rich_obs | rich_tru). The shape is (len(rich_obs), len(rich_tru))
- Return type:
ndarray