atomcloud.analysis.fit_metrics module
- atomcloud.analysis.fit_metrics.calc_chi_squared(num_parameters, actual_data, fit_data, sigma=None)[source]
Calculates the chi squared value and the reduced chi squared value for a fit.
- Parameters:
num_parameters (int) – The number of parameters in the fit.
actual_data (ndarray) – The actual data that was fit.
fit_data (ndarray) – Fit corresponding to original coord points based on fit parameters.
sigma (ndarray | None) – The standard deviation of the data can be used to weight the chi squared value.
- Returns:
The chi squared value and the reduced chi squared value.
- Return type:
list[float]