cellpy.parameters package

Contents

cellpy.parameters package#

Subpackages#

Submodules#

cellpy.parameters.internal_settings module#

Internal settings and definitions and functions for getting them.

class BaseHeaders[source]#

Bases: BaseSettings

Subclass of BaseSetting including option to add postfixes.

Example

>>> header["key_postfix"]  # returns "value_postfix"
postfixes = []#
class BaseSettings[source]#

Bases: DictLikeClass

Base class for internal cellpy settings.

Usage:

@dataclass
class MyCoolCellpySetting(BaseSetting):
    var1: str = "first var"
    var2: int = 12
get(key)[source]#

Get the value (postfixes not supported).

to_frame()[source]#

Converts to pandas dataframe

class CellpyLimits(current_hard: float = 1e-13, current_soft: float = 1e-05, stable_current_hard: float = 2.0, stable_current_soft: float = 4.0, stable_voltage_hard: float = 2.0, stable_voltage_soft: float = 4.0, stable_charge_hard: float = 0.9, stable_charge_soft: float = 5.0, ir_change: float = 1e-05)[source]#

Bases: BaseSettings

These are the limits used inside cellpy for finding step types.

Since all instruments have an inherent inaccuracy, it is naive to assume that for example the voltage within a constant voltage step does not change at all. Therefore, we need to define some limits for what we consider to be a constant and what we assume to be zero.

current_hard: float = 1e-13#
current_soft: float = 1e-05#
ir_change: float = 1e-05#
stable_charge_hard: float = 0.9#
stable_charge_soft: float = 5.0#
stable_current_hard: float = 2.0#
stable_current_soft: float = 4.0#
stable_voltage_hard: float = 2.0#
stable_voltage_soft: float = 4.0#
class CellpyMeta[source]#

Bases: object

Base class for meta-data in cellpy.

digest(as_list: bool = False, **kwargs)[source]#

Pops from dictionary of form {key: [values]}

Parameters:
  • as_list (bool) – pick only first scalar if True.

  • **kwargs (dict) – key word attributes to pick.

Returns:

Dictionary containing the non-digested part.

to_frame()[source]#

Converts to pandas dataframe

update(as_list: bool = False, **kwargs)[source]#

Updates from dictionary of form {key: [values]}

Parameters:
  • as_list (bool) – pick only first scalar if True.

  • **kwargs (dict) – key word attributes to update.

Returns:

None

class CellpyMetaCommon(cell_name: str | None = None, start_datetime: str | None = None, time_zone: str | None = None, comment: CellPyDataConfig | None = '', file_errors: str | None = None, raw_id: str | None = None, cellpy_file_version: int = 8, tester_ID: CellPyDataConfig | None = None, tester_server_software_version: CellPyDataConfig | None = None, tester_client_software_version: CellPyDataConfig | None = None, tester_calibration_date: CellPyDataConfig | None = None, material: CellPyDataConfig | None = 'silicon', mass: CellPyDataConfig | None = 1.0, tot_mass: CellPyDataConfig | None = 1.0, nom_cap: CellPyDataConfig | None = 1.0, nom_cap_specifics: CellPyDataConfig | None = 'gravimetric', active_electrode_area: CellPyDataConfig | None = 1.0, active_electrode_thickness: CellPyDataConfig | None = 1.0, active_electrode_loading: CellPyDataConfig | None = 1.0, electrolyte_volume: CellPyDataConfig | None = 1.0, electrolyte_type: CellPyDataConfig | None = 'standard', active_electrode_type: CellPyDataConfig | None = 'standard', counter_electrode_type: CellPyDataConfig | None = 'standard', reference_electrode_type: CellPyDataConfig | None = 'standard', experiment_type: CellPyDataConfig | None = 'cycling', cell_type: CellPyDataConfig | None = 'standard', separator_type: CellPyDataConfig | None = 'standard', active_electrode_current_collector: CellPyDataConfig | None = 'standard', reference_electrode_current_collector: CellPyDataConfig | None = 'standard')[source]#

Bases: CellpyMeta

Common (not test-dependent) meta-data for cellpy.

