Skip to content

Commit

Permalink
Merge pull request scikit-rf#1210 from fnordpole/master
Browse files Browse the repository at this point in the history
Fixed another bug of similar type that only occurs for number of port
  • Loading branch information
Vinc0110 authored Nov 18, 2024
2 parents 5259283 + 59d96d9 commit 72dbe3c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions skrf/vectorFitting.py
Original file line number Diff line number Diff line change
Expand Up @@ -2391,15 +2391,15 @@ def get_new_subckt_identifier():

# R for constant term
if g < 0:
f.write(f'R{n + 1}{j + 1} nt_n_{j + 1} nt_c_{n + 1} {np.abs(1 / g)}\n')
f.write(f'R{n + 1}_{j + 1} nt_n_{j + 1} nt_c_{n + 1} {np.abs(1 / g)}\n')
elif g > 0:
f.write(f'R{n + 1}{j + 1} nt_p_{j + 1} nt_c_{n + 1} {1 / g}\n')
f.write(f'R{n + 1}_{j + 1} nt_p_{j + 1} nt_c_{n + 1} {1 / g}\n')

# C for proportional term
if c < 0:
f.write(f'C{n + 1}{j + 1} nt_n_{j + 1} nt_c_{n + 1} {np.abs(c)}\n')
f.write(f'C{n + 1}_{j + 1} nt_n_{j + 1} nt_c_{n + 1} {np.abs(c)}\n')
elif c > 0:
f.write(f'C{n + 1}{j + 1} nt_p_{j + 1} nt_c_{n + 1} {c}\n')
f.write(f'C{n + 1}_{j + 1} nt_p_{j + 1} nt_c_{n + 1} {c}\n')

# Transfer admittances represented by poles and residues
for i_pole in range(len(self.poles)):
Expand Down

0 comments on commit 72dbe3c

Please sign in to comment.