Arrhenius package
arrhenius.arrhenius
This module defines the Arrhenius procedure
- class arrhenius.arrhenius.Arrhenius(temperatures, conductivity)
Bases:
madap.echem.procedure.EChemProcedure
Class definition for visualization and analysis of Arrhenius equation.
- temperatures
Array of temperatures in Celcius.
- Type
np.array
- conductivity
Array of conductivity in S/cm.
- Type
np.array
- gas_constant
Gas constant in [J/mol.K].
- Type
float
- activation
Activation energy in [mJ/mol].
- Type
float
- arrhenius_constant
Arrhenius constant in [S.cm⁻¹].
- Type
float
- inverted_scale_temperatures
Array of temperatures in 1000/K.
- Type
np.array
- fit_score
R2 score of the fit.
- Type
float
- ln_conductivity_fit
Array of log conductivity fit.
- Type
np.array
- intercept
Intercept of the fit.
- Type
float
- coefficients
Slope of the fit.
- Type
float
- analyze()
Analyze the data and fit the Arrhenius equation.
- property figure
Get the figure of the analysis.
- Returns
matplotlib.figure.Figure
- Return type
obj
- perform_all_actions(save_dir: str, plots: list, optional_name: Optional[str] = None)
Wrapper function to perform all actions:
Analyze the data
Plot the data
Save the data
- Parameters
save_dir (str) – Directory where the data should be saved.
plots (list) – plots to be included in the analysis.
optional_name (str) – Optional name for the analysis.
- plot(save_dir: str, plots: list, optional_name: Optional[str] = None)
Plot the raw data and/or the results of the Arrhenius analysis.
- Parameters
save_dir (str) – Directory where the plots should be saved.
plots (list) – List of plots included in the analysis.
optional_name (str) – Optional name for the analysis.
- save_data(save_dir: str, optional_name: Optional[str] = None)
Save the results of the analysis.
- Parameters
save_dir (str) – Directory where the data should be saved.
optional_name (str) – Optional name for the analysis.
arrhenius.arrhenius_plotting
This module handles the plotting of the Arrhenius procedure
- class arrhenius.arrhenius_plotting.ArrheniusPlotting
Bases:
madap.plotting.plotting.Plots
General Plotting class for Arrhenius method.
- Parameters
Plots (class) – Parent class for plotting all methods.
- arrhenius(subplot_ax, temperatures, log_conductivity, inverted_scale_temperatures, ax_sci_notation=None, scientific_limit: int = 3)
Defines the Arrhenius plot for raw data
- Parameters
subplot_ax (ax) – Subplot axis
temperatures (np.array) – Array of temperatures
log_conductivity (np.array) – Array of log conductivity in [S/cm]
inverted_scale_temperatures (np.array) – Array of inverted scale temperatures in [1000/K]
ax_sci_notation (bool, optional) – If True, adds scientific notation to the axis. Defaults to None.
scientific_limit (int, optional) – If ax_sci_notation is True, defines the number of significant digits. Defaults to None.
- arrhenius_fit(subplot_ax, temperatures, log_conductivity, inverted_scale_temperatures, ln_conductivity_fit, activation, arrhenius_constant, r2_score, ax_sci_notation=None, scientific_limit: int = 3)
Defines the Arrhenius plot for fitted data
- Parameters
subplot_ax (ax) – Subplot axis
temperatures (np.array) – Array of temperatures
log_conductivity (np.array) – Array of log conductivity in [S/cm]
inverted_scale_temperatures (np.array) – Array of inverted scale temperatures in [1000/K]
ln_conductivity_fit (np.array) – Array of fitted log conductivity in [S/cm]
activation (float) – Activation energy in [mJ/mol]
arrhenius_constant (float) – Arrhenius constant in [mJ/mol]
r2_score (float) – R2 score of the fit
ax_sci_notation (bool, optional) – Weather or not scientific notation should be adopted for axis. Defaults to None.
scientific_limit (int, optional) – Number of significant digits. Defaults to 3.
- compose_arrhenius_subplot(plots: list)
Creates subplots template for the Arrhenius plots.
- Parameters
plots (list) – List of plots to be composed.
- Returns
Figure and axis of the subplot.
- Return type
fig, ax