Skip to content

Commit

Permalink
right now Insertion loss is computed on first frequency point. (#4416)
Browse files Browse the repository at this point in the history
Co-authored-by: maxcapodi78 <Shark78>
  • Loading branch information
maxcapodi78 authored Mar 27, 2024
1 parent 2b46970 commit 6124683
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions pyaedt/generic/touchstone_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,16 @@ def get_insertion_loss_index(self, threshold=-3):
"""
temp_list = []
freq_idx = 0
s_db = self.s_db[freq_idx, :, :]
s_db = self.s_db[0:2, :, :]
for i in self.port_tuples:
if i[0] != i[1]:
loss = s_db[i[0], i[1]]
loss = s_db[0, i[0], i[1]]
if loss > threshold:
temp_list.append(i)
elif loss < -90:
loss = s_db[1, i[0], i[1]]
if loss > threshold:
temp_list.append(i)
return temp_list

def plot_insertion_losses(self, threshold=-3, plot=True):
Expand Down

0 comments on commit 6124683

Please sign in to comment.