clevar.match.parent module

class clevar.match.parent.Match[source]

Bases: object

Matching Class

cross_match(cat1)[source]

Makes cross matches of catalog, requires unique matches to be done first.

Parameters

cat1 (clevar.ClCatalog) – Base catalog

load_matches(cat1, cat2, out_dir)[source]

Load matching results to catalogs

Parameters
  • cat1 (clevar.ClCatalog) – ClCatalog 1

  • cat2 (clevar.ClCatalog) – ClCatalog 2

  • out_dir (str) – Path of directory with saved match files

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.

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

Note

Not implemented in parent class

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

Makes multiple matchig

Parameters
  • cat1 (clevar.ClCatalog) – Base catalog

  • cat2 (clevar.ClCatalog) – Target catalog

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

Note

Not implemented in parent class

prep_cat_for_match(cat)[source]

Prepare the catalog for matching, will fill the cat.mt_input object. Each method must implement its specifics preparations.

save_matches(cat1, cat2, out_dir, overwrite=False)[source]

Saves the matching results

Parameters
  • cat1 (clevar.ClCatalog) – ClCatalog 1

  • cat2 (clevar.ClCatalog) – ClCatalog 2

  • out_dir (str) – Path of directory to save output

  • overwrite (bool) – Overwrite saved files

unique(cat1, cat2, preference, minimum_share_fraction=0)[source]

Makes unique matchig, requires multiple matching to be made first

Parameters
  • cat1 (clevar.ClCatalog) – Base catalog

  • cat2 (clevar.ClCatalog) – Target catalog

  • preference (str) – Preference to set best match. Options are: ‘more_massive’, ‘angular_proximity’, ‘redshift_proximity’, ‘shared_member_fraction’.

  • minimum_share_fraction (float) – Parameter for preference=’shared_member_fraction’. Minimum share fraction to consider in matches (default=0).