Skip to content

Commit 9c1b223

Browse files
authored
Support touchstone file with more than 9 ports. (#935)
* Support touchstone file with more than 9 ports. * Touchstone extension file can sometimes be upper case such as *.SP.
1 parent 236148a commit 9c1b223

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pyaedt/modeler/PrimitivesCircuit.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ def create_model_from_touchstone(self, touchstone_full_path, model_name=None):
335335
model_name = os.path.splitext(os.path.basename(touchstone_full_path))[0]
336336
if model_name in list(self.o_model_manager.GetNames()):
337337
model_name = generate_unique_name(model_name, n=2)
338-
num_terminal = int(touchstone_full_path[-2:-1])
338+
num_terminal = int(os.path.splitext(touchstone_full_path)[1].lower().strip(".sp"))
339339
with open(touchstone_full_path, "r") as f:
340340
port_names = _parse_ports_name(f)
341341
image_subcircuit_path = os.path.normpath(

0 commit comments

Comments
 (0)