xpipe.tools.selector.matchdd¶
- xpipe.tools.selector.matchdd(pars, refpars, win=None, wref=None, bins=30)[source]¶
Matches two D-dimensional distributions by reweighting individual objects
New weights are assigned by comparing the normalized, weighted histograms of the two datasets
- Parameters
pars (np.ndarray) – data table to be reweighted, shape (N1, D)
refpars (np.ndarray) – reference data table, shape (N2, D)
win (np.array) – weights for the data table
wref (np.array) – weights for the reference table
bins (int or tuple) – number of bins, or tuple of bin edges
- Returns
new weights for the input catalog
- Return type
np.array
Notes
TODO: TO BE TESTED