galpynostatic.preprocessing module

Module to handle experimental data preprocessing.

class galpynostatic.preprocessing.GetDischargeCapacities(eq_pot=0.0, vcut=0.15)

Bases: TransformerMixin

Obtain the discharge capacities at a given cut-off potential.

This Transformer subtracts the equilibrium potential, eq_pot, from all galvanostatic profiles the to find the discharge capacity for each curve where the potential is cut off by vcut.

Parameters:
  • eq_pot (float, default=0.0) – The equilibrium potential in volts (V).

  • vcut (float, default=0.15) – The cut-off potential in V. The default value is 150 mV, which is the value defined by the distributed map data in the galpynostatic.datasets submodule.

Notes

Discharge capacities are useful to define the maximum value of the State-of-Charge (SOC) for a given galvanostatic charging rate (C-rate), which is the appropriate way to have the data for the galpynostatic.model module. Our suggestion for determining the maximum value of the SOC is to take the maximum value of the discharging capacities corresponding to the value of the C-rate to which the curve already converges with respect to the previous one. In this case, all the values obtained for the discharge capacities are divided by this value and the maximum SOC values are obtained.

fit(X, y=None, **fit_params)

Define the fit parameters.

Parameters:
  • X (Ignored) – Not used, presented for API consistency.

  • y (Ignored) – Not used, presented by convention for sklearn API consistency.

  • **fit_params – Additional keyword arguments that are passed and are documented in scipy.interpolate.InterpolatedUnivariateSpline.

transform(X)

Transform the curves to single values of discharge capacities.

Parameters:

X (list of pandas.DataFrame) – DataFrames having only two columns, the first being the capacity and the second being the voltage.

Returns:

X_new – Discharge capacities in the same order as the pandas.DataFrame in the input list, but reshaped to fit.

Return type:

array-like of shape (n_measurements,)

fit_transform(X, y=None, **fit_params)

Transform the curves to discharge capacities with optional params.

Parameters:
  • X (list of pandas.DataFrame) – DataFrames having only two columns, the first being the capacity and the second being the voltage.

  • y (Ignored) – Not used, presented for sklearn API consistency by convention.

  • **fit_params – Additional keyword arguments that are passed and are documented in scipy.interpolate.InterpolatedUnivariateSpline.

Returns:

X_new – Discharge capacities in the same order as the pandas.DataFrame in the input list, but reshaped to fit.

Return type:

array-like of shape (n_measurements,)