active_electrode_area: CellPyDataConfig | None = 1.0#
active_electrode_current_collector: CellPyDataConfig | None = 'standard'#
active_electrode_loading: CellPyDataConfig | None = 1.0#
active_electrode_thickness: CellPyDataConfig | None = 1.0#
active_electrode_type: CellPyDataConfig | None = 'standard'#
cell_name: str | None = None#
cell_type: CellPyDataConfig | None = 'standard'#
cellpy_file_version: int = 8#
comment: CellPyDataConfig | None = ''#
counter_electrode_type: CellPyDataConfig | None = 'standard'#
electrolyte_type: CellPyDataConfig | None = 'standard'#
electrolyte_volume: CellPyDataConfig | None = 1.0#
experiment_type: CellPyDataConfig | None = 'cycling'#
file_errors: str | None = None#
mass: CellPyDataConfig | None = 1.0#
material: CellPyDataConfig | None = 'silicon'#
nom_cap: CellPyDataConfig | None = 1.0#
nom_cap_specifics: CellPyDataConfig | None = 'gravimetric'#
raw_id: str | None = None#
reference_electrode_current_collector: CellPyDataConfig | None = 'standard'#
reference_electrode_type: CellPyDataConfig | None = 'standard'#
separator_type: CellPyDataConfig | None = 'standard'#
start_datetime: str | None = None#
tester_ID: CellPyDataConfig | None = None#
tester_calibration_date: CellPyDataConfig | None = None#
tester_client_software_version: CellPyDataConfig | None = None#
tester_server_software_version: CellPyDataConfig | None = None#
time_zone: str | None = None#
tot_mass: CellPyDataConfig | None = 1.0#
class CellpyMetaIndividualTest(channel_index: CellPyDataConfig | None = None, creator: str | None = None, test_type: CellPyDataConfig | None = None, voltage_lim_low: CellPyDataConfig | None = 0.0, voltage_lim_high: CellPyDataConfig | None = 1.0, cycle_mode: CellPyDataConfig | None = 'anode', test_ID: CellPyDataConfig | None = None)[source]#

Bases: CellpyMeta

Test-dependent meta-data for cellpy.

channel_index: CellPyDataConfig | None = None#
creator: str | None = None#
cycle_mode: CellPyDataConfig | None = 'anode'#
schedule_file_name = None#
test_ID: CellPyDataConfig | None = None#
test_type: CellPyDataConfig | None = None#
voltage_lim_high: CellPyDataConfig | None = 1.0#
voltage_lim_low: CellPyDataConfig | None = 0.0#
class CellpyUnits(current: str = 'A', charge: str = 'mAh', voltage: str = 'V', time: str = 'sec', resistance: str = 'ohm', power: str = 'W', energy: str = 'Wh', frequency: str = 'hz', mass: str = 'mg', nominal_capacity: str = 'mAh/g', specific_gravimetric: str = 'g', specific_areal: str = 'cm**2', specific_volumetric: str = 'cm**3', length: str = 'cm', area: str = 'cm**2', volume: str = 'cm**3', temperature: str = 'C', pressure: str = 'bar')[source]#

Bases: BaseSettings

These are the units used inside Cellpy.

At least two sets of units needs to be defined; cellpy_units and raw_units. The data.raw dataframe is given in raw_units where the units are defined inside the instrument loader used. Since the data.steps dataframe is a summary of the step statistics from the data.raw dataframe, this also uses the raw_units. The data.summary dataframe contains columns with values directly from the data.raw dataframe given in raw_units as well as calculated columns given in cellpy_units.

Remark that all input to cellpy through user interaction (or utils) should be in cellpy_units. This is also true for meta-data collected from the raw files. The instrument loader needs to take care of the translation from its raw units to cellpy_units during loading the raw data file for the meta-data (remark that this is not necessary and not recommended for the actual “raw” data that is going to be stored in the data.raw dataframe).

As of 2022.09.29, cellpy does not automatically ensure unit conversion for input of meta-data, but has an internal method (CellPyData.to_cellpy_units) that can be used.

These are the different attributes currently supported for data in the dataframes:

current: str = "A"
charge: str = "mAh"
voltage: str = "V"
time: str = "sec"
resistance: str = "Ohms"
power: str = "W"
energy: str = "Wh"
frequency: str = "hz"

And here are the different attributes currently supported for meta-data:

# output-units for specific capacity etc.
specific_gravimetric: str = "g"
specific_areal: str = "cm**2"  # used for calculating specific capacity etc.
specific_volumetric: str = "cm**3"  # used for calculating specific capacity etc.

# other meta-data
nominal_capacity: str = "mAh/g"  # used for calculating rates etc.
mass: str = "mg"
length: str = "cm"
area: str = "cm**2"
volume: str = "cm**3"
temperature: str = "C"
area: str = 'cm**2'#
charge: str = 'mAh'#
current: str = 'A'#
energy: str = 'Wh'#
frequency: str = 'hz'#
length: str = 'cm'#
mass: str = 'mg'#
nominal_capacity: str = 'mAh/g'#
power: str = 'W'#
pressure: str = 'bar'#
resistance: str = 'ohm'#
specific_areal: str = 'cm**2'#
specific_gravimetric: str = 'g'#
specific_volumetric: str = 'cm**3'#
temperature: str = 'C'#
time: str = 'sec'#
update(new_units: dict)[source]#

Update the units.

voltage: str = 'V'#
volume: str = 'cm**3'#
class DictLikeClass[source]#

Bases: object

