Fitting Functions Registry¶
-
class
eddington.fitting_functions_registry.
FittingFunctionsRegistry
¶ A singleton class containing all saved
FittingFunction
instances.-
classmethod
add
(func)¶ Add a fitting function.
Parameters: func (FittingFunction) – fitting function to add to registry Raises: FittingFunctionSaveError – Raised when trying to add a function with a name which already exists.
-
classmethod
all
()¶ Get all fitting functions.
Returns: list of all fitting functions Return type: List[FittingFunction]
-
classmethod
clear
() → None¶ Clear all fitting functions.
-
classmethod
exists
(func_name: str) → bool¶ Checks whether a fitting function exist.
Parameters: func_name (str) – Name of the function to load. Returns: bool
-
classmethod
load
(func_name: str)¶ Get a fitting function by name.
Parameters: func_name (str) – Name of the function to load. Returns: a fitting function from the registry Return type: FittingFunction Raises: FittingFunctionLoadError – Raised when trying to load a function which does not exist in the registry
-
classmethod
names
() → List[str]¶ Property of the names of all fitting functions.
Returns: Names of all fitting functions in registry Return type: List[str]
-
classmethod
remove
(func_name: str) → None¶ Remove a fitting function.
Parameters: func_name (str) – Name of the function to remove.
-
classmethod