bilby.core.result.rejection_sample
- bilby.core.result.rejection_sample(posterior, weights)[source]
Perform rejection sampling on a posterior using weights
- Parameters:
- posterior: pd.DataFrame or np.ndarray of shape (nsamples, nparameters)
The dataframe or array containing posterior samples
- weights: np.ndarray
An array of weights
- Returns:
- reweighted_posterior: pd.DataFrame
The posterior resampled using rejection sampling