bilby.core.sampler.apply_conversion_function

bilby.core.sampler.apply_conversion_function(result, likelihood, conversion_function, npool=None, pool=None)[source]

Apply the conversion function to the injected parameters and posterior if the posterior has not already been created from the stored samples.

Parameters:
resultbilby.core.result.Result

The result object from the sampler.

likelihoodbilby.Likelihood

The likelihood used during sampling.

conversion_functionfunction

The conversion function to apply.

npoolint, optional

The number of processes to use in a processing pool.

poolmultiprocessing.Pool, schwimmbad.MPIPool, optional

The pool to use for parallelisation, this overrides the npool argument.