clearex.fit.points

Functions

fit_line_profile(x_axis, line_profile, ...)

Fit a Gaussian to a line profile and calculate the FWHM

gaussian_fit(x, amplitude, x_offset, sigma, ...)

Fit a Gaussian to a line profile.

clearex.fit.points.gaussian_fit(x, amplitude, x_offset, sigma, y_offset)

Fit a Gaussian to a line profile.

Parameters:
  • x (np.ndarray) – The x-axis values.

  • amplitude (float) – The amplitude of the Gaussian.

  • x_offset (float) – The offset of the Gaussian.

  • sigma (float) – The standard deviation of the Gaussian.

  • y_offset (float) – The y offset of the Gaussian.

Returns:

The Gaussian fit to the line profile.

Return type:

np.ndarray

clearex.fit.points.fit_line_profile(x_axis, line_profile, lateral_pixel_size)

Fit a Gaussian to a line profile and calculate the FWHM

Parameters:
  • x_axis (np.ndarray) – The x-axis values.

  • line_profile (np.ndarray) – The line profile to fit.

  • lateral_pixel_size (float) – The lateral pixel size of the data.

Returns:

fit_results – The full width half maximum of the Gaussian fit.

Return type:

tuple(float | Any, Any, Any, Any)