pyprobe.cyclers.basecycler#

A module to load and process battery cycler data.

Classes

BaseCycler(*, input_data_path[, ...])

A class to load and process battery cycler data.

class BaseCycler(*, input_data_path, output_data_path=None, compression_priority='performance', overwrite_existing=False, header_row_index=0, column_importers, extra_column_importers=<factory>)#

Bases: BaseModel

A class to load and process battery cycler data.

Parameters:
  • input_data_path (str)

  • output_data_path (str | None)

  • compression_priority (Literal['performance', 'file size', 'uncompressed'])

  • overwrite_existing (bool)

  • header_row_index (int)

  • column_importers (list[ColumnMap])

  • extra_column_importers (list[ColumnMap])

classmethod validate_input_path(v)#

Validate that the input path exists.

Parameters:

v (str)

Return type:

str

validate_output_path()#

Set the default output path if not provided.

Return type:

BaseCycler

import_and_validate_data()#

Import the data and validate the column mapping.

Return type:

BaseCycler

get_imported_dataframe(dataframe_list)#

Return a single DataFrame from a list of DataFrames.

Parameters:

dataframe_list (list[DataFrame]) – A list of DataFrames.

Returns:

A single DataFrame.

Return type:

DataFrame

static read_file(filepath, header_row_index=0)#

Read a battery cycler file into a DataFrame.

Parameters:
  • filepath (str) – The path to the file.

  • header_row_index (int) – The index of the header row.

  • header_row_index – The index of the header row.

Returns:

The DataFrame.

Return type:

pl.DataFrame | pl.LazyFrame

static event_expr()#

Return the event expression.

Return type:

Expr

get_pyprobe_dataframe()#

Return the PyProBE DataFrame.

Return type:

DataFrame

process()#

Process the battery cycler data.

Return type:

None

model_config = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].