make vna.py importable
This commit is contained in:
parent
22a33c2b84
commit
0c152c337e
|
@ -4,7 +4,8 @@ from pathlib import Path
|
|||
from typing import Any, Dict, Tuple
|
||||
|
||||
import adi
|
||||
import iio
|
||||
|
||||
# import iio
|
||||
import numpy as np
|
||||
import skrf as rf
|
||||
import xarray as xr
|
||||
|
@ -228,6 +229,10 @@ class Charon:
|
|||
return s
|
||||
|
||||
|
||||
# %%
|
||||
if __name__ == "__main__":
|
||||
pass
|
||||
|
||||
# %%
|
||||
sdr = Charon("ip:192.168.3.1", frequency=np.linspace(1e9, 1.1e9, 11))
|
||||
|
||||
|
@ -287,7 +292,6 @@ plt.gca().xaxis.set_major_formatter(EngFormatter())
|
|||
plt.grid(True)
|
||||
plt.show()
|
||||
|
||||
|
||||
# %%
|
||||
s = sdr.vna_capture(frequency=np.linspace(70e6, 200e6, 101))
|
||||
|
||||
|
@ -322,7 +326,6 @@ if reference_sparams is not None:
|
|||
|
||||
plt.show()
|
||||
|
||||
|
||||
# %% SOL calibration
|
||||
cal_frequency = np.linspace(70e6, 600e6, 101)
|
||||
ideal_cal_frequency = rf.Frequency(np.min(cal_frequency), np.max(cal_frequency), len(cal_frequency))
|
||||
|
@ -343,7 +346,6 @@ calibration = rf.calibration.OnePort(
|
|||
[cal_ideal.short(), cal_ideal.open(), cal_ideal.load(0)],
|
||||
)
|
||||
|
||||
|
||||
# %%
|
||||
s = sdr.vna_capture(frequency=cal_frequency)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user