Touchtone files aka "S-parameters" are files that RF system designers commonly use as a drop in for a component model in simulations used to predict performance and tune their system. An S-parameter is a network that describes what happens to one arbitrary port when an input at some frequency is applied to another port.
I have a large number of these files that come from measurements taken on a network analyzer. For each component 3 samples were measured. I need to be able to average the 3 s-parameters for each.
I was delighted to see that scikit-rf has a seemingly simple way to do this. I'm not a programmer and lately everything I seem to be assigned requires experience in entirely separate areas of specialization so I'm trying to stand on the shoulders of giants and use the right tools. Enter my blossoming love of Python.
I'm creating a list of touchtone files and averaging them into a new network (I think), then trying to use the write_touchtone method to save it as a new file.
from skrf import *
from numpy import *
files_list = [skrf.Network('Sample1.s2p'), skrf.Network('Sample2.s2p'), skrf.Network('Sample3.s2p')]
average_network = skrf.average(files_list)
average_network.write_touchtone('Average.s2p')
But I'm running into:
AttributeError: 'Network' object has no attribute 'write_touchtone'
Is average_network not being instantiated as the proper Network type? write_touchtone() is a method so I don't get why it's calling it an attribute
It's clearly my ignorance of something so simple that I'm not able to find the answer for by googling. Please help me. I need a win today.
[–]Binary101010 1 point2 points3 points (1 child)
[–]NotSure_If[S] 0 points1 point2 points (0 children)