Add some dunder-methods so that it does not break old code that used dictionaries for storing settings

Remarks: it is not a complete dictionary experience - for example, setting new attributes (new keys) is not supported (raises KeyError if using the typical dict setting method) since it uses the dataclasses.fields method to find its members.

items()[source]#
keys()[source]#
values()[source]#
class HeaderDict(dict=None, /, **kwargs)[source]#

Bases: UserDict

A Sub-class of dict to allow for tab-completion.

class HeadersJournal(filename: str = 'filename', file_name_indicator: str = 'file_name_indicator', mass: str = 'mass', total_mass: str = 'total_mass', loading: str = 'loading', area: str = 'area', nom_cap: str = 'nom_cap', experiment: str = 'experiment', fixed: str = 'fixed', label: str = 'label', cell_type: str = 'cell_type', instrument: str = 'instrument', model: str = 'model', raw_file_names: str = 'raw_file_names', cellpy_file_name: str = 'cellpy_file_name', group: str = 'group', sub_group: str = 'sub_group', group_label: str = 'group_label', comment: str = 'comment', argument: str = 'argument', id_key: str = 'id_key', nom_cap_specifics: str = 'nom_cap_specifics', selected: str = 'selected')[source]#

Bases: BaseHeaders

Headers used for the journal (batch) (used as column headers for the journal pandas DataFrames)

area: str = 'area'#
argument: str = 'argument'#
cell_type: str = 'cell_type'#
cellpy_file_name: str = 'cellpy_file_name'#
comment: str = 'comment'#
experiment: str = 'experiment'#
file_name_indicator: str = 'file_name_indicator'#
filename: str = 'filename'#
fixed: str = 'fixed'#
group: str = 'group'#
group_label: str = 'group_label'#
id_key: str = 'id_key'#
instrument: str = 'instrument'#
label: str = 'label'#
loading: str = 'loading'#
mass: str = 'mass'#
model: str = 'model'#
nom_cap: str = 'nom_cap'#
nom_cap_specifics: str = 'nom_cap_specifics'#
raw_file_names: str = 'raw_file_names'#
selected: str = 'selected'#
sub_group: str = 'sub_group'#
total_mass: str = 'total_mass'#
class HeadersNormal(aci_phase_angle_txt: str = 'aci_phase_angle', ref_aci_phase_angle_txt: str = 'ref_aci_phase_angle', ac_impedance_txt: str = 'ac_impedance', ref_ac_impedance_txt: str = 'ref_ac_impedance', charge_capacity_txt: str = 'charge_capacity', charge_energy_txt: str = 'charge_energy', current_txt: str = 'current', cycle_index_txt: str = 'cycle_index', data_point_txt: str = 'data_point', datetime_txt: str = 'date_time', discharge_capacity_txt: str = 'discharge_capacity', discharge_energy_txt: str = 'discharge_energy', internal_resistance_txt: str = 'internal_resistance', power_txt: str = 'power', is_fc_data_txt: str = 'is_fc_data', step_index_txt: str = 'step_index', sub_step_index_txt: str = 'sub_step_index', step_time_txt: str = 'step_time', sub_step_time_txt: str = 'sub_step_time', test_id_txt: str = 'test_id', test_time_txt: str = 'test_time', voltage_txt: str = 'voltage', ref_voltage_txt: str = 'reference_voltage', dv_dt_txt: str = 'dv_dt', frequency_txt: str = 'frequency', amplitude_txt: str = 'amplitude', channel_id_txt: str = 'channel_id', data_flag_txt: str = 'data_flag', test_name_txt: str = 'test_name')[source]#

Bases: BaseHeaders

Headers used for the normal (raw) data (used as column headers for the main data pandas DataFrames)

ac_impedance_txt: str = 'ac_impedance'#
aci_phase_angle_txt: str = 'aci_phase_angle'#
amplitude_txt: str = 'amplitude'#
channel_id_txt: str = 'channel_id'#
charge_capacity_txt: str = 'charge_capacity'#
charge_energy_txt: str = 'charge_energy'#
current_txt: str = 'current'#
cycle_index_txt: str = 'cycle_index'#
data_flag_txt: str = 'data_flag'#
data_point_txt: str = 'data_point'#
datetime_txt: str = 'date_time'#
discharge_capacity_txt: str = 'discharge_capacity'#
discharge_energy_txt: str = 'discharge_energy'#
dv_dt_txt: str = 'dv_dt'#
frequency_txt: str = 'frequency'#
internal_resistance_txt: str = 'internal_resistance'#
is_fc_data_txt: str = 'is_fc_data'#
power_txt: str = 'power'#
ref_ac_impedance_txt: str = 'ref_ac_impedance'#
ref_aci_phase_angle_txt: str = 'ref_aci_phase_angle'#
ref_voltage_txt: str = 'reference_voltage'#
step_index_txt: str = 'step_index'#
step_time_txt: str = 'step_time'#
sub_step_index_txt: str = 'sub_step_index'#
sub_step_time_txt: str = 'sub_step_time'#
test_id_txt: str = 'test_id'#
test_name_txt: str = 'test_name'#
test_time_txt: str = 'test_time'#
voltage_txt: str = 'voltage'#
class HeadersStepTable(test: str = 'test', ustep: str = 'ustep', cycle: str = 'cycle', step: str = 'step', test_time: str = 'test_time', step_time: str = 'step_time', sub_step: str = 'sub_step', type: str = 'type', sub_type: str = 'sub_type', info: str = 'info', voltage: str = 'voltage', current: str = 'current', charge: str = 'charge', discharge: str = 'discharge', point: str = 'point', internal_resistance: str = 'ir', internal_resistance_change: str = 'ir_pct_change', rate_avr: str = 'rate_avr')[source]#

