dgpost.transform.circuit_utils.circuit_components
- dgpost.transform.circuit_utils.circuit_components.create_parameter(name: str, bounds: tuple[float, float], unit: str)
Creates a dictionary with keys name, bounds and unit
- Parameters:
name – name of the parameter
bounds – default bounds of the parameter
unit – SI unit of the parameter
- Returns:
dictionary containing the input values
- Return type:
dict
- class dgpost.transform.circuit_utils.circuit_components.Component
Bases:
object
A component stores information needed for the fitting.
- static get_symbol() str
Unique symbol used to identify the component in the circuit string
The symbol can only contain letters, i.e. a-z, A-Z
- static get_parameters(name: str) list[dict]
returns the parameter(s) that describe the component
A parameter is a dictionary with the keys: name, bounds and unit. The name of the parameter should be based on the symbol. It can also contain any character except a whitespace. The bounds are given as a tuple with the lower (lb) and upper bounds (ub) like (lb, ub). The unit needs to be recognised by pint
- Parameters:
name – name of the component in the circuit string, made out of the symbol with an additional digit.
- Returns:
The parameters that describes the component. A parameter is a dictionary with 3 keys: ‘name’, ‘bounds’ and ‘unit’
- Return type:
list[dict]
- static calc_impedance(param: dict[str, float], name: str, freq: array) array
Calculates the impedance of the component
- Parameters:
param – dictionary of parameter values with the name as the key
name – the name of the component
freq – the frequencies at which the impedance should be calculated
- Returns:
numpy array with the complex impedance of the component for the given frequencies
- Return type:
np.array
- class dgpost.transform.circuit_utils.circuit_components.Resistor
Bases:
Component
defines a resistor
- static get_symbol()
Unique symbol used to identify the component in the circuit string
The symbol can only contain letters, i.e. a-z, A-Z
- static get_parameters(name)
returns the parameter(s) that describe the component
A parameter is a dictionary with the keys: name, bounds and unit. The name of the parameter should be based on the symbol. It can also contain any character except a whitespace. The bounds are given as a tuple with the lower (lb) and upper bounds (ub) like (lb, ub). The unit needs to be recognised by pint
- Parameters:
name – name of the component in the circuit string, made out of the symbol with an additional digit.
- Returns:
The parameters that describes the component. A parameter is a dictionary with 3 keys: ‘name’, ‘bounds’ and ‘unit’
- Return type:
list[dict]
- static calc_impedance(param, name, freq)
Calculates the impedance of the component
- Parameters:
param – dictionary of parameter values with the name as the key
name – the name of the component
freq – the frequencies at which the impedance should be calculated
- Returns:
numpy array with the complex impedance of the component for the given frequencies
- Return type:
np.array
- class dgpost.transform.circuit_utils.circuit_components.Capacitor
Bases:
Component
defines a capacitor
- static get_symbol()
Unique symbol used to identify the component in the circuit string
The symbol can only contain letters, i.e. a-z, A-Z
- static get_parameters(name)
returns the parameter(s) that describe the component
A parameter is a dictionary with the keys: name, bounds and unit. The name of the parameter should be based on the symbol. It can also contain any character except a whitespace. The bounds are given as a tuple with the lower (lb) and upper bounds (ub) like (lb, ub). The unit needs to be recognised by pint
- Parameters:
name – name of the component in the circuit string, made out of the symbol with an additional digit.
- Returns:
The parameters that describes the component. A parameter is a dictionary with 3 keys: ‘name’, ‘bounds’ and ‘unit’
- Return type:
list[dict]
- static calc_impedance(param, name, freq)
Calculates the impedance of the component
- Parameters:
param – dictionary of parameter values with the name as the key
name – the name of the component
freq – the frequencies at which the impedance should be calculated
- Returns:
numpy array with the complex impedance of the component for the given frequencies
- Return type:
np.array
- class dgpost.transform.circuit_utils.circuit_components.CPE
Bases:
Component
defines a constant phase element
- static get_symbol()
Unique symbol used to identify the component in the circuit string
The symbol can only contain letters, i.e. a-z, A-Z
- static get_parameters(name)
returns the parameter(s) that describe the component
A parameter is a dictionary with the keys: name, bounds and unit. The name of the parameter should be based on the symbol. It can also contain any character except a whitespace. The bounds are given as a tuple with the lower (lb) and upper bounds (ub) like (lb, ub). The unit needs to be recognised by pint
- Parameters:
name – name of the component in the circuit string, made out of the symbol with an additional digit.
- Returns:
The parameters that describes the component. A parameter is a dictionary with 3 keys: ‘name’, ‘bounds’ and ‘unit’
- Return type:
list[dict]
- static calc_impedance(param, name, freq)
Calculates the impedance of the component
- Parameters:
param – dictionary of parameter values with the name as the key
name – the name of the component
freq – the frequencies at which the impedance should be calculated
- Returns:
numpy array with the complex impedance of the component for the given frequencies
- Return type:
np.array
- class dgpost.transform.circuit_utils.circuit_components.Warburg
Bases:
Component
defines a semi-infinite Warburg element
- static get_symbol()
Unique symbol used to identify the component in the circuit string
The symbol can only contain letters, i.e. a-z, A-Z
- static get_parameters(name)
returns the parameter(s) that describe the component
A parameter is a dictionary with the keys: name, bounds and unit. The name of the parameter should be based on the symbol. It can also contain any character except a whitespace. The bounds are given as a tuple with the lower (lb) and upper bounds (ub) like (lb, ub). The unit needs to be recognised by pint
- Parameters:
name – name of the component in the circuit string, made out of the symbol with an additional digit.
- Returns:
The parameters that describes the component. A parameter is a dictionary with 3 keys: ‘name’, ‘bounds’ and ‘unit’
- Return type:
list[dict]
- static calc_impedance(param, name, freq)
Calculates the impedance of the component
- Parameters:
param – dictionary of parameter values with the name as the key
name – the name of the component
freq – the frequencies at which the impedance should be calculated
- Returns:
numpy array with the complex impedance of the component for the given frequencies
- Return type:
np.array
- class dgpost.transform.circuit_utils.circuit_components.WarburgOpen
Bases:
Component
defines a finite-space Warburg element
- static get_symbol()
Unique symbol used to identify the component in the circuit string
The symbol can only contain letters, i.e. a-z, A-Z
- static get_parameters(name)
returns the parameter(s) that describe the component
A parameter is a dictionary with the keys: name, bounds and unit. The name of the parameter should be based on the symbol. It can also contain any character except a whitespace. The bounds are given as a tuple with the lower (lb) and upper bounds (ub) like (lb, ub). The unit needs to be recognised by pint
- Parameters:
name – name of the component in the circuit string, made out of the symbol with an additional digit.
- Returns:
The parameters that describes the component. A parameter is a dictionary with 3 keys: ‘name’, ‘bounds’ and ‘unit’
- Return type:
list[dict]
- static calc_impedance(param, name, freq)
Calculates the impedance of the component
- Parameters:
param – dictionary of parameter values with the name as the key
name – the name of the component
freq – the frequencies at which the impedance should be calculated
- Returns:
numpy array with the complex impedance of the component for the given frequencies
- Return type:
np.array
- class dgpost.transform.circuit_utils.circuit_components.WarburgShort
Bases:
Component
defines a finite-length Warburg element
- static get_symbol()
Unique symbol used to identify the component in the circuit string
The symbol can only contain letters, i.e. a-z, A-Z
- static get_parameters(name)
returns the parameter(s) that describe the component
A parameter is a dictionary with the keys: name, bounds and unit. The name of the parameter should be based on the symbol. It can also contain any character except a whitespace. The bounds are given as a tuple with the lower (lb) and upper bounds (ub) like (lb, ub). The unit needs to be recognised by pint
- Parameters:
name – name of the component in the circuit string, made out of the symbol with an additional digit.
- Returns:
The parameters that describes the component. A parameter is a dictionary with 3 keys: ‘name’, ‘bounds’ and ‘unit’
- Return type:
list[dict]
- static calc_impedance(param, name, freq)
Calculates the impedance of the component
- Parameters:
param – dictionary of parameter values with the name as the key
name – the name of the component
freq – the frequencies at which the impedance should be calculated
- Returns:
numpy array with the complex impedance of the component for the given frequencies
- Return type:
np.array