From: Thomas T. <tho...@de...> - 2006-03-27 10:58:28
|
Hi, one motivation to write the formerly mentioned python scripts to visualize Qucs data was to plot a variable value against a sweep parameter. Now I found out, that this could be done within Qucs. I insert the following equation in the schematic: y=out.v[:,1] Then I can plot an twodimensional diagramm y vs. param. Unlike in python where an index of -1 means "last item" out.v[:,-1] is invalid in qucs. This data slicing does not work with s-parameters. out.S[1,1][:,1] is invalid. Does anyone know wether it is possible anyhow? BTW: I updated my python script at http://www.desy.de/~traber/qucs-scripts.html to work with s-parameters by omitting "[","]" and ",". The resulting variable names are then S11, S21 and so on. Unfortunately my script does not handle complex numbers yet. The script now handles multidimensional arrays. You'll get those when doing nested parameter sweeps. Thomas |
From: Stefan J. <st...@gr...> - 2006-03-27 11:12:12
|
Am Mo, 27.03.2006, 10:45, schrieb Thomas Traber: > Hi, Hello! > one motivation to write the formerly mentioned python scripts to > visualize Qucs data was to plot a variable value against a sweep > parameter. > Now I found out, that this could be done within Qucs. > I insert the following equation in the schematic: > > y=out.v[:,1] Correct. > Then I can plot an twodimensional diagramm y vs. param. > Unlike in python where an index of -1 means "last item" out.v[:,-1] is > invalid in qucs. > This data slicing does not work with s-parameters. > > out.S[1,1][:,1] is invalid. > > Does anyone know wether it is possible anyhow? Hm. Probably this? a=S[1,1] b=a[:,1] I've not checked it, but it's worth a try... Cheers, Stefan. |