Bases: BaseHeaders

Headers used for the steps table (used as column headers for the steps pandas DataFrames)

charge: str = 'charge'#
current: str = 'current'#
cycle: str = 'cycle'#
discharge: str = 'discharge'#
info: str = 'info'#
internal_resistance: str = 'ir'#
internal_resistance_change: str = 'ir_pct_change'#
point: str = 'point'#
rate_avr: str = 'rate_avr'#
step: str = 'step'#
step_time: str = 'step_time'#
sub_step: str = 'sub_step'#
sub_type: str = 'sub_type'#
test: str = 'test'#
test_time: str = 'test_time'#
type: str = 'type'#
ustep: str = 'ustep'#
voltage: str = 'voltage'#
class HeadersSummary(cycle_index: str = 'cycle_index', data_point: str = 'data_point', test_time: str = 'test_time', datetime: str = 'date_time', discharge_capacity_raw: str = 'discharge_capacity', charge_capacity_raw: str = 'charge_capacity', test_name: str = 'test_name', data_flag: str = 'data_flag', channel_id: str = 'channel_id', coulombic_efficiency: str = 'coulombic_efficiency', cumulated_coulombic_efficiency: str = 'cumulated_coulombic_efficiency', discharge_capacity: str = 'discharge_capacity', charge_capacity: str = 'charge_capacity', cumulated_charge_capacity: str = 'cumulated_charge_capacity', cumulated_discharge_capacity: str = 'cumulated_discharge_capacity', coulombic_difference: str = 'coulombic_difference', cumulated_coulombic_difference: str = 'cumulated_coulombic_difference', discharge_capacity_loss: str = 'discharge_capacity_loss', charge_capacity_loss: str = 'charge_capacity_loss', cumulated_discharge_capacity_loss: str = 'cumulated_discharge_capacity_loss', cumulated_charge_capacity_loss: str = 'cumulated_charge_capacity_loss', normalized_charge_capacity: str = 'normalized_charge_capacity', normalized_discharge_capacity: str = 'normalized_discharge_capacity', shifted_charge_capacity: str = 'shifted_charge_capacity', shifted_discharge_capacity: str = 'shifted_discharge_capacity', ir_discharge: str = 'ir_discharge', ir_charge: str = 'ir_charge', ocv_first_min: str = 'ocv_first_min', ocv_second_min: str = 'ocv_second_min', ocv_first_max: str = 'ocv_first_max', ocv_second_max: str = 'ocv_second_max', end_voltage_discharge: str = 'end_voltage_discharge', end_voltage_charge: str = 'end_voltage_charge', cumulated_ric_disconnect: str = 'cumulated_ric_disconnect', cumulated_ric_sei: str = 'cumulated_ric_sei', cumulated_ric: str = 'cumulated_ric', normalized_cycle_index: str = 'normalized_cycle_index', low_level: str = 'low_level', high_level: str = 'high_level', temperature_last: str = 'temperature_last', temperature_mean: str = 'temperature_mean', charge_c_rate: str = 'charge_c_rate', discharge_c_rate: str = 'discharge_c_rate', pre_aux: str = 'aux_')[source]#

Bases: BaseHeaders

Headers used for the summary data (used as column headers for the main data pandas DataFrames)

In addition to the headers defined here, the summary might also contain specific headers (ending in _gravimetric or _areal).

