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_rr parameter in autocorrelate().

Note

The reference catalogue requires redshift point estimates. If the reference random cataloge is provided, it also requires redshifts.

Parameters:
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 kpcXXtXX pattern, where XX are the lower and upper scale limit as integers, in kpc (see yaw.core.cosmology.Scale).

Return type:

CorrFunc or dict[str, CorrFunc]