Conductivity Module¶
Conductivity class
¶
HavNegpy.Conductivity fit function
¶
- Conductivity.jonscher_function(x, fc, DC, n)[source]¶
Jonscher power law function to fit the conductivity data
- Parameters
x (float) – log frequency
fc (float) – onset frequency
DC (float) – DC conductivity value
n (float) – power law exponent
- Returns
y – estimated log conductivity based on supplied parameters.
- Return type
array
- Conductivity.rbm_function(x, fc, DC)[source]¶
Jonscher power law function to fit the conductivity data
- Parameters
x (float) – log frequency
fc (float) – onset frequency
DC (float) – DC conductivity value
n (float) – power law exponent
- Returns
y – estimated log conductivity based on supplied parameters.
- Return type
array
HavNegpy.Conductivity dump methods
¶
HavNegpy.Conductivity methods for fitting and saving the fit results
¶
- Conductivity.create_analysis_file()[source]¶
Creates a file to save the fit results based on the choice of fit function
Provides option to use an existing file and creates a new file if not found
- Return type
None.
- Conductivity.select_range(x, y)[source]¶
Selects the region of interest to fit data using mplcursors allows two clicks to select the lower and upper bound of the x-axis and returns the selected x and y vaues for fitting
- Returns
x1 (array) – log frequency
y1 (array) – log real part of complex conductivity
- Conductivity.fit(x, y)[source]¶
Fits the conductivity data with choice of fit function The fit parameters are declared as global variables to be saved via save_fit function
The initial fit parameters are taken from json file and the final fit parameters are dumped in the same json file to be used for next iteration.
- Parameters
x (array) – log frequency.
y (array) – log conductivity.
- Returns
fit_par – dictionary containing the fit parameters.
- Return type
dictionary