CPython read complex value

31 views
Skip to first unread message

sle...@gmail.com

unread,
Feb 10, 2025, 5:39:36 AMFeb 10
to VNA Tools
Hi,

I would like to get back one S parameter with uncertainty on one frequency in the ucomplex type variable form the .sdatb file, for the further computations in CPython.

I can read Real, Imag, Abs, Angle etc., but I cannot read the complex value.

              s = sdata[freq_index, s_index1 - 1, s_index2 - 1].Real().Value
              s = sdata[freq_index, s_index1 - 1, s_index2 - 1].Imag().Value
               s = sdata[freq_index,s_index1 -1,s_index2 - 1].Abs().Value
                s = sdata[freq_index,s_index1 -1,s_index2 - 1].Angle().Value * 180 / math.pi

Regards,
László

Michael Wollensack METAS

unread,
Feb 10, 2025, 5:44:57 AMFeb 10
to VNA Tools
Hi,

you should be able to to do:

ucomplex(sdata[freq_index, s_index1 - 1, s_index2 - 1])


Regards
Michael

sle...@gmail.com

unread,
Feb 11, 2025, 5:36:10 AMFeb 11
to VNA Tools
Thank Michel.

Regards
László
Reply all
Reply to author
Forward
0 new messages