nessai.reparameterisations.utils#
Utilities for handling the reparameterisations.
Exceptions#
Exception for reparameterisation errors |
Classes#
Dataclass to store the reparameterisation class and keyword arguments |
|
Dictionary of reparameterisations |
Functions#
|
Function to get a reparameterisation class from a name |
Module Contents#
- exception nessai.reparameterisations.utils.ReparameterisationError#
Bases:
RuntimeErrorException for reparameterisation errors
- class nessai.reparameterisations.utils.KnownReparameterisation#
Dataclass to store the reparameterisation class and keyword arguments
- class nessai.reparameterisations.utils.ReparameterisationDict#
Bases:
dictDictionary 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.
- reparameterisationstr,
- Returns:
nessai.reparameteristaions.ReparameterisationReparameterisation class.
- dict
Keyword arguments for the specific reparameterisation.