yaw.crosscorrelate#

yaw.crosscorrelate(config: Configuration, reference: Catalog, unknown: Catalog, *, ref_rand: Catalog | None = None, unk_rand: Catalog | None = None, progress: bool = False, max_workers: int | None = None) list[CorrFunc][source]#

Measure the angular cross-correlation amplitude between two object catalogs.

The cross-correlation amplitude is measured between the unknown sample and redshift slices of the reference samples as defined in the configuration. This requires that the reference sample (and its randoms, if provided) have redshifts attached. If any of the input catalogs have weights, they will be used to weight the pair counts accordingly.

Note

While both, the reference and the unknown sample randoms, are optional, at least one random sample is required for the correlation measurement. If both random samples are provided, random-random pairs are counted, which enables using the Landy-Szalay correlation estimator (recommended when measuring on scales of a few Mpc and above).

Parameters:
  • configConfiguration defining the redshift binning and correlation scales.

  • referenceCatalog holding the reference sample data.

  • unknownCatalog holding the unknown sample data.

Keyword Arguments:
  • ref_randCatalog holding the reference random data (optional).

  • unk_randCatalog holding the unknown random data (optional).

  • progress – Show a progress on the terminal (disabled by default).

  • max_workers – Limit the number of parallel workers for this operation (all by default, only multiprocessing).

Returns:

List of CorrFunc containers with pair counts (one for each configured scale).

Raises:
  • ValueError – If no randoms are provided.

  • InconsistentPatchesError – If the patches of the data or random catalogs do not overlap.