pyprobe.cyclers.maccor module#
A module to load and process Maccor battery cycler data.
- pydantic model Maccor(*, input_data_path, column_dict={'Capacity': 'Capacity [*]', 'Current': 'Current [*]', 'DPT Time': 'Date', 'Step': 'Step', 'Temp 1': 'Temperature [*]', 'Test Time (sec)': 'Time [*]', 'Voltage': 'Voltage [*]'}, datetime_format='%d-%b-%y %I:%M:%S %p')#
Bases:
BaseCycler
A class to load and process Neware battery cycler data.
- Validators:
_check_column_dict
»column_dict
_check_input_data_path
»input_data_path
- Parameters:
input_data_path (str)
column_dict (dict[str, str])
datetime_format (str)
- Return type:
None
- field input_data_path: str [Required]#
The path to the input data.
- Validated by:
_check_input_data_path
- field column_dict: dict[str, str] = {'Capacity': 'Capacity [*]', 'Current': 'Current [*]', 'DPT Time': 'Date', 'Step': 'Step', 'Temp 1': 'Temperature [*]', 'Test Time (sec)': '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:
_check_column_dict
- field datetime_format: str = '%d-%b-%y %I:%M:%S %p'#
The string format of the date column if present. See the chrono crate documentation for more information on the format string.
- 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 date: Expr#
Identify and format the date column.
For the Maccor cycler, this takes the first date in the file and adds the time column to it.
- Returns:
A polars expression for the date column.
- Return type:
pl.Expr
- property charge_capacity: Expr#
Identify and format the charge capacity column.
For the Maccor cycler, this is 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 Maccor cycler, this is 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 Maccor 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