Fitting#
Here can be find the functions to load and fit experimental data. EPRAYA has 5 methods for EPR data fitting: Nelder-Mead, Genetic Algorithm, Metrópolis, Least Squares and the use of the ADAM Algorithm. The results of the fitting are print in the screen and are also contain in epr.restult.
Data load functions#
EPRAYA has different forms of loading data, based in the np.load function. The choosing between this functions depends on the user and the possibility of use the python package tkinter.
Name |
Description |
|---|---|
Basic function for data load of counts and fields. |
|
Plotting function for field and count data. |
|
Applys a Savitzky-Golay filter to the count data, finds the resonant fields and peak to peak width, and generates the plots of the filtered data, its first and second integrals. |
|
Interactive function for spectrum analysis of the experimental data, applying Savitzky-Golay filter to the data, finding it’s resonant fields, peak to peak distance and first and second integral. |
|
Basic function for data load of counts and fields in Seek. |
|
Applys a Savitzky-Golay filter to the count data, finds the resonant fields and peak to peak width, and generates the plots of the filtered data, its first and second integrals, using the values of the sliders. |
|
Function for data loading and initial analysis, based on tkinter. |
|
Function to analyze the change in peak to peak distance, resonant field position, first and second integral of EPR spectrum data with the temperature. |
Fitting functions#
This methods can be use directly or with the wrap function Fitting, however, the Briggs function for the ADAM method requieres the use of the JAX framework of EPRAYA, described in Jax implementation.
The variance calculated for the fitted parameters is statistical and avoids the calculation for parameters that have a high jacobian correlation number.
Note
The resolution of the grid for powder samples (M=70) converges for the majority of EPR solid cw spectrum, making it related discretation error (DE) negligible for the calculation of the variance. However, it is recommended to change M to a higher resolution (M=90 or M=120) in the following cases:
High anisotropies or low Hpp: Where the gradients of tensores g and A require higher resolutions.
High frequency spectrums.
Verification of convergence: To prove the fit validity.
Name |
Description |
|---|---|
Wrap function for the data fitting process. |
|
Container for the results of the Fitting function. |
|
Calculates the variance of the fit using the Jacobian matrix of the residuals. |
|
Implementation of the Nelder Mead algorithm for fitting data. |
|
Implementation of the Nelder Mead algorithm for fitting data for a single system. |
|
Implementation of the Nelder Mead algorithm for fitting data for multisystems. |
|
Fitting function for the experimental data using the genetic algorithm. |
|
Fitting function for the experimental data using the genetic algorithm for a single system. |
|
Fitting function for the experimental data using the genetic algorithm for multysystems. |
|
Fitting adjutsment of the experimental data using a modified Metrópolis-Simulated annealing approach. |
|
Fitting adjutsment of the experimental data using a modified Metrópolis-Simulated annealing approach for a single system. |
|
Fitting adjutsment of the experimental data using a modified Metrópolis-Simulated annealing approach for multiple systems. |
|
Fitting adjutsment of the experimental data using the scipy.optimize.least_squares method. |
|
Fitting adjutsment of the experimental data using the scipy.optimize.least_squares method. This case is for simple systems. |
|
Fitting adjutsment of the experimental data using the scipy.optimize.least_squares method. This case is for multiple systems. |
|
Wrap function for the ADAM fitting method. |