property areal_charge_capacity: str#
property areal_discharge_capacity: str#
channel_id: str = 'channel_id'#
charge_c_rate: str = 'charge_c_rate'#
charge_capacity: str = 'charge_capacity'#
charge_capacity_loss: str = 'charge_capacity_loss'#
charge_capacity_raw: str = 'charge_capacity'#
coulombic_difference: str = 'coulombic_difference'#
coulombic_efficiency: str = 'coulombic_efficiency'#
cumulated_charge_capacity: str = 'cumulated_charge_capacity'#
cumulated_charge_capacity_loss: str = 'cumulated_charge_capacity_loss'#
cumulated_coulombic_difference: str = 'cumulated_coulombic_difference'#
cumulated_coulombic_efficiency: str = 'cumulated_coulombic_efficiency'#
cumulated_discharge_capacity: str = 'cumulated_discharge_capacity'#
cumulated_discharge_capacity_loss: str = 'cumulated_discharge_capacity_loss'#
cumulated_ric: str = 'cumulated_ric'#
cumulated_ric_disconnect: str = 'cumulated_ric_disconnect'#
cumulated_ric_sei: str = 'cumulated_ric_sei'#
cycle_index: str = 'cycle_index'#
data_flag: str = 'data_flag'#
data_point: str = 'data_point'#
datetime: str = 'date_time'#
discharge_c_rate: str = 'discharge_c_rate'#
discharge_capacity: str = 'discharge_capacity'#
discharge_capacity_loss: str = 'discharge_capacity_loss'#
discharge_capacity_raw: str = 'discharge_capacity'#
end_voltage_charge: str = 'end_voltage_charge'#
end_voltage_discharge: str = 'end_voltage_discharge'#
high_level: str = 'high_level'#
ir_charge: str = 'ir_charge'#
ir_discharge: str = 'ir_discharge'#
low_level: str = 'low_level'#
normalized_charge_capacity: str = 'normalized_charge_capacity'#
normalized_cycle_index: str = 'normalized_cycle_index'#
normalized_discharge_capacity: str = 'normalized_discharge_capacity'#
ocv_first_max: str = 'ocv_first_max'#
ocv_first_min: str = 'ocv_first_min'#
ocv_second_max: str = 'ocv_second_max'#
ocv_second_min: str = 'ocv_second_min'#
postfixes = ['gravimetric', 'areal', 'absolute']#
pre_aux: str = 'aux_'#
shifted_charge_capacity: str = 'shifted_charge_capacity'#
shifted_discharge_capacity: str = 'shifted_discharge_capacity'#
property specific_columns: List[str]#

Returns a list of the columns that can be “specific” (e.g. pr. mass or pr. area) for the summary table.

temperature_last: str = 'temperature_last'#
temperature_mean: str = 'temperature_mean'#
test_name: str = 'test_name'#
test_time: str = 'test_time'#
class InstrumentSettings[source]#

Bases: DictLikeClass

Base class for instrument settings.

Usage:

@dataclass
class MyCoolInstrumentSetting(InstrumentSettings):
    var1: str = "first var"
    var2: int = 12

Remark! Try to use it as you would use a normal dataclass.

get_cellpy_units(*args, **kwargs) CellpyUnits[source]#

Returns an augmented global dictionary with units

get_default_cellpy_file_raw_units(*args, **kwargs) CellpyUnits[source]#

Returns a dictionary with units to use as default for old versions of cellpy files

get_default_custom_headers_summary() HeadersSummary[source]#

Returns an augmented dictionary that can be used to create custom header-strings for the summary (used as column headers for the summary pandas DataFrames)

This function is mainly implemented to provide an example.

get_default_output_units(*args, **kwargs) CellpyUnits[source]#

Returns an augmented dictionary with units to use as default.

get_default_raw_limits() CellpyLimits[source]#

Returns an augmented dictionary with units as default for raw data

get_default_raw_units(*args, **kwargs) CellpyUnits[source]#

Returns a dictionary with units as default for raw data

get_headers_journal() HeadersJournal[source]#

Returns an augmented global dictionary containing the header-strings for the journal (batch) (used as column headers for the journal pandas DataFrames)

get_headers_normal() HeadersNormal[source]#

Returns an augmented global dictionary containing the header-strings for the normal data (used as column headers for the main data pandas DataFrames)

get_headers_step_table() HeadersStepTable[source]#

Returns an augmented global dictionary containing the header-strings for the steps table (used as column headers for the steps pandas DataFrames)

get_headers_summary() HeadersSummary[source]#

Returns an augmented global dictionary containing the header-strings for the summary (used as column headers for the summary pandas DataFrames)

cellpy.parameters.prmreader module#

create_custom_init_filename(user_name=None)[source]#

Creates a custom prms filename

get_env_file_name()[source]#

Returns the location of the env-file

get_user_dir()[source]#

Gets the name of the user directory

get_user_dir_and_dst(init_filename=None)[source]#

Gets the name of the user directory and full prm filepath

get_user_name()[source]#

Get the username of the current user (cross-platform)

info()[source]#

This function will show only the ‘box’-type attributes and their content in the cellpy.prms module

initialize()[source]#

Initializes cellpy by reading the config file and the environment file

cellpy.parameters.prms module#

cellpy parameters

