gauss_2d

erwans3.utils.gauss_2d(amp: Union[float, Quantity], x0: Union[float, Quantity], x: Union[float, ndarray, Quantity], y0: Union[float, Quantity], y: Union[float, ndarray, Quantity], sigx: Union[float, Quantity], sigy: Union[float, Quantity], bkg: Optional[Union[float, Quantity]] = None, norm: bool = False) Union[float, Quantity]

Compute the value of a 2D Gaussian function at given positions.

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

  • x0 (float or Quantity) – X-coordinate of the center of the Gaussian along the x-axis.

  • x (float, array-like, or Quantity) – X-coordinate(s) where to evaluate the Gaussian.

  • y0 (float or Quantity) – Y-coordinate of the center of the Gaussian along the y-axis.

  • y (float, array-like, or Quantity) – Y-coordinate(s) where to evaluate the Gaussian.

  • sigx (float or Quantity) – Standard deviation of the Gaussian along the x-axis.

  • sigy (float or Quantity) – Standard deviation of the Gaussian along the y-axis.

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

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

Returns:

Value of the 2D Gaussian function at the specified positions.

Return type:

float or Quantity