HN derivative Module¶
HN_derivative class
¶
HavNegpy.HN_derivative fit functions
¶
- HN_derivative.deri_hn(x, b, g, fm, deps)[source]¶
derivaitive HN fit function to fit single peak
- Parameters
x (float) – frequency.
b (float) – symmetric fractional parameter.
g (float) – asymmetric fractional parameter.
fm (float) – maximum frequency of the peak.
deps (float) – dielectric strength.
- Returns
y – estimated log derivative of epsilon’ based on the supplied parameters.
- Return type
array
- HN_derivative.deri_hn_ep(x, b, g, fm, deps, A, l)[source]¶
derivaitive HN fit function to fit single peak along with electrode polarization(ep)
- Parameters
x (float) – frequency.
b (float) – symmetric fractional parameter.
g (float) – asymmetric fractional parameter.
fm (float) – maximum frequency of the loss peak.
deps (float) – dielectric strength.
A (float) – electrode polarization value.
l (float) – power law exponent.
- Returns
y – estimated log derivative of epsilon’ based on the supplied parameters.
- Return type
array
- HN_derivative.deri_double_hn(x, b1, g1, fm1, deps1, b2, g2, fm2, deps2)[source]¶
derivaitive HN fit function to fit two peaks
- Parameters
x (float) – frequency.
b1 (float) – symmetric fractional parameter of the 1st peak.
g1 (float) – asymmetric fractional parameter of the 1st peak.
fm1 (float) – maximum frequency of the 1st peak.
deps1 (float) – dielectric strength of the 1st peak.
b2 (float) – symmetric fractional parameter of the 2nd peak.
g2 (float) – asymmetric fractional parameter of the 2nd peak.
fm2 (float) – maximum frequency of the 2nd peak.
deps2 (float) – dielectric strength of the 2nd peak.
- Returns
y – estimated log derivative of epsilon’ based on the supplied parameters.
- Return type
array
- HN_derivative.ep_s(x, A, l)[source]¶
Function to estimate the electrode polarization(EP) contribution from the total fit
While fitting, the deconvoluted EP is based on this function.
- Parameters
x (float) – frequency.
A (float) – electrode polarization value.
l (float) – power law exponent.
- Returns
y – estimated log EP.
- Return type
array
HavNegpy.HN_derivative dump methods
¶
HavNegpy.HN_derivative initial view methods
¶
- HN_derivative.initial_view_deri_hn(x, y)[source]¶
plots the derivative hn function based on the initial parameters given via the dump_parameters method
- Parameters
x (array) – log frequency.
y (array) – log derivative of epsilon’.
- Return type
None.
HavNegpy.HN_derivaitve methods for fitting and saving the fit results
¶
- HN_derivative.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.
- HN_derivative.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 dielectric loss
- HN_derivative.fit(x, y)[source]¶
Fits the derivaitve of epsilon’ 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 dielectric loss.
- Returns
fit_par – dictionary containing the fit parameters.
- Return type
dictionary
- HN_derivative.save_fit_deri_hn(T)[source]¶
saves the fit parameters of derivative hn function in a file the file must be created via create_analysis_file function
- Parameters
T (float) – Temperature,or can also be an integer that corresponds to a file number during analysis.
- Return type
None.
- HN_derivative.save_fit_deri_hn_ep(T)[source]¶
saves the fit parameters of derivaitve hn function with electrode polarization in a file, the file must be created via create_analysis_file function
- Parameters
T (float) – Temperature,or can also be an integer that corresponds to a file number during analysis.
- Return type
None.
- HN_derivative.save_fit_deri_double_HN(T)[source]¶
saves the fit parameters of derivaitve double hn function in a file, the file must be created via create_analysis_file function
- Parameters
T (float) – Temperature,or can also be an integer that corresponds to a file number during analysis.
- Return type
None.