Skip to content

Commit

Permalink
Support touchstone file with more than 9 ports. (#935)
Browse files Browse the repository at this point in the history
* Support touchstone file with more than 9 ports.

* Touchstone extension file can sometimes be upper case such as *.SP.
  • Loading branch information
MaxJPRey authored Mar 11, 2022
1 parent 236148a commit 9c1b223
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pyaedt/modeler/PrimitivesCircuit.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ def create_model_from_touchstone(self, touchstone_full_path, model_name=None):
model_name = os.path.splitext(os.path.basename(touchstone_full_path))[0]
if model_name in list(self.o_model_manager.GetNames()):
model_name = generate_unique_name(model_name, n=2)
num_terminal = int(touchstone_full_path[-2:-1])
num_terminal = int(os.path.splitext(touchstone_full_path)[1].lower().strip(".sp"))
with open(touchstone_full_path, "r") as f:
port_names = _parse_ports_name(f)
image_subcircuit_path = os.path.normpath(
Expand Down

0 comments on commit 9c1b223

Please sign in to comment.