pyprobe.cyclers.maccor#

A module to load and process Maccor battery cycler data.

Classes

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

A class to load and process Neware battery cycler data.

MaccorCapacityFromCurrentSign(...)

A class to calculate capacity from current and sign columns.

MaccorDateTime(date_column, time_column, ...)

A class to convert a date and time column into a single datetime column.

class MaccorCapacityFromCurrentSign(capacity_column, current_column)#

Bases: CapacityFromCurrentSignMap

A class to calculate capacity from current and sign columns.

Specific for maccor data where columns have no units.

Parameters:
  • capacity_column (str)

  • current_column (str)

property capacity: Expr#

Get the capacity column.

class MaccorDateTime(date_column, time_column, datetime_format)#

Bases: ColumnMap

A class to convert a date and time column into a single datetime column.

Specific for maccor data where the date column is not sampled at the same rate as the time column.

Parameters:
  • date_column (str)

  • time_column (str)

  • datetime_format (str)

property expr: Expr#

Get the expression to convert the columns.

class Maccor(*, input_data_path, output_data_path=None, compression_priority='performance', overwrite_existing=False, header_row_index=0, column_importers=[<pyprobe.cyclers.maccor.MaccorDateTime object>, <pyprobe.cyclers.column_maps.CastAndRenameMap object>, <pyprobe.cyclers.column_maps.CastAndRenameMap object>, <pyprobe.cyclers.column_maps.CastAndRenameMap object>, <pyprobe.cyclers.column_maps.CastAndRenameMap object>, <pyprobe.cyclers.maccor.MaccorCapacityFromCurrentSign object>, <pyprobe.cyclers.column_maps.CastAndRenameMap object>], extra_column_importers=<factory>)#

Bases: BaseCycler

A class to load and process Neware 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])

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.

Returns:

The DataFrame.

Return type:

pl.DataFrame | pl.LazyFrame

model_config = {}#

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