Fit

Functions

aare.gaus(x: Annotated[numpy.typing.ArrayLike, numpy.float64], par: Annotated[numpy.typing.ArrayLike, numpy.float64]) numpy.ndarray

Evaluate a 1D Gaussian function for all points in x using parameters par.

Parameters:
  • x (array_like) – The points at which to evaluate the Gaussian function.

  • par (array_like) – The parameters of the Gaussian function. The first element is the amplitude, the second element is the mean, and the third element is the standard deviation.

aare.pol1(x: Annotated[numpy.typing.ArrayLike, numpy.float64], par: Annotated[numpy.typing.ArrayLike, numpy.float64]) numpy.ndarray

Evaluate a 1D polynomial function for all points in x using parameters par. (p0+p1*x)

Parameters:
  • x (array_like) – The points at which to evaluate the polynomial function.

  • par (array_like) – The parameters of the polynomial function. The first element is the intercept, and the second element is the slope.

Fitting

aare.fit_gaus(*args, **kwargs)

Overloaded function.

  1. fit_gaus(x: typing.Annotated[numpy.typing.ArrayLike, numpy.float64], y: typing.Annotated[numpy.typing.ArrayLike, numpy.float64], n_threads: typing.SupportsInt | typing.SupportsIndex = 4) -> numpy.ndarray

    Fit a 1D Gaussian to data.

    xarray_like

    The x values.

    yarray_like

    The y values.

    n_threadsint, optional

    The number of threads to use. Default is 4.

  2. fit_gaus(x: typing.Annotated[numpy.typing.ArrayLike, numpy.float64], y: typing.Annotated[numpy.typing.ArrayLike, numpy.float64], y_err: typing.Annotated[numpy.typing.ArrayLike, numpy.float64], n_threads: typing.SupportsInt | typing.SupportsIndex = 4) -> dict

    Fit a 1D Gaussian to data with error estimates.

    xarray_like

    The x values.

    yarray_like

    The y values.

    y_errarray_like

    The error in the y values.

    n_threadsint, optional

    The number of threads to use. Default is 4.

aare.fit_pol1(*args, **kwargs)

Overloaded function.

  1. fit_pol1(x: typing.Annotated[numpy.typing.ArrayLike, numpy.float64], y: typing.Annotated[numpy.typing.ArrayLike, numpy.float64], n_threads: typing.SupportsInt | typing.SupportsIndex = 4) -> numpy.ndarray

  2. fit_pol1(x: typing.Annotated[numpy.typing.ArrayLike, numpy.float64], y: typing.Annotated[numpy.typing.ArrayLike, numpy.float64], y_err: typing.Annotated[numpy.typing.ArrayLike, numpy.float64], n_threads: typing.SupportsInt | typing.SupportsIndex = 4) -> dict

    Fit a 1D polynomial to data with error estimates.

    xarray_like

    The x values.

    yarray_like

    The y values.

    y_errarray_like

    The error in the y values.

    n_threadsint, optional

    The number of threads to use. Default is 4.