Skip to content

Commit 1616615

Browse files
committed
fix s21 equation again
1 parent 040fb65 commit 1616615

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

smith_chart/js/smith_tool.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1357,7 +1357,7 @@ function update_smith_chart() {
13571357
} else {
13581358
traceS11.y.push(20 * Math.log10(reflection_mag));
13591359
traceS11Ph.y.push(reflection_phase);
1360-
traceS21.y.push(20 * Math.log10(1 - reflection_mag));
1360+
traceS21.y.push(20 * Math.log10((Math.sqrt(1 - reflection_mag**2))));
13611361
// traceS21Ph.y.push(-reflection_phase);
13621362
}
13631363
// traceS22.x = [scaledFreq];
@@ -1380,7 +1380,7 @@ function update_smith_chart() {
13801380
} else {
13811381
traceS11.y.push(20 * Math.log10(reflection_mag));
13821382
traceS11Ph.y.push(reflection_phase);
1383-
traceS21.y.push(20 * Math.log10(1 - Math.sqrt(reflection_mag)));
1383+
traceS21.y.push(20 * Math.log10((Math.sqrt(1 - reflection_mag**2))));
13841384
// traceS21Ph.y.push(-reflection_phase);
13851385
}
13861386
traceS11.x.push((freq + (span_freq * (i - span_res)) / span_res) / schematic[0].freq_unit.multiplier);

0 commit comments

Comments
 (0)