IronPython increase the SParamData matrix

16 views
Skip to first unread message

sle...@gmail.com

unread,
Dec 16, 2025, 8:25:01 AM12/16/25
to VNA Tools
Hi Michael,

How can I increase SParamData matrix from two port device to three port device in IronPython?



main_line = s.LoadSParamData(r'Uthru_out\DUTs\Fovonal_Input_Output.sdatb')
coupling = s.LoadSParamData(r'Uthru_out\DUTs\Coupling.sdatb')
isolation = s.LoadSParamData(r'Uthru_out\DUTs\Izolacio.sdatb')

m = []
m.append(main_line)

SdataOut = SParamData[UncNumber](m[0].NFreq,3)
SdataOut.PortZr=m[0].PortZr

s.SaveSParamData('Uthru_out\DUTs\DirectionalCopulerFull.sdatb', SdataOut)



The main_line is two port measurement.
I get error message at SaveSParamData row “IndexError: The index pointed outside the bounds of the array.”

Regards
László

Michael Wollensack METAS

unread,
Dec 16, 2025, 8:38:02 AM12/16/25
to VNA Tools
Hi,

SdataOut.PortZr=m[0].PortZr

the left side has a length of 3, the right side has a length of 2.

Try

SdataOut.PortZr[0]=m[0].PortZr[0]
SdataOut.PortZr[1]=m[0].PortZr[1]
SdataOut.PortZr[2]=m[0].PortZr[0] # I don't know

Regards
Michael


sle...@gmail.com

unread,
Dec 16, 2025, 9:17:45 AM12/16/25
to VNA Tools
Thank you Michael, now it works fine.

Regards
László

Reply all
Reply to author
Forward
0 new messages