API Reference#

This page documents the public top-level PyDPEET API.

The functions are grouped according to a typical PyDPEET workflow:

  1. Read and write battery test data

  2. Process and structure sequences and primitive segments

  3. Add derived quantities such as SOC, capacity, or resistance

  4. Extract reduced representations and analysis data

Additional utilities and citation helpers are listed separately.

Read and write#

Functions for reading, converting, and exporting battery test data in the unified PyDPEET format.

pydpeet.convert

pydpeet.merge_into_series

Run a list of DataFrames as a single aging test series.

pydpeet.read

Read and convert battery test data into the unified PyDPEET format.

pydpeet.write

Export the given DataFrame to the given output path.

Sequence and primitive processing#

Functions for detecting, correcting, filtering, and visualizing test sequences and primitive segments.

pydpeet.PrimitiveConfig

Container class providing predefined primitive analysis configurations.

pydpeet.SequenceOverviewConfig

Container class providing predefined sequence overview configurations.

pydpeet.add_primitive_segments

Function to perform step analysis to create a segmentation of a dataframe into primitive Segments.

pydpeet.df_primitives_correction

Corrects the primitives in the dataframe based on the given configuration.

pydpeet.extract_sequence_overview

Create a DataFrame of segments and sequences from a DataFrame of primitives.

pydpeet.filter_and_split_df_by_blocks

Filter and split df_segments_and_sequences based on rules and split into multiple DataFrames per block.

pydpeet.primitive_config_wrapper

Factory function to create a PrimitiveConfig instance with non-standard parameters.

pydpeet.sequence_overview_config_wrapper

Factory function to create a SequenceOverviewConfig instance with non-standard parameters.

pydpeet.visualize_phases

Visualizes the given dataframe by plotting all columns over time.

Add derived quantities#

Functions that add derived quantities such as SOC, capacity, or resistance to existing datasets.

pydpeet.add_capacity

Compute the capacity of a battery cell from its discharge data.

pydpeet.add_charge_throughput

Calculate charge throughput and absolute charge throughput from a given DataFrame.

pydpeet.add_cumulative_energy

Calculates cumulative energy [Wh] and absolute cumulative energy [Wh] from 'Test_Time[s]' and 'Power[W]' columns.

pydpeet.add_efficiency_coulomb

Calculate the Coulomb Efficiency of a battery based on the given data.

pydpeet.add_equivalent_full_cycles

Calculate equivalent full cycles from absolute charge throughput and capacity reference.

pydpeet.add_power

Calculates power [W] from 'Current[A]' and 'Voltage[V]' columns and adds it as a new column.

pydpeet.add_resistance_internal

Calculate the internal resistance of a battery from given test data.

pydpeet.add_soc

Computes the Soc (State of Charge) for a battery cell, from the given dataframe.

pydpeet.add_soh

Calculate State of Health (SOH) for the given battery test data.

Extract data#

Functions for extracting OCV points, sequence summaries, and other reduced representations from datasets.

pydpeet.extract_instructions

Generate PyBaMM instructions based on the given primitives dataframe and end condition map.

pydpeet.extract_ocv_dva_ica

Compute DVA and ICA curves from given data.

pydpeet.extract_ocv_iocv

Compute iOCV blocks from given DataFrames.

Citation utilities#

Utilities for handling references, citations, and BibTeX export.

pydpeet.print_references

Print references of all functions that used the @citeme.from_id(...) decorator.

pydpeet.write_to_bibtex

Write the bibliography of all used references (functions with @citeme.from_id(...) decorator) to a BibTeX file.

Other#

Additional public functions, classes, configurations, and utilities that do not belong to one of the main API categories.

pydpeet.BatteryConfig

Container class providing predefined battery configurations.

pydpeet.DataOutputFiletype

Enum representing the file types that can be used for output data.

pydpeet.DeviceConfig

Device configurations used for segment detection and primitive annotation.

pydpeet.ReadConfig

Links device specific reader, formatter and mapper via enums.

pydpeet.SocMethod

Enum representing different methods for computing State of Charge (SOC).

pydpeet.VisualizationConfig

Container class providing predefined visualization configurations.

pydpeet.battery_config_wrapper

Factory function to create a BatteryConfig instance with non-standard parameters.

pydpeet.calculate_minimum_definitive_differences

Calculate minimum definitive differences, that can't be described by noise.

pydpeet.filter_df

Filter the segments and sequences DataFrames and create separate standard and non-standard DataFrames.

pydpeet.load_custom_module

pydpeet.merge_into_campaign

Execute a list of test series and return a list of merged DataFrames.

pydpeet.return_or_print_blocks

Split df_filtered into blocks based on unfiltered rows and return a list of blocks.

pydpeet.set_logging_style

Sets up on import the logging configuration to use the specified level and a custom format.

pydpeet.split_df_by_blocks

Split df_filtered into multiple DataFrames per block.

pydpeet.visualization_config_wrapper

Factory function to create a VisualizationConfig instance with non-standard parameters.