clevar.match_metrics.distances.catalog_funcs module¶
@file clevar/match_metrics/distances/catalog_funcs.py
Main distances functions using catalogs.
- clevar.match_metrics.distances.catalog_funcs.central_position(cat1, cat2, matching_type, radial_bins=20, radial_bin_units='degrees', cosmo=None, col2=None, bins2=None, **kwargs)[source]¶
Plot distance between central position of matched clusters, binned by a second quantity.
- Parameters
cat1 (clevar.ClCatalog) – ClCatalogs with matching information.
cat2 (clevar.ClCatalog) – ClCatalogs with matching information.
matching_type (str) – Type of matching to be considered. Must be in: ‘cross’, ‘cat1’, ‘cat2’
radial_bins (array, int) – Bins for radial distances
radial_bin_units (str) – Units of radial bins
cosmo (clevar.Cosmology) – Cosmology (used if physical units required)
col2 (str) – Name of quantity 2 (of cat1) to bin
bins2 (array, int) – Bins for quantity 2
log2 (bool) – Log scale for quantity 2
mask1 (array, None) – Masks for clusters 1(2), must have size=cat1(2).size
mask2 (array, None) – Masks for clusters 1(2), must have size=cat1(2).size
shape (str) – Shape of the lines. Can be steps or line.
ax (matplotlib.axes) – Ax to add plot
plt_kwargs (dict, None) – Additional arguments for pylab.plot. It also includes the possibility of smoothening the line with n_increase, scheme arguments. See clevar.utils.smooth_line for details.
lines_kwargs_list (list, None) – List of additional arguments for plotting each line (using pylab.plot). Must have same size as len(bins2)-1
- Returns
info –
Information of data in the plots, it contains the sections:
ax: ax used in the plot.
distances: values of distances.
data: Binned data used in the plot. It has the sections:
hist: Binned distances with (distance_bins, bin2). bins where no cluster was found have nan value.
distance_bins: The bin edges for distances.
bins2 (optional): The bin edges along the second dimension.
- Return type
dict
- clevar.match_metrics.distances.catalog_funcs.redshift(cat1, cat2, matching_type, redshift_bins=20, col2=None, bins2=None, normalize=None, **kwargs)[source]¶
Plot redshift distance between matched clusters, binned by a second quantity.
- Parameters
cat1 (clevar.ClCatalog) – ClCatalogs with matching information.
cat2 (clevar.ClCatalog) – ClCatalogs with matching information.
matching_type (str) – Type of matching to be considered. Must be in: ‘cross’, ‘cat1’, ‘cat2’
redshift_bins (array, int) – Bins for redshift distances
col2 (str) – Name of quantity 2 to bin
bins2 (array, int) – Bins for quantity 2
normalize (str, None) – Normalize difference by (1+z). Can be ‘cat1’ for (1+z1), ‘cat2’ for (1+z2) or ‘mean’ for (1+(z1+z2)/2).
mask1 (array, None) – Masks for clusters 1(2), must have size=cat1(2).size
mask2 (array, None) – Masks for clusters 1(2), must have size=cat1(2).size
shape (str) – Shape of the lines. Can be steps or line.
ax (matplotlib.axes) – Ax to add plot
plt_kwargs (dict, None) – Additional arguments for pylab.plot. It also includes the possibility of smoothening the line with n_increase, scheme arguments. See clevar.utils.smooth_line for details.
lines_kwargs_list (list, None) – List of additional arguments for plotting each line (using pylab.plot). Must have same size as len(bins2)-1
- Returns
info –
Information of data in the plots, it contains the sections:
ax: ax used in the plot.
distances: values of distances.
data: Binned data used in the plot. It has the sections:
hist: Binned distances with (distance_bins, bin2). bins where no cluster was found have nan value.
distance_bins: The bin edges for distances.
bins2 (optional): The bin edges along the second dimension.
- Return type
dict