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:
xnumpy.ndarray, shape (M, N)

The x-values at which to evaluate the distribution.

znumpy.ndarray, shape (M, N)

The z-values at which to evaluate the distribution.

heightfloat, optional

The maximum height of the distribution. Default is 1.0.

center_xfloat, optional

The center of the distribution in the x-axis. Default is 0.0.

sigma_xfloat, optional

The standard deviation of the distribution in the x-axis. Default is 1.0.

center_zfloat, optional

The center of the distribution in the z-axis. Default is 0.0.

sigma_zfloat, optional

The standard deviation of the distribution in the z-axis. Default is 1.0.

Returns:
numpy.ndarray, shape (M, N)

The Gaussian distribution evaluated with x and z.

Raises:
ValueError

Raised 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().