class BatchClass(auto_use_file_list: bool = False, template: str = 'standard', fig_extension: str = 'png', backend: str = 'plotly', notebook: bool = True, dpi: int = 300, markersize: int = 4, symbol_label: str = 'simple', color_style_label: str = 'seaborn-deep', figure_type: str = 'unlimited', summary_plot_width: int = 900, summary_plot_height: int = 800, summary_plot_height_fractions: List[float] = <factory>)[source]#

Bases: CellPyConfig

Settings for batch processing.

auto_use_file_list: bool = False#
backend: str = 'plotly'#
color_style_label: str = 'seaborn-deep'#
dpi: int = 300#
fig_extension: str = 'png'#
figure_type: str = 'unlimited'#
markersize: int = 4#
notebook: bool = True#
summary_plot_height: int = 800#
summary_plot_height_fractions: List[float]#
summary_plot_width: int = 900#
symbol_label: str = 'simple'#
template: str = 'standard'#
class CellInfoClass(voltage_lim_low: float = 0.0, voltage_lim_high: float = 1.0, active_electrode_area: float = 1.0, active_electrode_thickness: float = 1.0, active_electrode_loading: float = 1.0, electrolyte_volume: float = 1.0, electrolyte_type: str = 'standard', active_electrode_type: str = 'standard', counter_electrode_type: str = 'standard', reference_electrode_type: str = 'standard', experiment_type: str = 'cycling', cell_type: str = 'standard', separator_type: str = 'standard', active_electrode_current_collector: str = 'standard', reference_electrode_current_collector: str = 'standard', comment: str = '')[source]#

Bases: CellPyDataConfig

Values used for setting the parameters related to the cell and the cycling

active_electrode_area: float = 1.0#
active_electrode_current_collector: str = 'standard'#
active_electrode_loading: float = 1.0#
active_electrode_thickness: float = 1.0#
active_electrode_type: str = 'standard'#
cell_type: str = 'standard'#
comment: str = ''#
counter_electrode_type: str = 'standard'#
electrolyte_type: str = 'standard'#
electrolyte_volume: float = 1.0#
experiment_type: str = 'cycling'#
reference_electrode_current_collector: str = 'standard'#
reference_electrode_type: str = 'standard'#
separator_type: str = 'standard'#
voltage_lim_high: float = 1.0#
voltage_lim_low: float = 0.0#
class CellPyConfig[source]#

Bases: object

Session settings (global).

keys()[source]#
class CellPyDataConfig[source]#

Bases: object

Settings that can be unique for each CellpyCell instance.

class DbClass(db_type: str = 'simple_excel_reader', db_table_name: str = 'db_table', db_header_row: int = 0, db_unit_row: int = 1, db_data_start_row: int = 2, db_search_start_row: int = 2, db_search_end_row: int = -1, db_file_sqlite: str = 'excel.db', db_connection: str | None = None)[source]#

Bases: CellPyConfig

Settings for the handling the simple database.

db_connection: str | None = None#
db_data_start_row: int = 2#
db_file_sqlite: str = 'excel.db'#
db_header_row: int = 0#
db_search_end_row: int = -1#
db_search_start_row: int = 2#
db_table_name: str = 'db_table'#
db_type: str = 'simple_excel_reader'#
db_unit_row: int = 1#
class DbColsClass(id: str = 'id', exists: str = 'exists', project: str = 'project', label: str = 'label', group: str = 'group', selected: str = 'selected', cell_name: str = 'cell', cell_type: str = 'cell_type', experiment_type: str = 'experiment_type', mass_active: str = 'mass_active_material', area: str = 'area', mass_total: str = 'mass_total', loading: str = 'loading_active_material', nom_cap: str = 'nominal_capacity', nom_cap_specifics: str = 'nominal_capacity_specifics', file_name_indicator: str = 'file_name_indicator', instrument: str = 'instrument', raw_file_names: str = 'raw_file_names', cellpy_file_name: str = 'cellpy_file_name', comment_slurry: str = 'comment_slurry', comment_cell: str = 'comment_cell', comment_general: str = 'comment_general', freeze: str = 'freeze', argument: str = 'argument', batch: str = 'batch', sub_batch_01: str = 'b01', sub_batch_02: str = 'b02', sub_batch_03: str = 'b03', sub_batch_04: str = 'b04', sub_batch_05: str = 'b05', sub_batch_06: str = 'b06', sub_batch_07: str = 'b07')[source]#

Bases: CellPyConfig

Names of the columns in the simple database.

