nessai.reparameterisations.utils#

Utilities for handling the reparameterisations.

Classes#

KnownReparameterisation

Dataclass to store the reparameterisation class and keyword arguments

ReparameterisationDict

Dictionary of reparameterisations

Functions#

get_reparameterisation(reparameterisation[, defaults])

Function to get a reparameterisation class from a name

Module Contents#

class nessai.reparameterisations.utils.KnownReparameterisation#

Dataclass to store the reparameterisation class and keyword arguments

class nessai.reparameterisations.utils.ReparameterisationDict#

Bases: dict

Dictionary of reparameterisations

This dictionary is used to store the known reparameterisations and provides a method to add new reparameterisations.

add_reparameterisation(name, class_fn, keyword_arguments=None)#

Add a new reparameterisation to the dictionary

Parameters:
namestr

Name of the reparameterisation.

class_fnReparameterisation

Reparameterisation class.

keyword_argumentsdict, optional

Keyword arguments for the reparameterisation.

nessai.reparameterisations.utils.get_reparameterisation(reparameterisation, defaults=None)#

Function to get a reparameterisation class from a name

Parameters:
reparameterisationstr, nessai.reparameterisations.Reparameterisation

Name of the reparameterisations to return or a class that inherits from Reparameterisation

defaultsdict, optional

Dictionary of known reparameterisations that overrides the defaults.

Returns:
nessai.reparameteristaions.Reparameterisation

Reparameterisation class.

dict

Keyword arguments for the specific reparameterisation.