Compare commits

...

2 Commits

Author SHA1 Message Date
26682f1741 remove simulation
All checks were successful
Publish Python 🐍 distribution 📦 to PyPI and TestPyPI / Build distribution 📦 (push) Successful in 18s
Publish Python 🐍 distribution 📦 to PyPI and TestPyPI / Publish Python 🐍 distribution 📦 to PyPI (push) Has been skipped
2025-01-16 22:12:31 -07:00
f1f6c0d45b rearrange readme 2025-01-16 21:55:46 -07:00
2 changed files with 20 additions and 39 deletions

View File

@ -9,25 +9,7 @@ On Ubuntu 22.04 just run `sudo apt-get install -y libiio-dev`
2. `pip install charon-vna`
## Usage
There will be some sort of GUI because that sounds useful.
It will also be accessible over a socket to enable test automation with external (including non-python) code.
### Calibration
TBD
### Power Calibration
I include a default output power lookup table. This is derived from two TX channels of two Pluto SDRs and does not include any of the loss of a coupler or Charon switch board.
Absolute output power is generally not well calibrated for VNAs anyway and has negligible impact on most measurements so this is probably sufficient for most users. If you're trying to run a power sweep this may be insufficient.
If you have an RF power meter you can generate your own power calibration.
Note that unlike the main calibration, power calibration frequencies do not need to match the measurement frequencies. Values are interpolated.
## Hardware
## Hardware Setup
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).
@ -46,3 +28,21 @@ Most of my testing is with Pluto firmware [v0.39](https://github.com/analogdevic
We need two receive channels on the SDR. If you have a Pluto+ that should already be configured and you can skip this step.
Analog devices has a [guide](https://wiki.analog.com/university/tools/pluto/users/customizing#updating_to_the_ad9364) for enabling the second channel. Ideally this should be set as `ad9361` to enable a wider band of operation in addition to the second channel, however the critical setting is enabling 2r2t.
## Usage
There will be some sort of GUI because that sounds useful.
It will also be accessible over a socket to enable test automation with external (including non-python) code.
### Calibration
TBD
### Power Calibration
I include a default output power lookup table. This is derived from two TX channels of two Pluto SDRs and does not include any of the loss of a coupler or Charon switch board.
Absolute output power is generally not well calibrated for VNAs anyway and has negligible impact on most measurements so this is probably sufficient for most users. If you're trying to run a power sweep this may be insufficient.
If you have an RF power meter you can generate your own power calibration.
Note that unlike the main calibration, power calibration frequencies do not need to match the measurement frequencies. Values are interpolated.

View File

@ -201,13 +201,6 @@ class MainWindow(QMainWindow):
menu_calibration = QMenu("&Calibration")
menubar.addMenu(menu_calibration)
menu_simulation = QMenu("Si&mulation")
menubar.addMenu(menu_simulation)
action_generate_data = QAction("&Generate data", self)
menu_file.addAction(action_generate_data)
action_generate_data.triggered.connect(self.generate_sim_data)
action_generate_data.setShortcut(QKeySequence("Ctrl+G"))
# Content
window_layout = QVBoxLayout()
@ -301,18 +294,6 @@ class MainWindow(QMainWindow):
for plot in self.plots:
plot.update_plot(data)
def generate_sim_data(self) -> None:
coords = {"frequency": self._frequency, "m": [1], "n": [1]}
shape = tuple(len(v) for v in coords.values())
data = xr.DataArray(
((-1 + 2 * np.random.rand(*shape)) + 1j * (-1 + 2 * np.random.rand(*shape))) / np.sqrt(2),
dims=list(coords.keys()),
coords=coords,
)
for plot in self.plots:
plot.update_plot(data)
def set_frequency(self, *, frequency: npt.ArrayLike | None = None):
print(frequency)
if frequency is None: