parserΒΆ

Collection of functions for parsing circuit strings.

validate_circuit(circuit)

Checks if a circuit string is valid.

validate_parameter(p)

Checks if a parameter label is valid.

parse_component(c)

Returns the component type of a component/parameter label.

parse_parameter(p)

Returns the type of a parameter label.

get_component_labels(circuit[, types])

Returns a list of labels for all components in a circuit string.

get_component_types(circuit[, unique])

Returns a list of component types in a circuit string.

get_parameter_types(circuit[, unique])

Returns a list of parameter types in a circuit string.

get_parameter_labels(circuit[, types])

Returns a list of labels for all parameters in a circuit string.

group_parameters_by_type(circuit)

Groups parameter labels by component type.

group_parameters_by_component(circuit)

Groups parameter labels by component label.

count_parameters(circuit)

Returns the number of parameters present in a circuit string.

convert_to_impedance_format(circuit)

Converts a circuit string the format used by impedance.py.

find_ohmic_resistors(circuit)

Finds all ohmic resistors in a circuit (only in the main chain).