gwpopulation_pipe.common_format.resample_injections_per_population_sample
- resample_injections_per_population_sample(posterior, data, model, n_draws)[source]
Resample the input data with a fiducial prior to the population informed distribution. This returns a fixed number of samples for each passed hyperparameter sample.
This is designed to be used with found injections.
See, e.g., section IIIC of Moore and Gerosa for a description of the method.
- Parameters:
- posterior: pd.DataFrame
Hyper-parameter samples to use for the reweighting.
- data: dict
Input data samples to be reweighted.
- model: bilby.hyper.model.Model
Object that implements a prob method that will calculate the population probability.
- n_draws: int
The number of samples to draw. This should generally be the number of events. This will return one sample per input event.
- Returns:
- observed_dataset: dict
The observed dataset of the input data with the population informed prior.