nessai.proposal.utils#
Utilities for proposal classes
Functions#
|
Check the keyword arguments are correct for a proposal class. |
|
Get the proposal class for the standard nested sampler. |
Module Contents#
- nessai.proposal.utils.check_proposal_kwargs(ProposalClass, kwargs, strict=False)#
Check the keyword arguments are correct for a proposal class.
Removes any keyword arguments that correspond to another class. Raises an error if the keyword arguments are unknown. For example if the class is FlowProposal, it will remove any keyword arguments that correspond to AugmentedFlowProposal but not raise an error.
- Parameters:
- ProposalClassType[FlowProposal]
Class to check the keyword arguments against.
- kwargsdict
Dictionary of keyword arguments.
- strictbool
Raise an error if any extra keyword arguments are provided even if they correspond to other proposals.
- Returns:
- dict
Dictionary of updated kwargs.
- nessai.proposal.utils.get_flow_proposal_class(proposal_class: str | None | Callable) Callable#
Get the proposal class for the standard nested sampler.
Can also load proposals from entry points. These take priority of the default proposals.
- Parameters:
- proposal_classUnion[str, Proposal, None]
The name of the proposal class or the class itself. If not specified, defaults to
nessai.proposal.flowpropsoal.FlowProposal.
- Returns:
- Proposal class