bilby.gw.conversion.generate_posterior_samples_from_marginalized_likelihood
- bilby.gw.conversion.generate_posterior_samples_from_marginalized_likelihood(samples, likelihood, npool=1, block=10, use_cache=True)[source]
Reconstruct the distance posterior from a run which used a likelihood which explicitly marginalised over time/distance/phase.
See Eq. (C29-C32) of https://arxiv.org/abs/1809.02293
- Parameters:
- samples: DataFrame
Posterior from run with a marginalised likelihood.
- likelihood: bilby.gw.likelihood.GravitationalWaveTransient
Likelihood used during sampling.
- npool: int, (default=1)
If given, perform generation (where possible) using a multiprocessing pool
- block: int, (default=10)
Size of the blocks to use in multiprocessing
- use_cache: bool, (default=True)
If true, cache the generation so that reconstuction can begin from the cache on restart.
- Returns:
- sample: DataFrame
Returns the posterior with new samples.