yaw.correlation.crosscorrelate#
- yaw.correlation.crosscorrelate(config: Configuration, reference: BaseCatalog, unknown: BaseCatalog, *, ref_rand: BaseCatalog | None = None, unk_rand: BaseCatalog | None = None, linkage: PatchLinkage | None = None, progress: bool = False) CorrFunc | dict[str, CorrFunc][source]#
Compute an angular crosscorrelation function in bins of redshift.
The correlation is measured on fixed physical scales that are converted to angles for each redshift bin. All parameters (binning, scales, etc.) are bundled in the input configuration, see
yaw.config.At least one random catalogue (either for the reference or the unknown sample) must be provided, which will either trigger counting the DR (reference-random) or RD (random-unknown) pair counts. If both random catalogues are provided, the random-random pairs (RR) are counted as well, this is equivalent to enabling the
compute_rrparameter inautocorrelate().Note
The reference catalogue requires redshift point estimates. If the reference random cataloge is provided, it also requires redshifts.
- Parameters:
config (
Configuration) – Provides all major run parameters.reference (
yaw.catalogs.BaseCatalog) – The reference sample.unknown (
yaw.catalogs.BaseCatalog) – The sample with unknown redshift distribution.
- Keyword Arguments:
ref_rand (
yaw.catalogs.BaseCatalog, optional) – Random catalog for the reference sample, requires redshifts configured.unk_rand (
yaw.catalogs.BaseCatalog, optional) – Random catalog for the unknown sample.linkage (
yaw.catalogs.PatchLinkage, optional) – Provide a linkage object that determines which spatial patches must be correlated given the measurement scales. Ensures consistency when measuring multiple correlations, otherwise generated automatically.progress (
bool) – Display a progress bar.
- Returns:
Container that holds the measured pair counts, or a dictionary of containers if multiple scales are configured. Dictionary keys have a
kpcXXtXXpattern, whereXXare the lower and upper scale limit as integers, in kpc (seeyaw.core.cosmology.Scale).- Return type:
CorrFuncordict[str, CorrFunc]