scikit-rf
scikit-rf/scikit-rf
Fix time gate level shift caused by a periodic window
Problemtime_gate() produced a level shift on a flat frequency response, about -0.0172 dB on the dataset attached to issue #1399, and larger for narrower gates.
My contributionRebuilt the gate from a symmetric window: get_window() now takes an explicit fftbins argument, and only the time-domain gate uses fftbins=False. Frequency-domain tapering, Network.windowed() and callable windows keep their existing behaviour.
Root causeFor an odd window length the periodic window is offset by half a sample relative to the gate grid. Before #900 a half-open slice happened to compensate for that offset, but its support was asymmetric and one sample too short.
Technical domainRF network analysis / time-domain gating
Language / toolingPython, NumPy / SciPy, pytest, ruff
Validation / testsRegression coverage for level preservation and for closed-gate support. pytest -k time_gate and the full skrf/tests/test_network.py suite; ruff over the touched files.
Upstreamscikit-rf/scikit-rf #1416