skrf.circuit.Circuit.__init__

Circuit.__init__(connections, name=None)[source]

Circuit constructor. Creates a circuit made of a set of N-ports networks.

Parameters:
  • connections (list of list of tuples) – Description of circuit connections. Each connection is a described by a list of tuple. Each tuple contains (network, network_port_nb). Port number indexing starts from zero.

  • name (string, optional) – Name assigned to the circuit (Network). Default is None.

Return type:

None

Examples

Example of connections between two 1-port networks:

connections = [
    [(network1, 0), (network2, 0)],
]

Example of a connection between three 1-port networks connected to a single node:

connections = [
    [(network1, 0), (network2, 0), (network3, 0)]
]

Example of a connection between two 1-port networks (port1 and port2) and two 2-ports networks (ntw1 and ntw2):

connections = [
    [(port1, 0), (ntw1, 0)],
    [(ntw1, 1), (ntw2, 0)],
    [(ntw2, 1), (port2, 0)]
]

Example of a connection between three 1-port networks (port1, port2 and port3) and a 3-ports network (ntw):

connections = [
    [(port1, 0), (ntw, 0)],
    [(port2, 0), (ntw, 1)],
    [(port3, 0), (ntw, 2)]
]

NB1: Creating 1-port network to be used as a port should be made with Port()

NB2: The external ports indexing is defined by the order of appearance of the ports in the connections list. Thus, the first network identified as a port will be the 1st port of the resulting network (index 0), the second network identified as a port will be the second port (index 1), etc.