zero.components module¶
Electronic components
-
class
zero.components.
Capacitor
(value=None, node1=None, node2=None, *args, **kwargs)[source]¶ Bases:
zero.components.PassiveComponent
Represents a capacitor or set of series or parallel capacitors
-
BASE_NAME
= 'c'¶
-
DISPLAY_UNIT
= 'F'¶
-
ELEMENT_TYPE
= 'capacitor'¶
-
property
capacitance
¶ Capacitance in farads.
-
-
class
zero.components.
Component
(name=None, nodes=None)[source]¶ Bases:
zero.elements.BaseElement
Represents a circuit component.
- Parameters
-
noise
¶ The component noise sources.
- Type
-
BASE_NAME
= '?'¶
-
DISPLAY_UNIT
= '?'¶
-
ELEMENT_TYPE
= 'component'¶
-
ELEMENT_UNIT
= 'A'¶
-
add_noise
(noise)[source]¶ Add a noise source to the component.
- Parameters
noise (
Noise
) – The noise to add.- Raises
ValueError – If specified noise is already present.
-
class
zero.components.
CouplingFactorDict
(inductor, *args, **kwargs)[source]¶ Bases:
collections.abc.MutableMapping
Collection to get and set coupling factors between inductors
-
class
zero.components.
Inductor
(*args, **kwargs)[source]¶ Bases:
zero.components.PassiveComponent
Represents an inductor or set of series or parallel inductors
-
BASE_NAME
= 'l'¶
-
DISPLAY_UNIT
= 'H'¶
-
ELEMENT_TYPE
= 'inductor'¶
-
property
coupled_inductors
¶ Inductors coupled to this one
-
impedance_from
(other, frequency)[source]¶ Calculate the impedance this inductor has due to the specified coupled inductor
-
property
inductance
¶ Inductance in henries.
-
-
class
zero.components.
Input
(nodes, input_type, impedance=None, is_noise=False, **kwargs)[source]¶ Bases:
zero.components.Component
Represents the circuit’s voltage input
-
BASE_NAME
= 'in'¶
-
ELEMENT_TYPE
= 'input'¶
-
property
impedance
¶
-
property
node1
¶
-
property
node2
¶
-
property
node_n
¶
-
property
node_p
¶
-
-
class
zero.components.
Node
(name)[source]¶ Bases:
zero.elements.BaseElement
Represents a circuit node (connection between components)
Nodes are considered equal if they have the same case-independent name. Nodes are singletons, and as such instantiating a node with a name matching that of a previously instantiated node will result in the previous object being returned.
- Parameters
name (
str
) – Node name.
-
ELEMENT_UNIT
= 'V'¶
-
property
label
¶
-
class
zero.components.
OpAmp
(node1, node2, node3, **kwargs)[source]¶ Bases:
zero.config.components.LibraryOpAmp
,zero.components.Component
Represents an (almost) ideal op-amp.
An op-amp produces
voltage noise
across its input and outputnodes
, andcurrent noise
is present at its inputnodes
.- Parameters
-
BASE_NAME
= 'op'¶
-
ELEMENT_TYPE
= 'op-amp'¶
-
property
has_inv_current_noise
¶
-
property
has_non_inv_current_noise
¶
-
property
has_voltage_noise
¶
-
property
inv_current_noise
¶
-
property
node1
¶
-
property
node2
¶
-
property
node3
¶
-
property
non_inv_current_noise
¶
-
property
voltage_noise
¶
-
class
zero.components.
PassiveComponent
(value=None, node1=None, node2=None, *args, **kwargs)[source]¶ Bases:
zero.components.Component
Represents a passive component.
A passive component is one that consumes or temporarily stores energy, but does not produce or amplify it. Examples include
resistors
,capacitors
andinductors
.- Parameters
-
property
value
The component value.
- Returns
float
– The component value.