Skip to content

Commit

Permalink
Merged bugfix for touchstone db conversation
Browse files Browse the repository at this point in the history
  • Loading branch information
zarath committed Jan 26, 2020
1 parent 2e63606 commit c65a4eb
Show file tree
Hide file tree
Showing 4 changed files with 3,223 additions and 3 deletions.
2 changes: 1 addition & 1 deletion NanoVNASaver/Touchstone.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ def _append_line_data(self, freq: int, data: list):
z = cmath.rect(float(v), math.radians(float(next(vals))))
next(data_list).append(Datapoint(freq, z.real, z.imag))
if self.opts.format == "db":
z = cmath.rect(math.exp(float(v) / 20), math.radians(float(next(vals))))
z = cmath.rect(10 ** (float(v) / 20), math.radians(float(next(vals))))
next(data_list).append(Datapoint(freq, z.real, z.imag))

def load(self):
Expand Down
Loading

0 comments on commit c65a4eb

Please sign in to comment.