nessai.proposal.utils

Utilities for proposal classes

Module Contents

Functions

check_proposal_kwargs(ProposalClass, kwargs[, strict])

Check the keyword arguments are correct for a proposal class.

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.