Nested Sampling
- radvel.nested_sampling.load_results(results_file: str) dict[source]
Load nested sampling results dictionary
- Parameters:
results_file – Path to hdf5 file containing the results.
- Returns:
Dictionary with nested sampling results. Note that the
samplerkey is not saved, so it is not in the dictionary returned by this function.
- radvel.nested_sampling.run(post: Posterior, output_dir: str | None = None, overwrite: bool = False, proceed: bool = False, sampler: str = 'ultranest', sampler_kwargs: dict | None = None, run_kwargs: dict | None = None) dict[source]
Run nested sampling
- Parameters:
post – radvel posterior object
output_dir – Output directory where the sampler checkpoints and results will be stored. Nothing is stored by default. Note: This replaces the sampler’s built-in “checkpoint_file”, “log_dir”, or “outputfiles_basename” argument. Once you specify output there, everything is saved there automatically. A
results.hdf5file will also be saved with the results dict, except for the sampler.overwrite – Overwrite the results.hdf5 if True. Will be enabled automatically when proceed=True.
proceed – Resume from a previous run in the same output_dir if available. Also automatically enables overwrite.
sampler – name of the sampler to use. Should be one of ‘ultranest’, ‘dynesty-static’, ‘dynesty-dynamic’, ‘nautilus’, or ‘multinest’. Defaults to ‘ultranest’.
sampler_kwargs – Dictionary of keyword arguments passed to the ‘sampler’ object from the underlying nested sampling package at initialization. See each package’s documentation to learn more on the available arguments. This is not available for
sampler='multinest'. Defaults toNone.run_kwargs – Dictionary of keyword arguments passed to the ‘run’ methods from the underlying nested sampling package. See each package’s documentation to learn more on the available aruments.
- Returns:
Dictionary of results with the keys below.
samples: Samples dataframe with one column per parameters and lnprobability (log-posterior) for each set.The samples are equally weighted, meaning they are equivalent to MCMC samples.
lnZ: Log of the Bayesian evidencelnZ: Statistical uncertainty on the evidencesampler: Sampler object used by the nested sampling library. Provides more fine-grained access to the results.
Link to each package’s API documentation: