move some helpers to util.py

This commit is contained in:
2024-12-02 18:56:43 -07:00
parent c8ace2330d
commit 2c9e9b0eb2
3 changed files with 96 additions and 62 deletions

12
charon_vna/io_.py Normal file
View File

@@ -0,0 +1,12 @@
from pathlib import Path
import skrf as rf
import xarray as xr
from util import net2s
# scikit-rf has no way to save files aside from touchstone and pickle
def cal2zarr(cal: rf.calibration.Calibration, outpath: Path):
ideals = [net2s(net) for net in cal.ideals]
measured = [net2s(net) for net in cal.measured]
# s.to_zarr(outpath)