Fit¶
Functions
- aare.gaus(x: numpy.ndarray[numpy.float64], par: numpy.ndarray[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: numpy.ndarray[numpy.float64], par: numpy.ndarray[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.
fit_gaus(x: numpy.ndarray[numpy.float64], y: numpy.ndarray[numpy.float64], n_threads: int = 4) -> numpy.ndarray
Fit a 1D Gaussian to data.
- Parameters:
x (array_like) – The x values.
y (array_like) – The y values.
n_threads (int, optional) – The number of threads to use. Default is 4.
fit_gaus(x: numpy.ndarray[numpy.float64], y: numpy.ndarray[numpy.float64], y_err: numpy.ndarray[numpy.float64], n_threads: int = 4) -> dict
Fit a 1D Gaussian to data with error estimates.
- Parameters:
x (array_like) – The x values.
y (array_like) – The y values.
y_err (array_like) – The error in the y values.
n_threads (int, optional) – The number of threads to use. Default is 4.
- aare.fit_pol1(*args, **kwargs)¶
Overloaded function.
fit_pol1(x: numpy.ndarray[numpy.float64], y: numpy.ndarray[numpy.float64], n_threads: int = 4) -> numpy.ndarray
fit_pol1(x: numpy.ndarray[numpy.float64], y: numpy.ndarray[numpy.float64], y_err: numpy.ndarray[numpy.float64], n_threads: int = 4) -> dict
Fit a 1D polynomial to data with error estimates.
- Parameters:
x (array_like) – The x values.
y (array_like) – The y values.
y_err (array_like) – The error in the y values.
n_threads (int, optional) – The number of threads to use. Default is 4.