area: str = 'area'#
argument: str = 'argument'#
batch: str = 'batch'#
cell_name: str = 'cell'#
cell_type: str = 'cell_type'#
cellpy_file_name: str = 'cellpy_file_name'#
comment_cell: str = 'comment_cell'#
comment_general: str = 'comment_general'#
comment_slurry: str = 'comment_slurry'#
exists: str = 'exists'#
experiment_type: str = 'experiment_type'#
file_name_indicator: str = 'file_name_indicator'#
freeze: str = 'freeze'#
group: str = 'group'#
id: str = 'id'#
instrument: str = 'instrument'#
label: str = 'label'#
loading: str = 'loading_active_material'#
mass_active: str = 'mass_active_material'#
mass_total: str = 'mass_total'#
nom_cap: str = 'nominal_capacity'#
nom_cap_specifics: str = 'nominal_capacity_specifics'#
project: str = 'project'#
raw_file_names: str = 'raw_file_names'#
selected: str = 'selected'#
sub_batch_01: str = 'b01'#
sub_batch_02: str = 'b02'#
sub_batch_03: str = 'b03'#
sub_batch_04: str = 'b04'#
sub_batch_05: str = 'b05'#
sub_batch_06: str = 'b06'#
sub_batch_07: str = 'b07'#
class DbColsUnitClass(id: str = 'str', exists: str = 'int', project: str = 'str', label: str = 'str', group: str = 'str', selected: str = 'int', cell_name: str = 'str', cell_type: str = 'str', experiment_type: str = 'str', mass_active: str = 'float', area: str = 'float', mass_total: str = 'float', loading: str = 'float', nom_cap: str = 'float', file_name_indicator: str = 'str', instrument: str = 'str', raw_file_names: str = 'str', cellpy_file_name: str = 'str', comment_slurry: str = 'str', comment_cell: str = 'str', comment_general: str = 'str', freeze: str = 'int', argument: str = 'str', batch: str = 'str', sub_batch_01: str = 'str', sub_batch_02: str = 'str', sub_batch_03: str = 'str', sub_batch_04: str = 'str', sub_batch_05: str = 'str', sub_batch_06: str = 'str', sub_batch_07: str = 'str')[source]#

Bases: CellPyConfig

Unit of the columns in the simple database.

area: str = 'float'#
argument: str = 'str'#
batch: str = 'str'#
cell_name: str = 'str'#
cell_type: str = 'str'#
cellpy_file_name: str = 'str'#
comment_cell: str = 'str'#
comment_general: str = 'str'#
comment_slurry: str = 'str'#
exists: str = 'int'#
experiment_type: str = 'str'#
file_name_indicator: str = 'str'#
freeze: str = 'int'#
group: str = 'str'#
id: str = 'str'#
instrument: str = 'str'#
label: str = 'str'#
loading: str = 'float'#
mass_active: str = 'float'#
mass_total: str = 'float'#
nom_cap: str = 'float'#
project: str = 'str'#
raw_file_names: str = 'str'#
selected: str = 'int'#
sub_batch_01: str = 'str'#
sub_batch_02: str = 'str'#
sub_batch_03: str = 'str'#
sub_batch_04: str = 'str'#
sub_batch_05: str = 'str'#
sub_batch_06: str = 'str'#
sub_batch_07: str = 'str'#
class FileNamesClass(file_name_format: str = 'YYYYMMDD_[NAME]EEE_CC_TT_RR', raw_extension: str = 'res', reg_exp: str = None, sub_folders: bool = True, file_list_location: str = None, file_list_type: str = None, file_list_name: str = None, cellpy_file_extension: str = 'h5')[source]#

Bases: CellPyConfig

Settings for file names and file handling.

cellpy_file_extension: str = 'h5'#
file_list_location: str = None#
file_list_name: str = None#
file_list_type: str = None#
file_name_format: str = 'YYYYMMDD_[NAME]EEE_CC_TT_RR'#
raw_extension: str = 'res'#
reg_exp: str = None#
sub_folders: bool = True#
class InstrumentsClass(tester: str | None, custom_instrument_definitions_file: str | None, Arbin: Box, Maccor: Box, Neware: Box, Batmo: Box)[source]#

Bases: CellPyConfig

Settings for the instruments.

Arbin: Box#
Batmo: Box#
Maccor: Box#
Neware: Box#
custom_instrument_definitions_file: str | None#
tester: str | None#
class MaterialsClass(cell_class: str = 'Li-Ion', default_material: str = 'silicon', default_mass: float = 1.0, default_nom_cap: float = 1.0, default_nom_cap_specifics: str = 'gravimetric')[source]#

Bases: CellPyDataConfig

Default material-specific values used in processing the data.

