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

epraya.Sload

Basic function for data load of counts and fields.

epraya.Splot

Plotting function for field and count data.

epraya.Sfilter

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.

epraya.Overseer

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.

epraya.Sload1

Basic function for data load of counts and fields in Seek.

epraya.Spmanipulation

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.

epraya.Seek

Function for data loading and initial analysis, based on tkinter.

epraya.Termal

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

epraya.Fitting

Wrap function for the data fitting process.

epraya.Fitresult

Container for the results of the Fitting function.

epraya.Selectvarian

Calculates the variance of the fit using the Jacobian matrix of the residuals.

epraya.Nelder

Implementation of the Nelder Mead algorithm for fitting data.

epraya.Nelder1

Implementation of the Nelder Mead algorithm for fitting data for a single system.

epraya.Nelder2

Implementation of the Nelder Mead algorithm for fitting data for multisystems.

epraya.Genio

Fitting function for the experimental data using the genetic algorithm.

epraya.Genio1

Fitting function for the experimental data using the genetic algorithm for a single system.

epraya.Genio2

Fitting function for the experimental data using the genetic algorithm for multysystems.

epraya.Metro

Fitting adjutsment of the experimental data using a modified Metrópolis-Simulated annealing approach.

epraya.Metro1

Fitting adjutsment of the experimental data using a modified Metrópolis-Simulated annealing approach for a single system.

epraya.Metro2

Fitting adjutsment of the experimental data using a modified Metrópolis-Simulated annealing approach for multiple systems.

epraya.LSquare

Fitting adjutsment of the experimental data using the scipy.optimize.least_squares method.

epraya.LSquare1

Fitting adjutsment of the experimental data using the scipy.optimize.least_squares method. This case is for simple systems.

epraya.LSquare2

Fitting adjutsment of the experimental data using the scipy.optimize.least_squares method. This case is for multiple systems.

epraya.Briggs

Wrap function for the ADAM fitting method.