API documentation

This is the definite source of information for developers, besides having a look at the actual source code. Each class and public method should be fully documented.

eprfit.fitting_function(x_values, y_values, variables, simulation_parameters, fit_parameters, fit_options)

Fit epr spectrum using simulation_function() and a gradient-based approach.

Parameters
  • x_values (vector) – x values

  • y_values (vector) – experimental y values that should be fitted by the model

  • variables (vector) – variable parameters to be fitted to the data

  • simulation_parameters (struct) – full set of parameters used by simulation_function() to actually simulate the EPR spectrum

  • fit_parameters (struct) – parameters necessary for fitting, such as lower and upper boundaries

  • fit_options (struct) – options set for fitting algorithm

Returns

  • result (vector) – parameters fitted

  • fit_results (struct) – further information about the fitting

eprfit.simulation_function(x_values, variables, parameters, line_handle)

Calculate EPR spectrum using EasySpin routines and providing an interface compatible to MATLAB Optimization Toolbox™ lsqcurvefit and alike.

Usage:

result = eprfit.simulation_function(x_values, variables, parameters)

result = eprfit-simulation_function(x_values, variables, parameters,...
                                    line_handle)
Parameters
  • x_values (vector) – x values to calculate function values \(y = f(x)\) for

  • variables (vector) – Variable parameters returned from optimisation routine

  • parameters (struct) – Full parameter set necessary for simulating the EPR spectrum The parameters contained in the variables vector will be used accordingly.

  • line_handle (handle) – Optional parameter with handle for graphics object (line) whose ydata should be replaced by the current simulation results. Plotting is only done in case this parameter is supplied.

Returns

result – function values \(y = f(x)\)

Return type

vector