atomcloud.functions.multi_funcs module

Created on Fri Mar 18 21:16:36 2022

@author: hofer

class atomcloud.functions.multi_funcs.MultiFunc(function_names, func_registry, constraints=None, use_jax=False)[source]

Bases: ConstrainedMultiFunction

Base class for 1D and 2D cloud multi-function classes which itself inherits from the ConstrainedMultiFunction class. This function allows the user to combine multiple functions together into a single function which can then be used in SciPy or JAXFit curve fitting functions. Can also include constraints between the parameters of the functions.

Parameters:
  • function_names (list[str]) –

  • func_registry (object) –

  • constraints (list[str] | None) –

  • use_jax (bool) –

class atomcloud.functions.multi_funcs.MultiFunction1D(function_names, constraints=None, use_jax=False)[source]

Bases: MultiFunc

1D cloud multi-function class which inherits from the base class. It uses the imported dictionary of 2D function objects as it’s base dictionary of function objects, but also allows the user to add custom function objects to the dictionary of function objects.

See base class for more details.

Parameters:
  • function_names (list[str]) –

  • constraints (list[str] | None) –

  • use_jax (bool) –

class atomcloud.functions.multi_funcs.MultiFunction2D(function_names, constraints=None, use_jax=False)[source]

Bases: MultiFunc

2D cloud multi-function class which inherits from the base class. It uses the imported dictionary of 2D function objects as it’s base dictionary of function objects, but also allows the user to add custom function objects to the dictionary of function objects.

Parameters:
  • function_names (list[str]) – The keys for the function objects in the registry which will be used in the multi-function

  • func_registry – The registry of function objects

  • constraints (list[str] | None) – A list of constraints which will be applied to the the functions in the multi-function (see ConstrainedMultiFunction for more details)

  • use_jax (bool) – If True, the functions in the multi-function will be created using JAX. If False, the functions will be created

Returns:

None