gauss_func

erwans3.utils.gauss_func(amp: Union[float, Quantity], x0: Union[float, Quantity], sig: Union[float, Quantity], norm: bool = False, bkg: Optional[Union[float, Quantity]] = None) Callable[[Union[float, ndarray, Quantity]], Union[float, ndarray, Quantity]]

Create a Gaussian function as a lambda expression.

Parameters:
  • amp (float or Quantity) – Amplitude of the Gaussian.

  • x0 (float or Quantity) – Mean value of the Gaussian.

  • sig (float or Quantity) – Standard deviation of the Gaussian.

  • norm (bool, optional) – If True, normalize the Gaussian. Default is False.

  • bkg (float or Quantity, optional) – Background value to add to the Gaussian. Default is None.

Returns:

Lambda function representing the Gaussian function.

Return type:

function