pyprobe.cyclers.neware module#

A module to load and process Neware battery cycler data.

pydantic model Neware(*, input_data_path, column_dict={'Capacity(*)': 'Capacity [*]', 'Chg. Cap.(*)': 'Charge Capacity [*]', 'Current(*)': 'Current [*]', 'DChg. Cap.(*)': 'Discharge Capacity [*]', 'Date': 'Date', 'Step Index': 'Step', 'T1(*)': 'Temperature [*]', 'Total Time': 'Time [*]', 'Voltage(*)': 'Voltage [*]'}, datetime_format=None)#

Bases: BaseCycler

A class to load and process Neware battery cycler data.

Validators:
Parameters:
  • input_data_path (str)

  • column_dict (dict[str, str])

  • datetime_format (str | None)

Return type:

None

field input_data_path: str [Required]#

The path to the input data.

Validated by:
field column_dict: dict[str, str] = {'Capacity(*)': 'Capacity [*]', 'Chg. Cap.(*)': 'Charge Capacity [*]', 'Current(*)': 'Current [*]', 'DChg. Cap.(*)': 'Discharge Capacity [*]', 'Date': 'Date', 'Step Index': 'Step', 'T1(*)': 'Temperature [*]', 'Total Time': 'Time [*]', 'Voltage(*)': 'Voltage [*]'}#

A dictionary mapping the column name format of the cycler to the PyProBE format. Units are indicated by an asterisk (*).

Validated by:
static read_file(filepath)#

Read a battery cycler file into a DataFrame.

Parameters:

filepath (str) – The path to the file.

Returns:

The DataFrame.

Return type:

pl.DataFrame | pl.LazyFrame

property time: Expr#

Identify and format the time column.

For Neware data, by default the time column is calculated from the “Date” column if it exists.

Returns:

A polars expression for the time column.

Return type:

pl.Expr

property charge_capacity: Expr#

Identify and format the charge capacity column.

For the Neware cycler, this is either the “Chg. Cap.(*)” column or the “Capacity(*)” column when the current is positive.

Returns:

A polars expression for the charge capacity column.

Return type:

pl.Expr

property discharge_capacity: Expr#

Identify and format the discharge capacity column.

For the Neware cycler, this is either the “DChg. Cap.(*)” column or the “Capacity(*)” column when the current is negative.

Returns:

A polars expression for the discharge capacity column.

Return type:

pl.Expr

property capacity: Expr#

Identify and format the capacity column.

For the Neware cycler remove the option to calculate the capacity from a single capacity column.

Returns:

A polars expression for the capacity column.

Return type:

pl.Expr