bilby.core.result.get_weights_for_reweighting

bilby.core.result.get_weights_for_reweighting(result, new_likelihood=None, new_prior=None, old_likelihood=None, old_prior=None, resume_file=None, n_checkpoint=5000, npool=1)[source]

Calculate the weights for reweight()

See bilby.core.result.reweight() for help with the inputs

Returns:
ln_weights: array

An array of the natural-log weights

new_log_likelihood_array: array

An array of the natural-log likelihoods from the new likelihood

new_log_prior_array: array

An array of the natural-log priors

old_log_likelihood_array: array

An array of the natural-log likelihoods from the old likelihood

old_log_prior_array: array

An array of the natural-log priors

resume_file: string

filepath for the resume file which stores the weights

n_checkpoint: int

Number of samples to reweight before writing a resume file