Skip to content

Port order after skrf.connect #1027

Answered by jhillairet
tzortea asked this question in Q&A
Discussion options

You must be logged in to vote

There is no obvious way to predict the unconnected port number using the connect method with multiport Network.

However, you can use the following trick to identify the ports numbers : define specific characteristic impedances on a dummy example, so you can track which port have been connect to which:

import skrf as rf

freq = rf.Frequency(1, 1, 1, unit='GHz')
med = rf.DefinedGammaZ0(frequency=freq)
s4p = med.splitter(4, z0=[1,2,3,4])
s6p = med.splitter(6, z0=[11,12,13,14,15,16])
result = rf.connect(s4p, 0, s6p, 0, num=2)
print(result)  # 6-Port Network: '',  1.0-1.0 GHz, 1 pts, z0=[ 3.+0.j  4.+0.j 13.+0.j 14.+0.j 15.+0.j 16.+0.j]

in the previous example, one can see that the 1st and 2nd …

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@tzortea
Comment options

Answer selected by tzortea
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants