clevar.match.proximity module

class clevar.match.proximity.ProximityMatch[source]

Bases: clevar.match.parent.Match

match_from_config(cat1, cat2, match_config, cosmo=None)[source]

Make matching of catalogs based on a configuration dictionary

Parameters
  • cat1 (clevar.ClCatalog) – ClCatalog 1

  • cat2 (clevar.ClCatalog) – ClCatalog 2

  • match_config (dict) –

    Dictionary with the matching configuration. Keys must be:

    • type: type of matching, can be: cat1, cat2, cross.

    • catalog1: kwargs used in prep_cat_for_match(cat1, **kwargs) (minus cosmo).

    • catalog2: kwargs used in prep_cat_for_match(cat2, **kwargs) (minus cosmo).

    • which_radius: Case of radius to be used, can be: cat1, cat2, min, max.

    • preference: Preference to set best match, can be: more_massive, angular_proximity, redshift_proximity, shared_member_fraction.

    • verbose: Print result for individual matches (default=`True`).

  • cosmo (clevar.Cosmology object) – Cosmology object for when radius has physical units

multiple(cat1, cat2, radius_selection='max', verbose=True)[source]

Make the one way multiple matching

Parameters
  • cat1 (clevar.ClCatalog) – Base catalog

  • cat2 (clevar.ClCatalog) – Target catalog

  • verbose (bool) – Print result for individual matches.

  • radius_selection (str (optional)) – Case of radius to be used, can be: max, min, self, other.

prep_cat_for_match(cat, delta_z, match_radius, n_delta_z=1, n_match_radius=1, cosmo=None)[source]

Adds zmin, zmax and radius to cat.mt_input

Parameters
  • cat (clevar.ClCatalog) – Input ClCatalog

  • delta_z (float, string) –

    Defines the zmin, zmax for matching. Options are:

    • ’cat’ - uses redshift properties of the catalog

    • ’spline.filename’ - interpolates data in ‘filename’ (z, zmin, zmax) fmt

    • float - uses delta_z*(1+z)

    • None - does not use z

  • match_radius (string) –

    Defines the radius for matching. Options are:

    • ’cat’ - uses the radius in the catalog

    • ’value unit’ - used fixed value (ex: 1 arcsec, 1 Mpc)

  • n_delta_z (float) – Number of delta_z to be used in the matching

  • n_match_radius (float) – Multiplies the radius of the matchingi

  • cosmo (clevar.Cosmology object) – Cosmology object for when radius has physical units