cell_class: str = 'Li-Ion'#
default_mass: float = 1.0#
default_material: str = 'silicon'#
default_nom_cap: float = 1.0#
default_nom_cap_specifics: str = 'gravimetric'#
class PathsClass(outdatadir: Path | str = PosixPath('/home/docs/checkouts/readthedocs.org/user_builds/cellpy/envs/latest/lib/python3.12/site-packages/sphinx'), _rawdatadir: OtherPathNew | str = '/home/docs/checkouts/readthedocs.org/user_builds/cellpy/envs/latest/lib/python3.12/site-packages/sphinx', _cellpydatadir: OtherPathNew | str = '/home/docs/checkouts/readthedocs.org/user_builds/cellpy/envs/latest/lib/python3.12/site-packages/sphinx', db_path: Path | str = PosixPath('/home/docs/checkouts/readthedocs.org/user_builds/cellpy/envs/latest/lib/python3.12/site-packages/sphinx'), filelogdir: Path | str = PosixPath('/home/docs/checkouts/readthedocs.org/user_builds/cellpy/envs/latest/lib/python3.12/site-packages/sphinx'), examplesdir: Path | str = PosixPath('/home/docs/checkouts/readthedocs.org/user_builds/cellpy/envs/latest/lib/python3.12/site-packages/sphinx'), notebookdir: Path | str = PosixPath('/home/docs/checkouts/readthedocs.org/user_builds/cellpy/envs/latest/lib/python3.12/site-packages/sphinx'), templatedir: Path | str = PosixPath('/home/docs/checkouts/readthedocs.org/user_builds/cellpy/envs/latest/lib/python3.12/site-packages/sphinx'), batchfiledir: Path | str = PosixPath('/home/docs/checkouts/readthedocs.org/user_builds/cellpy/envs/latest/lib/python3.12/site-packages/sphinx'), instrumentdir: Path | str = PosixPath('/home/docs/checkouts/readthedocs.org/user_builds/cellpy/envs/latest/lib/python3.12/site-packages/sphinx'), db_filename: str = 'cellpy_db.xlsx', env_file: Path | str = PosixPath('/home/docs/.env_cellpy'))[source]#

Bases: CellPyConfig

Paths used in cellpy.

batchfiledir: Path | str = PosixPath('/home/docs/checkouts/readthedocs.org/user_builds/cellpy/envs/latest/lib/python3.12/site-packages/sphinx')#
property cellpydatadir: OtherPathNew#
db_filename: str = 'cellpy_db.xlsx'#
db_path: Path | str = PosixPath('/home/docs/checkouts/readthedocs.org/user_builds/cellpy/envs/latest/lib/python3.12/site-packages/sphinx')#
env_file: Path | str = PosixPath('/home/docs/.env_cellpy')#
examplesdir: Path | str = PosixPath('/home/docs/checkouts/readthedocs.org/user_builds/cellpy/envs/latest/lib/python3.12/site-packages/sphinx')#
filelogdir: Path | str = PosixPath('/home/docs/checkouts/readthedocs.org/user_builds/cellpy/envs/latest/lib/python3.12/site-packages/sphinx')#
instrumentdir: Path | str = PosixPath('/home/docs/checkouts/readthedocs.org/user_builds/cellpy/envs/latest/lib/python3.12/site-packages/sphinx')#
notebookdir: Path | str = PosixPath('/home/docs/checkouts/readthedocs.org/user_builds/cellpy/envs/latest/lib/python3.12/site-packages/sphinx')#
outdatadir: Path | str = PosixPath('/home/docs/checkouts/readthedocs.org/user_builds/cellpy/envs/latest/lib/python3.12/site-packages/sphinx')#
property rawdatadir: OtherPathNew#
templatedir: Path | str = PosixPath('/home/docs/checkouts/readthedocs.org/user_builds/cellpy/envs/latest/lib/python3.12/site-packages/sphinx')#
class ReaderClass(diagnostics: bool = False, filestatuschecker: str = 'size', force_step_table_creation: bool = True, force_all: bool = False, sep: str = ';', cycle_mode: str = 'anode', sorted_data: bool = True, select_minimal: bool = False, limit_loaded_cycles: int | None = None, ensure_step_table: bool = False, ensure_summary_table: bool = False, voltage_interpolation_step: float = 0.01, time_interpolation_step: float = 10.0, capacity_interpolation_step: float = 2.0, use_cellpy_stat_file: bool = False, auto_dirs: bool = True, jupyter_executable: str = 'jupyter')[source]#

Bases: CellPyConfig

Settings for reading data.

auto_dirs: bool = True#
capacity_interpolation_step: float = 2.0#
cycle_mode: str = 'anode'#
diagnostics: bool = False#
ensure_step_table: bool = False#
ensure_summary_table: bool = False#
filestatuschecker: str = 'size'#
force_all: bool = False#
force_step_table_creation: bool = True#
jupyter_executable: str = 'jupyter'#
limit_loaded_cycles: int | None = None#
select_minimal: bool = False#
sep: str = ';'#
sorted_data: bool = True#
time_interpolation_step: float = 10.0#
use_cellpy_stat_file: bool = False#
voltage_interpolation_step: float = 0.01#

Module contents#