mx_step module
Allows to extract multiple steps at once. All steps are fit at once…
Author: Mario Krattenmacher | Mario.Krattenmacher@semimod.de
- class DMT.extraction.mx_step.MXStep(name, mcard, **kwargs)[source]
Bases:
XStep
Multiple extraction step
- extract()[source]
Perform a parameter extraction. This algorithm should be valid for ALL smallest common XSteps. Compositional XSteps will get another algorithm.
- fit_function(xdata, *args)[source]
This function is passed to curve_fit and is a little abused here, see text below.
The curve_fit function is passed to scipy alongside with the jacobian function. Scipy will call these functions in an alternating way, in order to get the current function value and the jacobian. However this would prevent the usage of parallel computing, hence all calculations are performed inside fit_function. self.jacobian just returns calculation results that have already been calculated in fit_function.
This approach also allows easy implementation of multi-dimensional fits.
- Parameters:
- xdata
np.ndarray
The argument of the fit_function, scipy.curve_fit wants to calculate.
- *argslist-like
These represent the current parameter values that curve_fit is interested in. They are expanded by the full local modelcard.
- xdata
- Returns:
- f_0
np.ndarray
The current value of the model function, possibly normalized.
- f_0
- init_data_reference_per_dataframe(*_args, **_kwargs)[source]
This function needs to append lines to self.reference_data = [{‘x’:x_values, ‘y’:y_values}] from each dataframe in a dut.
Per default overwrite this method since, generally the extraction steps create one or multiple lines from one dataframe independent of other frames.
The attributes self.reference_data is a list of dicts. Each element of the list represents one line with its x_values and y_values. Additional keys can be added, see the x_step_cjc example, where the temperature T of each line has been added.
- jacobian(xdata, *args)[source]
This function returns the jacobian self.jac and possibly normalizes it. This function is only a helper to work with the curve_fit interface.
- set_initial_guess(data_reference)[source]
Find suitable initial guesses for (some of the) model parameters from the given reference data.