pybaselines.utils.gaussian2d
- pybaselines.utils.gaussian2d(x, z, height=1.0, center_x=0.0, center_z=0.0, sigma_x=1.0, sigma_z=1.0)[source]
Generates a Gaussian distribution based on height, center, and sigma.
- Parameters:
- x
numpy.ndarray, shape (M, N) The x-values at which to evaluate the distribution.
- z
numpy.ndarray, shape (M, N) The z-values at which to evaluate the distribution.
- height
float, optional The maximum height of the distribution. Default is 1.0.
- center_x
float, optional The center of the distribution in the x-axis. Default is 0.0.
- sigma_x
float, optional The standard deviation of the distribution in the x-axis. Default is 1.0.
- center_z
float, optional The center of the distribution in the z-axis. Default is 0.0.
- sigma_z
float, optional The standard deviation of the distribution in the z-axis. Default is 1.0.
- x
- Returns:
numpy.ndarray, shape (M, N)The Gaussian distribution evaluated with x and z.
- Raises:
ValueErrorRaised if the input x or z are not two dimensional.
Notes
The input x and z should be two dimensional arrays, which can be gotten from their one dimensional counterparts by using
numpy.meshgrid().