Modulus Module¶
Modulus class
¶
HavNegpy.Modulus fit function
¶
- Modulus.modulus_function(x, b, mm, fm)[source]¶
Strechted exponential modulus function to fit the electrical modulus data
- Parameters
x (float) – log frequency
b (float) – strechted exponent
mm (float) – Modulus maximum
fm (float) – frequency maximum
- Returns
y – estimated log conductivity based on supplied parameters.
- Return type
array
HavNegpy.Modulus dump methods
¶
HavNegpy.Modulus methods for fitting and saving the fit results
¶
- Modulus.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.
- Modulus.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
- Modulus.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.
- Return type
None.