Compare commits

..

No commits in common. "67a1864837c10778880d3af4ea64ca13d7ebae74" and "a5b391e7579b3dd45e5cc9d8c8447f3006210bff" have entirely different histories.

3 changed files with 6 additions and 12 deletions

View File

@ -31,7 +31,7 @@ Note that unlike the main calibration, power calibration frequencies do not need
You need a few things:
- [Analog Devices Pluto SDR](https://www.analog.com/en/resources/evaluation-hardware-and-software/evaluation-boards-kits/adalm-pluto.html).
Any variant of the Pluto *should* work too such as the [Pluto+](https://github.com/plutoplus/plutoplus?tab=readme-ov-file) however I have only tested with the basic flavor.
Any variant of the Pluto *should* work too such as the [Pluto+](https://github.com/plutoplus/plutoplus?tab=readme-ov-file)
- Directional couplers (1 per port up to 4 ports).
I have been using [AAMCS-UDC-0.5G-18G-10dB-Sf](http://www.aa-mcs.com/wp-content/uploads/documents/AAMCS-UDC-0.5G-18G-10dB-Sf.pdf)
- Charon switch board - coming soon.

View File

@ -23,7 +23,6 @@ from PySide6.QtWidgets import (
QWidget,
)
from skrf import plotting as rf_plt
from util import db20, s2vswr
from vna import Charon
DEFAULT_CONFIG = dict(
@ -77,7 +76,7 @@ class PlotWidget(QWidget):
self.ax.set_ylabel("Amplitude [dB]")
def update_logmag(self, data: xr.DataArray) -> None:
self.update_rect(data, db20)
self.update_rect(data, lambda s: 20 * np.log10(np.abs(s)))
def setup_phase(self) -> None:
self.setup_rect()
@ -94,7 +93,7 @@ class PlotWidget(QWidget):
self.ax.set_ylabel("VSWR")
def update_vswr(self, data: xr.DataArray) -> None:
self.update_rect(data, s2vswr)
self.update_rect(data, lambda s: (1 + np.abs(s)) / (1 - np.abs(s)))
def setup_smith(self) -> None:
self.ax.grid(False)

View File

@ -1,7 +1,6 @@
import numpy as np
import skrf as rf
import xarray as xr
from numpy import typing as npt
HAM_BANDS = [
[135.7e3, 137.8e3],
@ -38,16 +37,12 @@ HAM_BANDS = [
]
def db10(p: npt.ArrayLike[np.complex128]) -> npt.ArrayLike[float]:
def db10(p):
return 10 * np.log10(np.abs(p))
def db20(v: npt.ArrayLike[np.complex128]) -> npt.ArrayLike[float]:
return 20 * np.log10(np.abs(v))
def s2vswr(s: npt.ArrayLike[np.complex128]) -> npt.ArrayLike[float]:
return (1 + np.abs(s)) / (1 - np.abs(s))
def db20(p):
return 20 * np.log10(np.abs(p))
def minmax(x):