nickh007 commited on
Commit
b10c2aa
·
verified ·
1 Parent(s): 2d895c0

Initial release: 11 labelled networks with verified ground truth, plus a scorer

Browse files
.github/workflows/ci.yml ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: CI
2
+ on: { push: { branches: [main] }, pull_request: {}, workflow_dispatch: {} }
3
+
4
+ jobs:
5
+ corpus:
6
+ runs-on: ubuntu-latest
7
+ strategy:
8
+ matrix: { python: ['3.10', '3.11', '3.12', '3.13'] }
9
+ steps:
10
+ - uses: actions/checkout@v4
11
+ - uses: actions/setup-python@v5
12
+ with:
13
+ python-version: ${{ matrix.python }}
14
+ - run: pip install numpy pytest "sparam-lint @ git+https://github.com/nickharris808/sparam-lint" || pip install numpy pytest
15
+
16
+ - name: Regeneration must be byte-identical
17
+ run: |
18
+ python generate.py --out /tmp/regen
19
+ for f in data/*.s*p; do
20
+ cmp "$f" "/tmp/regen/$(basename $f)" || { echo "::error::$f is not reproducible"; exit 1; }
21
+ done
22
+ echo "corpus regenerates byte-identically"
23
+
24
+ - name: Labels re-derived, scorer verified
25
+ run: pytest -q
26
+
27
+ - name: Reference checker must conform
28
+ run: python score.py --checker sparam_lint_adapter:check
.gitignore ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ __pycache__/
2
+ *.py[cod]
3
+ build/
4
+ dist/
5
+ *.egg-info/
6
+ .pytest_cache/
7
+ .ruff_cache/
8
+ .venv/
9
+ venv/
CONTRIBUTING.md ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Contributing to sparam-conformance
2
+
3
+ ## The most useful contribution is a new pathological case
4
+
5
+ If you have an S-parameter file that a checker got wrong — passed something
6
+ non-physical, or rejected something real — that is the highest-value thing you
7
+ can send.
8
+
9
+ ## Every case must be synthesised, not captured
10
+
11
+ Add a closed-form generator to `generate.py`. The label must be derivable from
12
+ the construction: we know a network is non-passive because we built gain into
13
+ it, not because a tool said so. Captured measurement data has no ground truth,
14
+ which is exactly the problem this corpus exists to fix.
15
+
16
+ ## Every label is re-derived in the tests
17
+
18
+ `tests/test_conformance.py` recomputes passivity, reciprocity and energy for
19
+ every case by independent linear algebra and asserts they match the manifest.
20
+ Add your case and the tests will check your label. If they disagree with you,
21
+ they are probably right — that check caught three wrong labels during initial
22
+ development.
23
+
24
+ ## Isolate one law where physics permits
25
+
26
+ A case that breaks four laws at once tells you nothing about which check is
27
+ alive. Where a single-law violation is impossible (a reflection coefficient
28
+ above unity necessarily breaks energy conservation too), say so in the note and
29
+ label all the affected laws honestly.
30
+
31
+ ## Determinism
32
+
33
+ Generation must be reproducible byte-for-byte; there is a test. No randomness
34
+ without a pinned seed.
35
+
36
+ ```bash
37
+ python generate.py
38
+ PYTHONPATH=.:../sparam-lint/src pytest tests/ -q
39
+ ```
LICENSE ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Creative Commons Attribution 4.0 International (CC BY 4.0)
2
+
3
+ Copyright 2026 ChipletOS / Genesis contributors
4
+
5
+ You are free to:
6
+ Share — copy and redistribute the material in any medium or format
7
+ Adapt — remix, transform, and build upon the material for any purpose,
8
+ even commercially.
9
+
10
+ Under the following terms:
11
+ Attribution — You must give appropriate credit, provide a link to the
12
+ license, and indicate if changes were made. You may do so in any reasonable
13
+ manner, but not in any way that suggests the licensor endorses you or your
14
+ use.
15
+
16
+ No additional restrictions — You may not apply legal terms or technological
17
+ measures that legally restrict others from doing anything the license permits.
18
+
19
+ Full licence text: https://creativecommons.org/licenses/by/4.0/legalcode
20
+
21
+ THE MATERIAL IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND.
README.md ADDED
@@ -0,0 +1,180 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: cc-by-4.0
3
+ task_categories:
4
+ - tabular-classification
5
+ tags:
6
+ - rf
7
+ - microwave
8
+ - signal-integrity
9
+ - s-parameters
10
+ - touchstone
11
+ - physics
12
+ - validation
13
+ - benchmark
14
+ pretty_name: S-Parameter Physical Conformance Corpus
15
+ size_categories:
16
+ - n<1K
17
+ ---
18
+
19
+ # sparam-conformance
20
+
21
+ ![CI](https://github.com/nickharris808/sparam-conformance/actions/workflows/ci.yml/badge.svg) ![Licence](https://img.shields.io/badge/data-CC--BY--4.0-green) ![Cases](https://img.shields.io/badge/cases-11%20labelled-blue) ![Tests](https://img.shields.io/badge/tests-46%20passing-brightgreen)
22
+
23
+ **A labelled corpus of S-parameter networks with ground-truth physical verdicts —
24
+ and a scorer that grades any checker against it.**
25
+
26
+ There is no public dataset of *physically invalid* S-parameter files. Everyone
27
+ building an RF validation tool tests it on files that happen to be lying around,
28
+ which means nobody knows whether their checker catches the cases that matter.
29
+
30
+ This corpus is 11 networks, each **synthesised from a closed-form model**, so
31
+ every label is derived from construction rather than from some other tool's
32
+ opinion. We know `active_gain` is non-passive because we built 3× gain into it.
33
+
34
+ ## 30-second quickstart
35
+
36
+ ```bash
37
+ git clone <this-repo> && cd sparam-conformance
38
+
39
+ python score.py --checker mypackage.mychecker:run # grade your checker
40
+ python generate.py # optional: rebuild the corpus
41
+ ```
42
+
43
+ The corpus is committed, so scoring needs nothing installed beyond your own
44
+ checker. `generate.py` is only needed if you want to prove the files came from
45
+ the generator — it rebuilds them byte-identically, and CI checks that it does.
46
+
47
+ Adapter contract — five lines:
48
+
49
+ ```python
50
+ from sparam_lint import read_touchstone, run_battery
51
+
52
+ def check(path: str) -> dict[str, bool]:
53
+ net = read_touchstone(path)
54
+ return {r.name: r.passed for r in run_battery(net.s, net.freq_hz, net.z0)}
55
+ ```
56
+
57
+ ## Baseline
58
+
59
+ ```
60
+ $ python score.py --checker sparam_lint_adapter:check
61
+ sparam-conformance v1.0.0 11 cases x 5 laws
62
+
63
+ [ OK ] passive_line
64
+ [ OK ] passive_resonator
65
+ ...
66
+ [ OK ] ferrite_isolator
67
+
68
+ false passes : 0 <- must be 0
69
+ false fails : 0
70
+ errors : 0
71
+ verdict : CONFORMING
72
+ ```
73
+
74
+ ## The metric, and why it is not one number
75
+
76
+ A checker has two independent ways to be wrong, with very different costs:
77
+
78
+ | | Meaning | Cost |
79
+ |---|---|---|
80
+ | **False pass** | admits a non-physical network | **the model ships** |
81
+ | **False fail** | rejects a realizable network | annoying, erodes trust, harms nothing |
82
+
83
+ So both are reported, per law, and **the verdict requires zero false passes**.
84
+ False fails are reported but do not fail the verdict.
85
+
86
+ That asymmetry is deliberate and it has a consequence worth stating plainly: a
87
+ checker that rejects *everything* conforms. It has no false passes. It is also
88
+ useless — which is why the false-fail count sits beside the verdict, and why you
89
+ should read both. Optimising either number alone produces a bad tool.
90
+
91
+ ## Contents
92
+
93
+ | Case | Ports | Physical? | Expected failures |
94
+ |---|---|---|---|
95
+ | `passive_line` | 2 | ✅ | — |
96
+ | `passive_resonator` | 2 | ✅ | — |
97
+ | `passive_attenuator` | 2 | ✅ | — |
98
+ | `matched_load` | 2 | ✅ | — |
99
+ | `marginal_lossless` | 2 | ✅ | — |
100
+ | `passive_4port` | 4 | ✅ | — |
101
+ | `active_gain` | 2 | ❌ | passivity, energy |
102
+ | `energy_row_violation` | 2 | ❌ | passivity, energy |
103
+ | `negative_resistance` | 2 | ❌ | passivity, energy, positive-real Z₀ |
104
+ | `noncausal_advance` | 2 | ❌ | group delay |
105
+ | `ferrite_isolator` | 2 | ✅ | **reciprocity** |
106
+
107
+ Several cases exist to catch specific checker bugs:
108
+
109
+ - **`passive_resonator`** — sharp phase slope at resonance. A group-delay check
110
+ that differences phase without unwrapping reports spurious negative delay here.
111
+ - **`marginal_lossless`** — σ_max = 1 − 1e-12. A checker with a too-tight
112
+ tolerance false-alarms on a perfectly legal lossless line.
113
+ - **`matched_load`** — all-zero S. Checkers that normalise by ‖S‖ divide by zero.
114
+ - **`passive_4port`** — exercises N>2, where Touchstone switches from
115
+ column-major to row-major ordering.
116
+
117
+ ## The case worth arguing about
118
+
119
+ **`ferrite_isolator` is physically realizable and fails reciprocity.**
120
+
121
+ A ferrite isolator is a real, buyable component. Its medium is non-reciprocal, so
122
+ `S ≠ Sᵀ` is correct behaviour, not a defect. The reciprocity check firing here is
123
+ a **true positive for the law and a false alarm for the device**.
124
+
125
+ The corpus keeps it because any honest tool has to handle this: a checker that
126
+ treats every law failure as a defect will reject legitimate hardware, and a
127
+ checker that suppresses reciprocity to avoid the noise goes blind to genuine
128
+ transpose bugs. The right answer is for the user to declare non-reciprocity
129
+ expected — and the corpus exists partly to force that design decision.
130
+
131
+ ## Ground truth is verified, not asserted
132
+
133
+ Every label in `manifest.json` is re-derived from the network itself in the test
134
+ suite, by independent linear algebra — singular values for passivity, Frobenius
135
+ asymmetry for reciprocity, row power for energy. A corpus whose ground truth is
136
+ wrong is worse than no corpus, because every checker scored against it inherits
137
+ the error.
138
+
139
+ That check earned its place: it caught **three wrong labels** during development.
140
+ The "passive" resonator had σ_max = 1.2441 and was not passive at all; a case
141
+ meant to isolate energy was also non-reciprocal; and `negative_resistance`
142
+ unavoidably breaks energy conservation too, which the original label denied.
143
+
144
+ Generation is deterministic, files are SHA-256 pinned in the manifest, and both
145
+ properties are tested.
146
+
147
+ ## Scope, honestly
148
+
149
+ These are **synthetic closed-form networks**, not measured devices. They exercise
150
+ the laws and the specific bugs listed above; they are not a sample of what comes
151
+ out of a real VNA, and passing this corpus does not mean a checker is correct on
152
+ measured data with noise, drift and de-embedding artefacts.
153
+
154
+ 11 cases is small. It is meant to be a conformance floor — a checker that fails
155
+ here is definitely broken; one that passes is merely not-obviously-broken.
156
+
157
+ Contributions of new pathological cases are the most useful thing you can send.
158
+
159
+ ## Files
160
+
161
+ ```
162
+ generate.py deterministic corpus generator
163
+ score.py scorer + adapter contract
164
+ sparam_lint_adapter.py reference adapter (5 lines)
165
+ data/*.s2p, *.s4p the corpus
166
+ data/manifest.json labels, tags, SHA-256 digests
167
+ tests/ label verification + scorer tests
168
+ ```
169
+
170
+ ## Licence
171
+
172
+ **CC-BY-4.0** — see [LICENSE](LICENSE). Attribution: ChipletOS / Genesis contributors.
173
+
174
+ The corpus is synthetic and contains no proprietary or measured data.
175
+
176
+ ## Related
177
+
178
+ - [`sparam-lint`](https://github.com/nickharris808/sparam-lint) — the reference checker (Apache-2.0)
179
+ - [ChipletOS](https://chipletos.com) — scattering synthesis that is passive *by
180
+ construction*, so it cannot fail these laws whatever its parameters
data/active_gain.s2p ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ! active_gain
2
+ ! Delay line with 3x through-path gain. Creates energy: fails both the spectral-norm and the row-power tests.
3
+ # HZ S RI R 50
4
+ 1000000000 0.05 0 2.8098500229 -0.354966606919 2.8098500229 -0.354966606919 0.05 0
5
+ 1619047619.05 0.05 0 2.77376665647 -0.572256042937 2.77376665647 -0.572256042937 0.05 0
6
+ 2238095238.1 0.05 0 2.72090611862 -0.786084179244 2.72090611862 -0.786084179244 0.05 0
7
+ 2857142857.14 0.05 0 2.65158813716 -0.995157672981 2.65158813716 -0.995157672981 0.05 0
8
+ 3476190476.19 0.05 0 2.56623198298 -1.19821193982 2.56623198298 -1.19821193982 0.05 0
9
+ 4095238095.24 0.05 0 2.46535393414 -1.39401880283 2.46535393414 -1.39401880283 0.05 0
10
+ 4714285714.29 0.05 0 2.3495641531 -1.58139392109 2.3495641531 -1.58139392109 0.05 0
11
+ 5333333333.33 0.05 0 2.21956299619 -1.75920395326 2.21956299619 -1.75920395326 0.05 0
12
+ 5952380952.38 0.05 0 2.07613677745 -1.92637341254 2.07613677745 -1.92637341254 0.05 0
13
+ 6571428571.43 0.05 0 1.92015301263 -2.08189117182 1.92015301263 -2.08189117182 0.05 0
14
+ 7190476190.48 0.05 0 1.752555172 -2.22481657947 1.752555172 -2.22481657947 0.05 0
15
+ 7809523809.52 0.05 0 1.57435697374 -2.35428514892 1.57435697374 -2.35428514892 0.05 0
16
+ 8428571428.57 0.05 0 1.38663625247 -2.46951378748 1.38663625247 -2.46951378748 0.05 0
17
+ 9047619047.62 0.05 0 1.19052843993 -2.5698055329 1.19052843993 -2.5698055329 0.05 0
18
+ 9666666666.67 0.05 0 0.98721969733 -2.65455376898 0.98721969733 -2.65455376898 0.05 0
19
+ 10285714285.7 0.05 0 0.777939740801 -2.72324589468 0.777939740801 -2.72324589468 0.05 0
20
+ 10904761904.8 0.05 0 0.563954403467 -2.77546642459 0.563954403467 -2.77546642459 0.05 0
21
+ 11523809523.8 0.05 0 0.34655797902 -2.81089950201 0.34655797902 -2.81089950201 0.05 0
22
+ 12142857142.9 0.05 0 0.127065393165 -2.82933080941 0.127065393165 -2.82933080941 0.05 0
23
+ 12761904761.9 0.05 0 -0.0931957497263 -2.83064886474 -0.0931957497263 -2.83064886474 0.05 0
24
+ 13380952381 0.05 0 -0.312893196654 -2.81484569572 -0.312893196654 -2.81484569572 0.05 0
25
+ 14000000000 0.05 0 -0.530698104142 -2.78201688806 -0.530698104142 -2.78201688806 0.05 0
26
+ 14619047619 0.05 0 -0.745293075768 -2.73236100734 -0.745293075768 -2.73236100734 0.05 0
27
+ 15238095238.1 0.05 0 -0.955380130458 -2.66617839792 -0.955380130458 -2.66617839792 0.05 0
28
+ 15857142857.1 0.05 0 -1.15968855335 -2.58386936637 -1.15968855335 -2.58386936637 0.05 0
29
+ 16476190476.2 0.05 0 -1.35698258171 -2.48593176015 -1.35698258171 -2.48593176015 0.05 0
30
+ 17095238095.2 0.05 0 -1.5460688795 -2.37295795644 -1.5460688795 -2.37295795644 0.05 0
31
+ 17714285714.3 0.05 0 -1.72580375526 -2.24563127907 -1.72580375526 -2.24563127907 0.05 0
32
+ 18333333333.3 0.05 0 -1.89510007977 -2.10472186544 -1.89510007977 -2.10472186544 0.05 0
33
+ 18952380952.4 0.05 0 -2.05293386152 -1.95108200839 -2.05293386152 -1.95108200839 0.05 0
34
+ 19571428571.4 0.05 0 -2.19835044039 -1.785641001 -2.19835044039 -1.785641001 0.05 0
35
+ 20190476190.5 0.05 0 -2.33047026192 -1.60939951582 -2.33047026192 -1.60939951582 0.05 0
36
+ 20809523809.5 0.05 0 -2.44849419727 -1.42342355226 -2.44849419727 -1.42342355226 0.05 0
37
+ 21428571428.6 0.05 0 -2.55170837681 -1.22883798887 -2.55170837681 -1.22883798887 0.05 0
38
+ 22047619047.6 0.05 0 -2.63948850795 -1.02681977951 -2.63948850795 -1.02681977951 0.05 0
39
+ 22666666666.7 0.05 0 -2.71130365118 -0.818590834494 -2.71130365118 -0.818590834494 0.05 0
40
+ 23285714285.7 0.05 0 -2.76671943146 -0.605410629893 -2.76671943146 -0.605410629893 0.05 0
41
+ 23904761904.8 0.05 0 -2.80540066558 -0.388568589539 -2.80540066558 -0.388568589539 0.05 0
42
+ 24523809523.8 0.05 0 -2.82711338948 -0.169376285937 -2.82711338948 -0.169376285937 0.05 0
43
+ 25142857142.9 0.05 0 -2.83172627341 0.0508404928057 -2.83172627341 0.0508404928057 0.05 0
44
+ 25761904761.9 0.05 0 -2.81921141626 0.270749762025 -2.81921141626 0.270749762025 0.05 0
45
+ 26380952381 0.05 0 -2.78964451435 0.489021397033 -2.78964451435 0.489021397033 0.05 0
46
+ 27000000000 0.05 0 -2.74320440355 0.704335178401 -2.74320440355 0.704335178401 0.05 0
47
+ 27619047619 0.05 0 -2.68017197761 0.915388777322 -2.68017197761 0.915388777322 0.05 0
48
+ 28238095238.1 0.05 0 -2.60092848914 1.12090563277 -2.60092848914 1.12090563277 0.05 0
49
+ 28857142857.1 0.05 0 -2.50595324364 1.3196426728 -2.50595324364 1.3196426728 0.05 0
50
+ 29476190476.2 0.05 0 -2.39582070039 1.51039783329 -2.39582070039 1.51039783329 0.05 0
51
+ 30095238095.2 0.05 0 -2.27119699779 1.69201732864 -2.27119699779 1.69201732864 0.05 0
52
+ 30714285714.3 0.05 0 -2.1328359243 1.86340263046 -2.1328359243 1.86340263046 0.05 0
53
+ 31333333333.3 0.05 0 -1.98157435905 2.02351711205 -1.98157435905 2.02351711205 0.05 0
54
+ 31952380952.4 0.05 0 -1.81832721 2.17139231844 -1.81832721 2.17139231844 0.05 0
55
+ 32571428571.4 0.05 0 -1.64408188011 2.30613382411 -1.64408188011 2.30613382411 0.05 0
56
+ 33190476190.5 0.05 0 -1.45989229501 2.42692664293 -1.45989229501 2.42692664293 0.05 0
57
+ 33809523809.5 0.05 0 -1.26687252832 2.53304015764 -1.26687252832 2.53304015764 0.05 0
58
+ 34428571428.6 0.05 0 -1.06619006314 2.62383253895 -1.06619006314 2.62383253895 0.05 0
59
+ 35047619047.6 0.05 0 -0.859058730521 2.69875462773 -0.859058730521 2.69875462773 0.05 0
60
+ 35666666666.7 0.05 0 -0.646731367612 2.75735325654 -0.646731367612 2.75735325654 0.05 0
61
+ 36285714285.7 0.05 0 -0.430492239815 2.79927399064 -0.430492239815 2.79927399064 0.05 0
62
+ 36904761904.8 0.05 0 -0.211649272908 2.82426327181 -0.211649272908 2.82426327181 0.05 0
63
+ 37523809523.8 0.05 0 0.00847385796691 2.83216995199 0.00847385796691 2.83216995199 0.05 0
64
+ 38142857142.9 0.05 0 0.228545734578 2.82294620749 0.228545734578 2.82294620749 0.05 0
65
+ 38761904761.9 0.05 0 0.447235248706 2.7966478283 0.447235248706 2.7966478283 0.05 0
66
+ 39380952381 0.05 0 0.663219653371 2.75343388055 0.663219653371 2.75343388055 0.05 0
67
+ 40000000000 0.05 0 0.875192563491 2.69356574451 0.875192563491 2.69356574451 0.05 0
data/energy_row_violation.s2p ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ! energy_row_violation
2
+ ! Row power > 1 when port 1 is driven.
3
+ # HZ S RI R 50
4
+ 1000000000 0.9 0 0.9 0 0.9 0 0.9 0
5
+ 1619047619.05 0.9 0 0.9 0 0.9 0 0.9 0
6
+ 2238095238.1 0.9 0 0.9 0 0.9 0 0.9 0
7
+ 2857142857.14 0.9 0 0.9 0 0.9 0 0.9 0
8
+ 3476190476.19 0.9 0 0.9 0 0.9 0 0.9 0
9
+ 4095238095.24 0.9 0 0.9 0 0.9 0 0.9 0
10
+ 4714285714.29 0.9 0 0.9 0 0.9 0 0.9 0
11
+ 5333333333.33 0.9 0 0.9 0 0.9 0 0.9 0
12
+ 5952380952.38 0.9 0 0.9 0 0.9 0 0.9 0
13
+ 6571428571.43 0.9 0 0.9 0 0.9 0 0.9 0
14
+ 7190476190.48 0.9 0 0.9 0 0.9 0 0.9 0
15
+ 7809523809.52 0.9 0 0.9 0 0.9 0 0.9 0
16
+ 8428571428.57 0.9 0 0.9 0 0.9 0 0.9 0
17
+ 9047619047.62 0.9 0 0.9 0 0.9 0 0.9 0
18
+ 9666666666.67 0.9 0 0.9 0 0.9 0 0.9 0
19
+ 10285714285.7 0.9 0 0.9 0 0.9 0 0.9 0
20
+ 10904761904.8 0.9 0 0.9 0 0.9 0 0.9 0
21
+ 11523809523.8 0.9 0 0.9 0 0.9 0 0.9 0
22
+ 12142857142.9 0.9 0 0.9 0 0.9 0 0.9 0
23
+ 12761904761.9 0.9 0 0.9 0 0.9 0 0.9 0
24
+ 13380952381 0.9 0 0.9 0 0.9 0 0.9 0
25
+ 14000000000 0.9 0 0.9 0 0.9 0 0.9 0
26
+ 14619047619 0.9 0 0.9 0 0.9 0 0.9 0
27
+ 15238095238.1 0.9 0 0.9 0 0.9 0 0.9 0
28
+ 15857142857.1 0.9 0 0.9 0 0.9 0 0.9 0
29
+ 16476190476.2 0.9 0 0.9 0 0.9 0 0.9 0
30
+ 17095238095.2 0.9 0 0.9 0 0.9 0 0.9 0
31
+ 17714285714.3 0.9 0 0.9 0 0.9 0 0.9 0
32
+ 18333333333.3 0.9 0 0.9 0 0.9 0 0.9 0
33
+ 18952380952.4 0.9 0 0.9 0 0.9 0 0.9 0
34
+ 19571428571.4 0.9 0 0.9 0 0.9 0 0.9 0
35
+ 20190476190.5 0.9 0 0.9 0 0.9 0 0.9 0
36
+ 20809523809.5 0.9 0 0.9 0 0.9 0 0.9 0
37
+ 21428571428.6 0.9 0 0.9 0 0.9 0 0.9 0
38
+ 22047619047.6 0.9 0 0.9 0 0.9 0 0.9 0
39
+ 22666666666.7 0.9 0 0.9 0 0.9 0 0.9 0
40
+ 23285714285.7 0.9 0 0.9 0 0.9 0 0.9 0
41
+ 23904761904.8 0.9 0 0.9 0 0.9 0 0.9 0
42
+ 24523809523.8 0.9 0 0.9 0 0.9 0 0.9 0
43
+ 25142857142.9 0.9 0 0.9 0 0.9 0 0.9 0
44
+ 25761904761.9 0.9 0 0.9 0 0.9 0 0.9 0
45
+ 26380952381 0.9 0 0.9 0 0.9 0 0.9 0
46
+ 27000000000 0.9 0 0.9 0 0.9 0 0.9 0
47
+ 27619047619 0.9 0 0.9 0 0.9 0 0.9 0
48
+ 28238095238.1 0.9 0 0.9 0 0.9 0 0.9 0
49
+ 28857142857.1 0.9 0 0.9 0 0.9 0 0.9 0
50
+ 29476190476.2 0.9 0 0.9 0 0.9 0 0.9 0
51
+ 30095238095.2 0.9 0 0.9 0 0.9 0 0.9 0
52
+ 30714285714.3 0.9 0 0.9 0 0.9 0 0.9 0
53
+ 31333333333.3 0.9 0 0.9 0 0.9 0 0.9 0
54
+ 31952380952.4 0.9 0 0.9 0 0.9 0 0.9 0
55
+ 32571428571.4 0.9 0 0.9 0 0.9 0 0.9 0
56
+ 33190476190.5 0.9 0 0.9 0 0.9 0 0.9 0
57
+ 33809523809.5 0.9 0 0.9 0 0.9 0 0.9 0
58
+ 34428571428.6 0.9 0 0.9 0 0.9 0 0.9 0
59
+ 35047619047.6 0.9 0 0.9 0 0.9 0 0.9 0
60
+ 35666666666.7 0.9 0 0.9 0 0.9 0 0.9 0
61
+ 36285714285.7 0.9 0 0.9 0 0.9 0 0.9 0
62
+ 36904761904.8 0.9 0 0.9 0 0.9 0 0.9 0
63
+ 37523809523.8 0.9 0 0.9 0 0.9 0 0.9 0
64
+ 38142857142.9 0.9 0 0.9 0 0.9 0 0.9 0
65
+ 38761904761.9 0.9 0 0.9 0 0.9 0 0.9 0
66
+ 39380952381 0.9 0 0.9 0 0.9 0 0.9 0
67
+ 40000000000 0.9 0 0.9 0 0.9 0 0.9 0
data/ferrite_isolator.s2p ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ! ferrite_isolator
2
+ ! A ferrite isolator. NON-RECIPROCAL BY DESIGN and entirely realizable -- the medium is not reciprocal. The reciprocity check correctly fires, and that is a true positive for the law but NOT a defect in the device. Any tool reporting this must let the user say so.
3
+ # HZ S RI R 50
4
+ 1000000000 0.05 0 0.936616674299 -0.118322202306 0.018732333486 -0.00236644404613 0.05 0
5
+ 1619047619.05 0.05 0 0.924588885489 -0.190752014312 0.0184917777098 -0.00381504028625 0.05 0
6
+ 2238095238.1 0.05 0 0.906968706207 -0.262028059748 0.0181393741241 -0.00524056119496 0.05 0
7
+ 2857142857.14 0.05 0 0.883862712386 -0.331719224327 0.0176772542477 -0.00663438448654 0.05 0
8
+ 3476190476.19 0.05 0 0.855410660994 -0.39940397994 0.0171082132199 -0.00798807959881 0.05 0
9
+ 4095238095.24 0.05 0 0.821784644713 -0.464672934275 0.0164356928943 -0.0092934586855 0.05 0
10
+ 4714285714.29 0.05 0 0.783188051034 -0.527131307031 0.0156637610207 -0.0105426261406 0.05 0
11
+ 5333333333.33 0.05 0 0.739854332063 -0.586401317753 0.0147970866413 -0.0117280263551 0.05 0
12
+ 5952380952.38 0.05 0 0.692045592483 -0.642124470846 0.0138409118497 -0.0128424894169 0.05 0
13
+ 6571428571.43 0.05 0 0.64005100421 -0.693963723939 0.0128010200842 -0.0138792744788 0.05 0
14
+ 7190476190.48 0.05 0 0.584185057333 -0.741605526491 0.0116837011467 -0.0148321105298 0.05 0
15
+ 7809523809.52 0.05 0 0.524785657914 -0.784761716307 0.0104957131583 -0.0156952343261 0.05 0
16
+ 8428571428.57 0.05 0 0.462212084157 -0.823171262492 0.00924424168314 -0.0164634252498 0.05 0
17
+ 9047619047.62 0.05 0 0.396842813311 -0.856601844299 0.00793685626622 -0.017132036886 0.05 0
18
+ 9666666666.67 0.05 0 0.329073232443 -0.884851256327 0.00658146464887 -0.0176970251265 0.05 0
19
+ 10285714285.7 0.05 0 0.259313246934 -0.90774863156 0.00518626493867 -0.0181549726312 0.05 0
20
+ 10904761904.8 0.05 0 0.187984801156 -0.925155474863 0.00375969602312 -0.0185031094973 0.05 0
21
+ 11523809523.8 0.05 0 0.11551932634 -0.936966500669 0.0023103865268 -0.0187393300134 0.05 0
22
+ 12142857142.9 0.05 0 0.0423551310551 -0.943110269803 0.000847102621103 -0.0188622053961 0.05 0
23
+ 12761904761.9 0.05 0 -0.0310652499088 -0.943549621579 -0.000621304998175 -0.0188709924316 0.05 0
24
+ 13380952381 0.05 0 -0.104297732218 -0.938281898572 -0.00208595464436 -0.0187656379714 0.05 0
25
+ 14000000000 0.05 0 -0.176899368047 -0.927338962687 -0.00353798736095 -0.0185467792537 0.05 0
26
+ 14619047619 0.05 0 -0.248431025256 -0.910787002446 -0.00496862050512 -0.0182157400489 0.05 0
27
+ 15238095238.1 0.05 0 -0.318460043486 -0.88872613264 -0.00636920086972 -0.0177745226528 0.05 0
28
+ 15857142857.1 0.05 0 -0.386562851115 -0.861289788789 -0.0077312570223 -0.0172257957758 0.05 0
29
+ 16476190476.2 0.05 0 -0.452327527236 -0.828643920052 -0.00904655054472 -0.016572878401 0.05 0
30
+ 17095238095.2 0.05 0 -0.515356293167 -0.790985985481 -0.0103071258633 -0.0158197197096 0.05 0
31
+ 17714285714.3 0.05 0 -0.575267918421 -0.748543759689 -0.0115053583684 -0.0149708751938 0.05 0
32
+ 18333333333.3 0.05 0 -0.631700026589 -0.701573955148 -0.0126340005318 -0.014031479103 0.05 0
33
+ 18952380952.4 0.05 0 -0.684311287172 -0.650360669462 -0.0136862257434 -0.0130072133892 0.05 0
34
+ 19571428571.4 0.05 0 -0.73278348013 -0.595213666999 -0.0146556696026 -0.01190427334 0.05 0
35
+ 20190476190.5 0.05 0 -0.776823420639 -0.536466505273 -0.0155364684128 -0.0107293301055 0.05 0
36
+ 20809523809.5 0.05 0 -0.816164732424 -0.47447451742 -0.0163232946485 -0.0094894903484 0.05 0
37
+ 21428571428.6 0.05 0 -0.850569458938 -0.409612662958 -0.0170113891788 -0.00819225325915 0.05 0
38
+ 22047619047.6 0.05 0 -0.879829502651 -0.342273259836 -0.017596590053 -0.00684546519672 0.05 0
39
+ 22666666666.7 0.05 0 -0.903767883726 -0.272863611498 -0.0180753576745 -0.00545727222996 0.05 0
40
+ 23285714285.7 0.05 0 -0.922239810487 -0.201803543298 -0.0184447962097 -0.00403607086595 0.05 0
41
+ 23904761904.8 0.05 0 -0.935133555193 -0.12952286318 -0.0187026711039 -0.0025904572636 0.05 0
42
+ 24523809523.8 0.05 0 -0.942371129826 -0.0564587619789 -0.0188474225965 -0.00112917523958 0.05 0
43
+ 25142857142.9 0.05 0 -0.943908757802 0.0169468309352 -0.018878175156 0.000338936618705 0.05 0
44
+ 25761904761.9 0.05 0 -0.939737138753 0.0902499206749 -0.0187947427751 0.0018049984135 0.05 0
45
+ 26380952381 0.05 0 -0.929881504784 0.163007132344 -0.0185976300957 0.00326014264689 0.05 0
46
+ 27000000000 0.05 0 -0.914401467851 0.2347783928 -0.018288029357 0.00469556785601 0.05 0
47
+ 27619047619 0.05 0 -0.893390659203 0.305129592441 -0.0178678131841 0.00610259184881 0.05 0
48
+ 28238095238.1 0.05 0 -0.866976163047 0.373635210923 -0.0173395232609 0.00747270421847 0.05 0
49
+ 28857142857.1 0.05 0 -0.835317747881 0.439880890934 -0.0167063549576 0.00879761781867 0.05 0
50
+ 29476190476.2 0.05 0 -0.798606900128 0.50346594443 -0.0159721380026 0.0100693188886 0.05 0
51
+ 30095238095.2 0.05 0 -0.757065665932 0.564005776213 -0.0151413133186 0.0112801155243 0.05 0
52
+ 30714285714.3 0.05 0 -0.710945308101 0.621134210153 -0.014218906162 0.0124226842031 0.05 0
53
+ 31333333333.3 0.05 0 -0.66052478635 0.674505704016 -0.013210495727 0.0134901140803 0.05 0
54
+ 31952380952.4 0.05 0 -0.60610907 0.72379743948 -0.0121221814 0.0144759487896 0.05 0
55
+ 32571428571.4 0.05 0 -0.548027293371 0.768711274702 -0.0109605458674 0.015374225494 0.05 0
56
+ 33190476190.5 0.05 0 -0.486630765004 0.808975547643 -0.00973261530009 0.0161795109529 0.05 0
57
+ 33809523809.5 0.05 0 -0.422290842773 0.844346719212 -0.00844581685546 0.0168869343842 0.05 0
58
+ 34428571428.6 0.05 0 -0.355396687712 0.874610846318 -0.00710793375424 0.0174922169264 0.05 0
59
+ 35047619047.6 0.05 0 -0.286352910174 0.899584875912 -0.00572705820347 0.0179916975182 0.05 0
60
+ 35666666666.7 0.05 0 -0.215577122537 0.91911775218 -0.00431154245075 0.0183823550436 0.05 0
61
+ 36285714285.7 0.05 0 -0.143497413272 0.933091330213 -0.00286994826543 0.0186618266043 0.05 0
62
+ 36904761904.8 0.05 0 -0.0705497576361 0.941421090603 -0.00141099515272 0.0188284218121 0.05 0
63
+ 37523809523.8 0.05 0 0.0028246193223 0.944056650662 5.6492386446e-05 0.0188811330132 0.05 0
64
+ 38142857142.9 0.05 0 0.0761819115262 0.940982069165 0.00152363823052 0.0188196413833 0.05 0
65
+ 38761904761.9 0.05 0 0.149078416235 0.932215942766 0.00298156832471 0.0186443188553 0.05 0
66
+ 39380952381 0.05 0 0.22107321779 0.917811293518 0.0044214643558 0.0183562258704 0.05 0
67
+ 40000000000 0.05 0 0.291730854497 0.897855248171 0.00583461708994 0.0179571049634 0.05 0
data/manifest.json ADDED
@@ -0,0 +1,257 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "corpus": "sparam-conformance",
3
+ "version": "1.0.0",
4
+ "license": "CC-BY-4.0",
5
+ "n_cases": 11,
6
+ "laws": [
7
+ "passivity",
8
+ "reciprocity",
9
+ "energy_conservation",
10
+ "positive_real_z0",
11
+ "group_delay_nonneg"
12
+ ],
13
+ "freq_hz": {
14
+ "start": 1000000000.0,
15
+ "stop": 40000000000.0,
16
+ "n": 64
17
+ },
18
+ "note": "Every network is synthesised from a closed-form model, so each label is derived from construction rather than from a checker's opinion. 'physical' marks whether the device is realizable; a device can be physical AND legitimately fail a law -- see ferrite_isolator.",
19
+ "cases": [
20
+ {
21
+ "name": "passive_line",
22
+ "file": "passive_line.s2p",
23
+ "n_ports": 2,
24
+ "z0_ohm": 50.0,
25
+ "physical": true,
26
+ "expect": {
27
+ "passivity": true,
28
+ "reciprocity": true,
29
+ "energy_conservation": true,
30
+ "positive_real_z0": true,
31
+ "group_delay_nonneg": true
32
+ },
33
+ "expect_all_pass": true,
34
+ "note": "Lossy 20 ps delay line, 0.5 dB insertion loss. The baseline sane case.",
35
+ "tags": [
36
+ "passive",
37
+ "2port"
38
+ ],
39
+ "sha256": "74d631c14f5c18e9e9cf06bde2579628ff15820fc4b652035cd09d2809f4166d"
40
+ },
41
+ {
42
+ "name": "passive_resonator",
43
+ "file": "passive_resonator.s2p",
44
+ "n_ports": 2,
45
+ "z0_ohm": 50.0,
46
+ "physical": true,
47
+ "expect": {
48
+ "passivity": true,
49
+ "reciprocity": true,
50
+ "energy_conservation": true,
51
+ "positive_real_z0": true,
52
+ "group_delay_nonneg": true
53
+ },
54
+ "expect_all_pass": true,
55
+ "note": "Shunt resonator, Q=30 at 20 GHz. Sharp phase slope near resonance -- the case where a group-delay check without phase unwrapping fails.",
56
+ "tags": [
57
+ "passive",
58
+ "2port",
59
+ "sharp_phase"
60
+ ],
61
+ "sha256": "1a4b1e2f9f873fcdc03327dababdccce6fc3d6ab0a0968ac70b2f03a803c3f39"
62
+ },
63
+ {
64
+ "name": "passive_attenuator",
65
+ "file": "passive_attenuator.s2p",
66
+ "n_ports": 2,
67
+ "z0_ohm": 50.0,
68
+ "physical": true,
69
+ "expect": {
70
+ "passivity": true,
71
+ "reciprocity": true,
72
+ "energy_conservation": true,
73
+ "positive_real_z0": true,
74
+ "group_delay_nonneg": true
75
+ },
76
+ "expect_all_pass": true,
77
+ "note": "Ideal 10 dB matched attenuator.",
78
+ "tags": [
79
+ "passive",
80
+ "2port"
81
+ ],
82
+ "sha256": "ee4b89263c942825af357be7f0273716d62ea984da5d441bcaf204c70f59963d"
83
+ },
84
+ {
85
+ "name": "matched_load",
86
+ "file": "matched_load.s2p",
87
+ "n_ports": 2,
88
+ "z0_ohm": 50.0,
89
+ "physical": true,
90
+ "expect": {
91
+ "passivity": true,
92
+ "reciprocity": true,
93
+ "energy_conservation": true,
94
+ "positive_real_z0": true,
95
+ "group_delay_nonneg": true
96
+ },
97
+ "expect_all_pass": true,
98
+ "note": "All-zero S: perfectly matched, fully absorbing. A degenerate but legal network; checkers that divide by |S| must not blow up.",
99
+ "tags": [
100
+ "passive",
101
+ "2port",
102
+ "degenerate"
103
+ ],
104
+ "sha256": "7a60bff097406dfcb7cab59bcc837935353727634161806c53eae99ba865470b"
105
+ },
106
+ {
107
+ "name": "marginal_lossless",
108
+ "file": "marginal_lossless.s2p",
109
+ "n_ports": 2,
110
+ "z0_ohm": 50.0,
111
+ "physical": true,
112
+ "expect": {
113
+ "passivity": true,
114
+ "reciprocity": true,
115
+ "energy_conservation": true,
116
+ "positive_real_z0": true,
117
+ "group_delay_nonneg": true
118
+ },
119
+ "expect_all_pass": true,
120
+ "note": "Lossless line with sigma_max = 1 - 1e-12. Sits on the passivity boundary; a checker with a too-tight tolerance false-alarms here.",
121
+ "tags": [
122
+ "passive",
123
+ "2port",
124
+ "boundary"
125
+ ],
126
+ "sha256": "2dc0808d30a664b78cc263f06a9a46b48f7920bb3e9a132d56dfe4364d9179b4"
127
+ },
128
+ {
129
+ "name": "passive_4port",
130
+ "file": "passive_4port.s4p",
131
+ "n_ports": 4,
132
+ "z0_ohm": 50.0,
133
+ "physical": true,
134
+ "expect": {
135
+ "passivity": true,
136
+ "reciprocity": true,
137
+ "energy_conservation": true,
138
+ "positive_real_z0": true,
139
+ "group_delay_nonneg": true
140
+ },
141
+ "expect_all_pass": true,
142
+ "note": "Four-port with two independent thru paths. Exercises N>2 handling.",
143
+ "tags": [
144
+ "passive",
145
+ "4port"
146
+ ],
147
+ "sha256": "1c24a1157c72806fa771c2e592eb8751724c8ba5cae446dc7b798dd8b0302f17"
148
+ },
149
+ {
150
+ "name": "active_gain",
151
+ "file": "active_gain.s2p",
152
+ "n_ports": 2,
153
+ "z0_ohm": 50.0,
154
+ "physical": false,
155
+ "expect": {
156
+ "passivity": false,
157
+ "reciprocity": true,
158
+ "energy_conservation": false,
159
+ "positive_real_z0": true,
160
+ "group_delay_nonneg": true
161
+ },
162
+ "expect_all_pass": false,
163
+ "note": "Delay line with 3x through-path gain. Creates energy: fails both the spectral-norm and the row-power tests.",
164
+ "tags": [
165
+ "nonphysical",
166
+ "2port"
167
+ ],
168
+ "sha256": "3f78dfcd6598f6734633a65a37e30edc8c4486c89d0c2e29cc52720780f22c32"
169
+ },
170
+ {
171
+ "name": "energy_row_violation",
172
+ "file": "energy_row_violation.s2p",
173
+ "n_ports": 2,
174
+ "z0_ohm": 50.0,
175
+ "physical": false,
176
+ "expect": {
177
+ "passivity": false,
178
+ "reciprocity": true,
179
+ "energy_conservation": false,
180
+ "positive_real_z0": true,
181
+ "group_delay_nonneg": true
182
+ },
183
+ "expect_all_pass": false,
184
+ "note": "Row power > 1 when port 1 is driven.",
185
+ "tags": [
186
+ "nonphysical",
187
+ "2port"
188
+ ],
189
+ "sha256": "05e30904110032dc75777b11b96dbde5398ae9e922ab64a89704f9675db7ae83"
190
+ },
191
+ {
192
+ "name": "negative_resistance",
193
+ "file": "negative_resistance.s2p",
194
+ "n_ports": 2,
195
+ "z0_ohm": 50.0,
196
+ "physical": false,
197
+ "expect": {
198
+ "passivity": false,
199
+ "reciprocity": true,
200
+ "energy_conservation": false,
201
+ "positive_real_z0": false,
202
+ "group_delay_nonneg": true
203
+ },
204
+ "expect_all_pass": false,
205
+ "note": "|S11| > 1 gives Re(Z_in) < 0: negative resistance at the port. It unavoidably breaks energy conservation too -- a reflection coefficient above unity returns more power than arrives -- so this case cannot isolate a single law, and the label says so.",
206
+ "tags": [
207
+ "nonphysical",
208
+ "2port"
209
+ ],
210
+ "sha256": "2eb111856d1bfcdfb53e93f873704073f21af7926cb2ed18f5b2ef5b3114fdcc"
211
+ },
212
+ {
213
+ "name": "noncausal_advance",
214
+ "file": "noncausal_advance.s2p",
215
+ "n_ports": 2,
216
+ "z0_ohm": 50.0,
217
+ "physical": false,
218
+ "expect": {
219
+ "passivity": true,
220
+ "reciprocity": true,
221
+ "energy_conservation": true,
222
+ "positive_real_z0": true,
223
+ "group_delay_nonneg": false
224
+ },
225
+ "expect_all_pass": false,
226
+ "note": "Phase advances with frequency: the output precedes the input. Passive and reciprocal, so ONLY the causality check should fire.",
227
+ "tags": [
228
+ "nonphysical",
229
+ "2port",
230
+ "isolates_one_law"
231
+ ],
232
+ "sha256": "ede95a08f616205688b97eac8c7665b2491ce4a038767614ebc69ad0730ffe5c"
233
+ },
234
+ {
235
+ "name": "ferrite_isolator",
236
+ "file": "ferrite_isolator.s2p",
237
+ "n_ports": 2,
238
+ "z0_ohm": 50.0,
239
+ "physical": true,
240
+ "expect": {
241
+ "passivity": true,
242
+ "reciprocity": false,
243
+ "energy_conservation": true,
244
+ "positive_real_z0": true,
245
+ "group_delay_nonneg": true
246
+ },
247
+ "expect_all_pass": false,
248
+ "note": "A ferrite isolator. NON-RECIPROCAL BY DESIGN and entirely realizable -- the medium is not reciprocal. The reciprocity check correctly fires, and that is a true positive for the law but NOT a defect in the device. Any tool reporting this must let the user say so.",
249
+ "tags": [
250
+ "physical",
251
+ "2port",
252
+ "expected_law_failure"
253
+ ],
254
+ "sha256": "574d727015c7c3bb436bf1f9723098ac12a73e0392d3e2045a1b356c53e57f30"
255
+ }
256
+ ]
257
+ }
data/marginal_lossless.s2p ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ! marginal_lossless
2
+ ! Lossless line with sigma_max = 1 - 1e-12. Sits on the passivity boundary; a checker with a too-tight tolerance false-alarms here.
3
+ # HZ S RI R 50
4
+ 1000000000 0 0 0.995561964602 -0.0941083133184 0.995561964602 -0.0941083133184 0 0
5
+ 1619047619.05 0 0 0.988380467457 -0.152000169561 0.988380467457 -0.152000169561 0 0
6
+ 2238095238.1 0 0 0.977835471137 -0.209374763007 0.977835471137 -0.209374763007 0 0
7
+ 2857142857.14 0 0 0.963962860695 -0.266036845566 0.963962860695 -0.266036845566 0 0
8
+ 3476190476.19 0 0 0.946809845192 -0.321793593854 0.946809845192 -0.321793593854 0 0
9
+ 4095238095.24 0 0 0.926434797042 -0.376455265374 0.926434797042 -0.376455265374 0 0
10
+ 4714285714.29 0 0 0.902907053367 -0.429835844221 0.902907053367 -0.429835844221 0 0
11
+ 5333333333.33 0 0 0.876306680043 -0.481753674101 0.876306680043 -0.481753674101 0 0
12
+ 5952380952.38 0 0 0.846724199227 -0.532032076515 0.846724199227 -0.532032076515 0 0
13
+ 6571428571.43 0 0 0.814260281314 -0.580499952001 0.814260281314 -0.580499952001 0 0
14
+ 7190476190.48 0 0 0.779025402342 -0.626992362396 0.779025402342 -0.626992362396 0 0
15
+ 7809523809.52 0 0 0.741139468049 -0.671351092125 0.741139468049 -0.671351092125 0 0
16
+ 8428571428.57 0 0 0.700731405818 -0.713425186616 0.700731405818 -0.713425186616 0 0
17
+ 9047619047.62 0 0 0.657938725939 -0.753071466003 0.657938725939 -0.753071466003 0 0
18
+ 9666666666.67 0 0 0.612907053652 -0.790155012375 0.612907053652 -0.790155012375 0 0
19
+ 10285714285.7 0 0 0.565789633582 -0.824549628906 0.565789633582 -0.824549628906 0 0
20
+ 10904761904.8 0 0 0.516746808235 -0.85613826931 0.516746808235 -0.85613826931 0 0
21
+ 11523809523.8 0 0 0.465945472355 -0.884813436149 0.465945472355 -0.884813436149 0 0
22
+ 12142857142.9 0 0 0.413558504966 -0.910477546658 0.413558504966 -0.910477546658 0 0
23
+ 12761904761.9 0 0 0.359764181061 -0.933043264819 0.359764181061 -0.933043264819 0 0
24
+ 13380952381 0 0 0.304745564927 -0.952433798568 0.304745564927 -0.952433798568 0 0
25
+ 14000000000 0 0 0.248689887165 -0.968583161128 0.248689887165 -0.968583161128 0 0
26
+ 14619047619 0 0 0.19178790754 -0.981436395555 0.19178790754 -0.981436395555 0 0
27
+ 15238095238.1 0 0 0.134233265818 -0.990949761767 0.134233265818 -0.990949761767 0 0
28
+ 15857142857.1 0 0 0.0762218227988 -0.99709088539 0.0762218227988 -0.99709088539 0 0
29
+ 16476190476.2 0 0 0.0179509937981 -0.999838867928 0.0179509937981 -0.999838867928 0 0
30
+ 17095238095.2 0 0 -0.0403809231691 -0.999184357885 -0.0403809231691 -0.999184357885 0 0
31
+ 17714285714.3 0 0 -0.0985754222023 -0.995129582585 -0.0985754222023 -0.995129582585 0 0
32
+ 18333333333.3 0 0 -0.15643446504 -0.987688340594 -0.15643446504 -0.987688340594 0 0
33
+ 18952380952.4 0 0 -0.213761154992 -0.976885954764 -0.213761154992 -0.976885954764 0 0
34
+ 19571428571.4 0 0 -0.270360406986 -0.962759186054 -0.270360406986 -0.962759186054 0 0
35
+ 20190476190.5 0 0 -0.326039611452 -0.945356108439 -0.326039611452 -0.945356108439 0 0
36
+ 20809523809.5 0 0 -0.380609289778 -0.924735945301 -0.380609289778 -0.924735945301 0 0
37
+ 21428571428.6 0 0 -0.433883739117 -0.900968867902 -0.433883739117 -0.900968867902 0 0
38
+ 22047619047.6 0 0 -0.485681664337 -0.874135756576 -0.485681664337 -0.874135756576 0 0
39
+ 22666666666.7 0 0 -0.535826794978 -0.844327925501 -0.535826794978 -0.844327925501 0 0
40
+ 23285714285.7 0 0 -0.584148485111 -0.811646811945 -0.584148485111 -0.811646811945 0 0
41
+ 23904761904.8 0 0 -0.630482294044 -0.776203631076 -0.630482294044 -0.776203631076 0 0
42
+ 24523809523.8 0 0 -0.674670545931 -0.738118997487 -0.674670545931 -0.738118997487 0 0
43
+ 25142857142.9 0 0 -0.716562866343 -0.697522514745 -0.716562866343 -0.697522514745 0 0
44
+ 25761904761.9 0 0 -0.756016693998 -0.654552334343 -0.756016693998 -0.654552334343 0 0
45
+ 26380952381 0 0 -0.792897765908 -0.609354685562 -0.792897765908 -0.609354685562 0 0
46
+ 27000000000 0 0 -0.827080574274 -0.562083377852 -0.827080574274 -0.562083377852 0 0
47
+ 27619047619 0 0 -0.858448793601 -0.512899277405 -0.858448793601 -0.512899277405 0 0
48
+ 28238095238.1 0 0 -0.886895676556 -0.46196975973 -0.886895676556 -0.46196975973 0 0
49
+ 28857142857.1 0 0 -0.912324417231 -0.409468140058 -0.912324417231 -0.409468140058 0 0
50
+ 29476190476.2 0 0 -0.934648480581 -0.355573083551 -0.934648480581 -0.355573083551 0 0
51
+ 30095238095.2 0 0 -0.953791896906 -0.300467997289 -0.953791896906 -0.300467997289 0 0
52
+ 30714285714.3 0 0 -0.969689520376 -0.244340406138 -0.969689520376 -0.244340406138 0 0
53
+ 31333333333.3 0 0 -0.982287250728 -0.187381314586 -0.982287250728 -0.187381314586 0 0
54
+ 31952380952.4 0 0 -0.99154221737 -0.129784556752 -0.99154221737 -0.129784556752 0 0
55
+ 32571428571.4 0 0 -0.997422925272 -0.0717461367613 -0.997422925272 -0.0717461367613 0 0
56
+ 33190476190.5 0 0 -0.999909362144 -0.0134635617312 -0.999909362144 -0.0134635617312 0 0
57
+ 33809523809.5 0 0 -0.99899306654 0.0448648303505 -0.99899306654 0.0448648303505 0 0
58
+ 34428571428.6 0 0 -0.994677156652 0.103040545579 -0.994677156652 0.103040545579 0 0
59
+ 35047619047.6 0 0 -0.986976319697 0.160865609614 -0.986976319697 0.160865609614 0 0
60
+ 35666666666.7 0 0 -0.975916761938 0.218143241396 -0.975916761938 0.218143241396 0 0
61
+ 36285714285.7 0 0 -0.961536119503 0.274678522802 -0.961536119503 0.274678522802 0 0
62
+ 36904761904.8 0 0 -0.943883330307 0.330279061955 -0.943883330307 0.330279061955 0 0
63
+ 37523809523.8 0 0 -0.923018467514 0.384755647945 -0.923018467514 0.384755647945 0 0
64
+ 38142857142.9 0 0 -0.899012535106 0.43792289472 -0.899012535106 0.43792289472 0 0
65
+ 38761904761.9 0 0 -0.871947226253 0.489599871965 -0.871947226253 0.489599871965 0 0
66
+ 39380952381 0 0 -0.841914645308 0.53961072081 -0.841914645308 0.53961072081 0 0
67
+ 40000000000 0 0 -0.809016994374 0.587785252292 -0.809016994374 0.587785252292 0 0
data/matched_load.s2p ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ! matched_load
2
+ ! All-zero S: perfectly matched, fully absorbing. A degenerate but legal network; checkers that divide by |S| must not blow up.
3
+ # HZ S RI R 50
4
+ 1000000000 0 0 0 0 0 0 0 0
5
+ 1619047619.05 0 0 0 0 0 0 0 0
6
+ 2238095238.1 0 0 0 0 0 0 0 0
7
+ 2857142857.14 0 0 0 0 0 0 0 0
8
+ 3476190476.19 0 0 0 0 0 0 0 0
9
+ 4095238095.24 0 0 0 0 0 0 0 0
10
+ 4714285714.29 0 0 0 0 0 0 0 0
11
+ 5333333333.33 0 0 0 0 0 0 0 0
12
+ 5952380952.38 0 0 0 0 0 0 0 0
13
+ 6571428571.43 0 0 0 0 0 0 0 0
14
+ 7190476190.48 0 0 0 0 0 0 0 0
15
+ 7809523809.52 0 0 0 0 0 0 0 0
16
+ 8428571428.57 0 0 0 0 0 0 0 0
17
+ 9047619047.62 0 0 0 0 0 0 0 0
18
+ 9666666666.67 0 0 0 0 0 0 0 0
19
+ 10285714285.7 0 0 0 0 0 0 0 0
20
+ 10904761904.8 0 0 0 0 0 0 0 0
21
+ 11523809523.8 0 0 0 0 0 0 0 0
22
+ 12142857142.9 0 0 0 0 0 0 0 0
23
+ 12761904761.9 0 0 0 0 0 0 0 0
24
+ 13380952381 0 0 0 0 0 0 0 0
25
+ 14000000000 0 0 0 0 0 0 0 0
26
+ 14619047619 0 0 0 0 0 0 0 0
27
+ 15238095238.1 0 0 0 0 0 0 0 0
28
+ 15857142857.1 0 0 0 0 0 0 0 0
29
+ 16476190476.2 0 0 0 0 0 0 0 0
30
+ 17095238095.2 0 0 0 0 0 0 0 0
31
+ 17714285714.3 0 0 0 0 0 0 0 0
32
+ 18333333333.3 0 0 0 0 0 0 0 0
33
+ 18952380952.4 0 0 0 0 0 0 0 0
34
+ 19571428571.4 0 0 0 0 0 0 0 0
35
+ 20190476190.5 0 0 0 0 0 0 0 0
36
+ 20809523809.5 0 0 0 0 0 0 0 0
37
+ 21428571428.6 0 0 0 0 0 0 0 0
38
+ 22047619047.6 0 0 0 0 0 0 0 0
39
+ 22666666666.7 0 0 0 0 0 0 0 0
40
+ 23285714285.7 0 0 0 0 0 0 0 0
41
+ 23904761904.8 0 0 0 0 0 0 0 0
42
+ 24523809523.8 0 0 0 0 0 0 0 0
43
+ 25142857142.9 0 0 0 0 0 0 0 0
44
+ 25761904761.9 0 0 0 0 0 0 0 0
45
+ 26380952381 0 0 0 0 0 0 0 0
46
+ 27000000000 0 0 0 0 0 0 0 0
47
+ 27619047619 0 0 0 0 0 0 0 0
48
+ 28238095238.1 0 0 0 0 0 0 0 0
49
+ 28857142857.1 0 0 0 0 0 0 0 0
50
+ 29476190476.2 0 0 0 0 0 0 0 0
51
+ 30095238095.2 0 0 0 0 0 0 0 0
52
+ 30714285714.3 0 0 0 0 0 0 0 0
53
+ 31333333333.3 0 0 0 0 0 0 0 0
54
+ 31952380952.4 0 0 0 0 0 0 0 0
55
+ 32571428571.4 0 0 0 0 0 0 0 0
56
+ 33190476190.5 0 0 0 0 0 0 0 0
57
+ 33809523809.5 0 0 0 0 0 0 0 0
58
+ 34428571428.6 0 0 0 0 0 0 0 0
59
+ 35047619047.6 0 0 0 0 0 0 0 0
60
+ 35666666666.7 0 0 0 0 0 0 0 0
61
+ 36285714285.7 0 0 0 0 0 0 0 0
62
+ 36904761904.8 0 0 0 0 0 0 0 0
63
+ 37523809523.8 0 0 0 0 0 0 0 0
64
+ 38142857142.9 0 0 0 0 0 0 0 0
65
+ 38761904761.9 0 0 0 0 0 0 0 0
66
+ 39380952381 0 0 0 0 0 0 0 0
67
+ 40000000000 0 0 0 0 0 0 0 0
data/negative_resistance.s2p ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ! negative_resistance
2
+ ! |S11| > 1 gives Re(Z_in) < 0: negative resistance at the port. It unavoidably breaks energy conservation too -- a reflection coefficient above unity returns more power than arrives -- so this case cannot isolate a single law, and the label says so.
3
+ # HZ S RI R 50
4
+ 1000000000 -1.6 0 0.936616674299 -0.118322202306 0.936616674299 -0.118322202306 -1.6 0
5
+ 1619047619.05 -1.6 0 0.924588885489 -0.190752014312 0.924588885489 -0.190752014312 -1.6 0
6
+ 2238095238.1 -1.6 0 0.906968706207 -0.262028059748 0.906968706207 -0.262028059748 -1.6 0
7
+ 2857142857.14 -1.6 0 0.883862712386 -0.331719224327 0.883862712386 -0.331719224327 -1.6 0
8
+ 3476190476.19 -1.6 0 0.855410660994 -0.39940397994 0.855410660994 -0.39940397994 -1.6 0
9
+ 4095238095.24 -1.6 0 0.821784644713 -0.464672934275 0.821784644713 -0.464672934275 -1.6 0
10
+ 4714285714.29 -1.6 0 0.783188051034 -0.527131307031 0.783188051034 -0.527131307031 -1.6 0
11
+ 5333333333.33 -1.6 0 0.739854332063 -0.586401317753 0.739854332063 -0.586401317753 -1.6 0
12
+ 5952380952.38 -1.6 0 0.692045592483 -0.642124470846 0.692045592483 -0.642124470846 -1.6 0
13
+ 6571428571.43 -1.6 0 0.64005100421 -0.693963723939 0.64005100421 -0.693963723939 -1.6 0
14
+ 7190476190.48 -1.6 0 0.584185057333 -0.741605526491 0.584185057333 -0.741605526491 -1.6 0
15
+ 7809523809.52 -1.6 0 0.524785657914 -0.784761716307 0.524785657914 -0.784761716307 -1.6 0
16
+ 8428571428.57 -1.6 0 0.462212084157 -0.823171262492 0.462212084157 -0.823171262492 -1.6 0
17
+ 9047619047.62 -1.6 0 0.396842813311 -0.856601844299 0.396842813311 -0.856601844299 -1.6 0
18
+ 9666666666.67 -1.6 0 0.329073232443 -0.884851256327 0.329073232443 -0.884851256327 -1.6 0
19
+ 10285714285.7 -1.6 0 0.259313246934 -0.90774863156 0.259313246934 -0.90774863156 -1.6 0
20
+ 10904761904.8 -1.6 0 0.187984801156 -0.925155474863 0.187984801156 -0.925155474863 -1.6 0
21
+ 11523809523.8 -1.6 0 0.11551932634 -0.936966500669 0.11551932634 -0.936966500669 -1.6 0
22
+ 12142857142.9 -1.6 0 0.0423551310551 -0.943110269803 0.0423551310551 -0.943110269803 -1.6 0
23
+ 12761904761.9 -1.6 0 -0.0310652499088 -0.943549621579 -0.0310652499088 -0.943549621579 -1.6 0
24
+ 13380952381 -1.6 0 -0.104297732218 -0.938281898572 -0.104297732218 -0.938281898572 -1.6 0
25
+ 14000000000 -1.6 0 -0.176899368047 -0.927338962687 -0.176899368047 -0.927338962687 -1.6 0
26
+ 14619047619 -1.6 0 -0.248431025256 -0.910787002446 -0.248431025256 -0.910787002446 -1.6 0
27
+ 15238095238.1 -1.6 0 -0.318460043486 -0.88872613264 -0.318460043486 -0.88872613264 -1.6 0
28
+ 15857142857.1 -1.6 0 -0.386562851115 -0.861289788789 -0.386562851115 -0.861289788789 -1.6 0
29
+ 16476190476.2 -1.6 0 -0.452327527236 -0.828643920052 -0.452327527236 -0.828643920052 -1.6 0
30
+ 17095238095.2 -1.6 0 -0.515356293167 -0.790985985481 -0.515356293167 -0.790985985481 -1.6 0
31
+ 17714285714.3 -1.6 0 -0.575267918421 -0.748543759689 -0.575267918421 -0.748543759689 -1.6 0
32
+ 18333333333.3 -1.6 0 -0.631700026589 -0.701573955148 -0.631700026589 -0.701573955148 -1.6 0
33
+ 18952380952.4 -1.6 0 -0.684311287172 -0.650360669462 -0.684311287172 -0.650360669462 -1.6 0
34
+ 19571428571.4 -1.6 0 -0.73278348013 -0.595213666999 -0.73278348013 -0.595213666999 -1.6 0
35
+ 20190476190.5 -1.6 0 -0.776823420639 -0.536466505273 -0.776823420639 -0.536466505273 -1.6 0
36
+ 20809523809.5 -1.6 0 -0.816164732424 -0.47447451742 -0.816164732424 -0.47447451742 -1.6 0
37
+ 21428571428.6 -1.6 0 -0.850569458938 -0.409612662958 -0.850569458938 -0.409612662958 -1.6 0
38
+ 22047619047.6 -1.6 0 -0.879829502651 -0.342273259836 -0.879829502651 -0.342273259836 -1.6 0
39
+ 22666666666.7 -1.6 0 -0.903767883726 -0.272863611498 -0.903767883726 -0.272863611498 -1.6 0
40
+ 23285714285.7 -1.6 0 -0.922239810487 -0.201803543298 -0.922239810487 -0.201803543298 -1.6 0
41
+ 23904761904.8 -1.6 0 -0.935133555193 -0.12952286318 -0.935133555193 -0.12952286318 -1.6 0
42
+ 24523809523.8 -1.6 0 -0.942371129826 -0.0564587619789 -0.942371129826 -0.0564587619789 -1.6 0
43
+ 25142857142.9 -1.6 0 -0.943908757802 0.0169468309352 -0.943908757802 0.0169468309352 -1.6 0
44
+ 25761904761.9 -1.6 0 -0.939737138753 0.0902499206749 -0.939737138753 0.0902499206749 -1.6 0
45
+ 26380952381 -1.6 0 -0.929881504784 0.163007132344 -0.929881504784 0.163007132344 -1.6 0
46
+ 27000000000 -1.6 0 -0.914401467851 0.2347783928 -0.914401467851 0.2347783928 -1.6 0
47
+ 27619047619 -1.6 0 -0.893390659203 0.305129592441 -0.893390659203 0.305129592441 -1.6 0
48
+ 28238095238.1 -1.6 0 -0.866976163047 0.373635210923 -0.866976163047 0.373635210923 -1.6 0
49
+ 28857142857.1 -1.6 0 -0.835317747881 0.439880890934 -0.835317747881 0.439880890934 -1.6 0
50
+ 29476190476.2 -1.6 0 -0.798606900128 0.50346594443 -0.798606900128 0.50346594443 -1.6 0
51
+ 30095238095.2 -1.6 0 -0.757065665932 0.564005776213 -0.757065665932 0.564005776213 -1.6 0
52
+ 30714285714.3 -1.6 0 -0.710945308101 0.621134210153 -0.710945308101 0.621134210153 -1.6 0
53
+ 31333333333.3 -1.6 0 -0.66052478635 0.674505704016 -0.66052478635 0.674505704016 -1.6 0
54
+ 31952380952.4 -1.6 0 -0.60610907 0.72379743948 -0.60610907 0.72379743948 -1.6 0
55
+ 32571428571.4 -1.6 0 -0.548027293371 0.768711274702 -0.548027293371 0.768711274702 -1.6 0
56
+ 33190476190.5 -1.6 0 -0.486630765004 0.808975547643 -0.486630765004 0.808975547643 -1.6 0
57
+ 33809523809.5 -1.6 0 -0.422290842773 0.844346719212 -0.422290842773 0.844346719212 -1.6 0
58
+ 34428571428.6 -1.6 0 -0.355396687712 0.874610846318 -0.355396687712 0.874610846318 -1.6 0
59
+ 35047619047.6 -1.6 0 -0.286352910174 0.899584875912 -0.286352910174 0.899584875912 -1.6 0
60
+ 35666666666.7 -1.6 0 -0.215577122537 0.91911775218 -0.215577122537 0.91911775218 -1.6 0
61
+ 36285714285.7 -1.6 0 -0.143497413272 0.933091330213 -0.143497413272 0.933091330213 -1.6 0
62
+ 36904761904.8 -1.6 0 -0.0705497576361 0.941421090603 -0.0705497576361 0.941421090603 -1.6 0
63
+ 37523809523.8 -1.6 0 0.0028246193223 0.944056650662 0.0028246193223 0.944056650662 -1.6 0
64
+ 38142857142.9 -1.6 0 0.0761819115262 0.940982069165 0.0761819115262 0.940982069165 -1.6 0
65
+ 38761904761.9 -1.6 0 0.149078416235 0.932215942766 0.149078416235 0.932215942766 -1.6 0
66
+ 39380952381 -1.6 0 0.22107321779 0.917811293518 0.22107321779 0.917811293518 -1.6 0
67
+ 40000000000 -1.6 0 0.291730854497 0.897855248171 0.291730854497 0.897855248171 -1.6 0
data/noncausal_advance.s2p ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ! noncausal_advance
2
+ ! Phase advances with frequency: the output precedes the input. Passive and reciprocal, so ONLY the causality check should fire.
3
+ # HZ S RI R 50
4
+ 1000000000 0.05 0 0.936616674299 0.118322202306 0.936616674299 0.118322202306 0.05 0
5
+ 1619047619.05 0.05 0 0.924588885489 0.190752014312 0.924588885489 0.190752014312 0.05 0
6
+ 2238095238.1 0.05 0 0.906968706207 0.262028059748 0.906968706207 0.262028059748 0.05 0
7
+ 2857142857.14 0.05 0 0.883862712386 0.331719224327 0.883862712386 0.331719224327 0.05 0
8
+ 3476190476.19 0.05 0 0.855410660994 0.39940397994 0.855410660994 0.39940397994 0.05 0
9
+ 4095238095.24 0.05 0 0.821784644713 0.464672934275 0.821784644713 0.464672934275 0.05 0
10
+ 4714285714.29 0.05 0 0.783188051034 0.527131307031 0.783188051034 0.527131307031 0.05 0
11
+ 5333333333.33 0.05 0 0.739854332063 0.586401317753 0.739854332063 0.586401317753 0.05 0
12
+ 5952380952.38 0.05 0 0.692045592483 0.642124470846 0.692045592483 0.642124470846 0.05 0
13
+ 6571428571.43 0.05 0 0.64005100421 0.693963723939 0.64005100421 0.693963723939 0.05 0
14
+ 7190476190.48 0.05 0 0.584185057333 0.741605526491 0.584185057333 0.741605526491 0.05 0
15
+ 7809523809.52 0.05 0 0.524785657914 0.784761716307 0.524785657914 0.784761716307 0.05 0
16
+ 8428571428.57 0.05 0 0.462212084157 0.823171262492 0.462212084157 0.823171262492 0.05 0
17
+ 9047619047.62 0.05 0 0.396842813311 0.856601844299 0.396842813311 0.856601844299 0.05 0
18
+ 9666666666.67 0.05 0 0.329073232443 0.884851256327 0.329073232443 0.884851256327 0.05 0
19
+ 10285714285.7 0.05 0 0.259313246934 0.90774863156 0.259313246934 0.90774863156 0.05 0
20
+ 10904761904.8 0.05 0 0.187984801156 0.925155474863 0.187984801156 0.925155474863 0.05 0
21
+ 11523809523.8 0.05 0 0.11551932634 0.936966500669 0.11551932634 0.936966500669 0.05 0
22
+ 12142857142.9 0.05 0 0.0423551310551 0.943110269803 0.0423551310551 0.943110269803 0.05 0
23
+ 12761904761.9 0.05 0 -0.0310652499088 0.943549621579 -0.0310652499088 0.943549621579 0.05 0
24
+ 13380952381 0.05 0 -0.104297732218 0.938281898572 -0.104297732218 0.938281898572 0.05 0
25
+ 14000000000 0.05 0 -0.176899368047 0.927338962687 -0.176899368047 0.927338962687 0.05 0
26
+ 14619047619 0.05 0 -0.248431025256 0.910787002446 -0.248431025256 0.910787002446 0.05 0
27
+ 15238095238.1 0.05 0 -0.318460043486 0.88872613264 -0.318460043486 0.88872613264 0.05 0
28
+ 15857142857.1 0.05 0 -0.386562851115 0.861289788789 -0.386562851115 0.861289788789 0.05 0
29
+ 16476190476.2 0.05 0 -0.452327527236 0.828643920052 -0.452327527236 0.828643920052 0.05 0
30
+ 17095238095.2 0.05 0 -0.515356293167 0.790985985481 -0.515356293167 0.790985985481 0.05 0
31
+ 17714285714.3 0.05 0 -0.575267918421 0.748543759689 -0.575267918421 0.748543759689 0.05 0
32
+ 18333333333.3 0.05 0 -0.631700026589 0.701573955148 -0.631700026589 0.701573955148 0.05 0
33
+ 18952380952.4 0.05 0 -0.684311287172 0.650360669462 -0.684311287172 0.650360669462 0.05 0
34
+ 19571428571.4 0.05 0 -0.73278348013 0.595213666999 -0.73278348013 0.595213666999 0.05 0
35
+ 20190476190.5 0.05 0 -0.776823420639 0.536466505273 -0.776823420639 0.536466505273 0.05 0
36
+ 20809523809.5 0.05 0 -0.816164732424 0.47447451742 -0.816164732424 0.47447451742 0.05 0
37
+ 21428571428.6 0.05 0 -0.850569458938 0.409612662958 -0.850569458938 0.409612662958 0.05 0
38
+ 22047619047.6 0.05 0 -0.879829502651 0.342273259836 -0.879829502651 0.342273259836 0.05 0
39
+ 22666666666.7 0.05 0 -0.903767883726 0.272863611498 -0.903767883726 0.272863611498 0.05 0
40
+ 23285714285.7 0.05 0 -0.922239810487 0.201803543298 -0.922239810487 0.201803543298 0.05 0
41
+ 23904761904.8 0.05 0 -0.935133555193 0.12952286318 -0.935133555193 0.12952286318 0.05 0
42
+ 24523809523.8 0.05 0 -0.942371129826 0.0564587619789 -0.942371129826 0.0564587619789 0.05 0
43
+ 25142857142.9 0.05 0 -0.943908757802 -0.0169468309352 -0.943908757802 -0.0169468309352 0.05 0
44
+ 25761904761.9 0.05 0 -0.939737138753 -0.0902499206749 -0.939737138753 -0.0902499206749 0.05 0
45
+ 26380952381 0.05 0 -0.929881504784 -0.163007132344 -0.929881504784 -0.163007132344 0.05 0
46
+ 27000000000 0.05 0 -0.914401467851 -0.2347783928 -0.914401467851 -0.2347783928 0.05 0
47
+ 27619047619 0.05 0 -0.893390659203 -0.305129592441 -0.893390659203 -0.305129592441 0.05 0
48
+ 28238095238.1 0.05 0 -0.866976163047 -0.373635210923 -0.866976163047 -0.373635210923 0.05 0
49
+ 28857142857.1 0.05 0 -0.835317747881 -0.439880890934 -0.835317747881 -0.439880890934 0.05 0
50
+ 29476190476.2 0.05 0 -0.798606900128 -0.50346594443 -0.798606900128 -0.50346594443 0.05 0
51
+ 30095238095.2 0.05 0 -0.757065665932 -0.564005776213 -0.757065665932 -0.564005776213 0.05 0
52
+ 30714285714.3 0.05 0 -0.710945308101 -0.621134210153 -0.710945308101 -0.621134210153 0.05 0
53
+ 31333333333.3 0.05 0 -0.66052478635 -0.674505704016 -0.66052478635 -0.674505704016 0.05 0
54
+ 31952380952.4 0.05 0 -0.60610907 -0.72379743948 -0.60610907 -0.72379743948 0.05 0
55
+ 32571428571.4 0.05 0 -0.548027293371 -0.768711274702 -0.548027293371 -0.768711274702 0.05 0
56
+ 33190476190.5 0.05 0 -0.486630765004 -0.808975547643 -0.486630765004 -0.808975547643 0.05 0
57
+ 33809523809.5 0.05 0 -0.422290842773 -0.844346719212 -0.422290842773 -0.844346719212 0.05 0
58
+ 34428571428.6 0.05 0 -0.355396687712 -0.874610846318 -0.355396687712 -0.874610846318 0.05 0
59
+ 35047619047.6 0.05 0 -0.286352910174 -0.899584875912 -0.286352910174 -0.899584875912 0.05 0
60
+ 35666666666.7 0.05 0 -0.215577122537 -0.91911775218 -0.215577122537 -0.91911775218 0.05 0
61
+ 36285714285.7 0.05 0 -0.143497413272 -0.933091330213 -0.143497413272 -0.933091330213 0.05 0
62
+ 36904761904.8 0.05 0 -0.0705497576361 -0.941421090603 -0.0705497576361 -0.941421090603 0.05 0
63
+ 37523809523.8 0.05 0 0.0028246193223 -0.944056650662 0.0028246193223 -0.944056650662 0.05 0
64
+ 38142857142.9 0.05 0 0.0761819115262 -0.940982069165 0.0761819115262 -0.940982069165 0.05 0
65
+ 38761904761.9 0.05 0 0.149078416235 -0.932215942766 0.149078416235 -0.932215942766 0.05 0
66
+ 39380952381 0.05 0 0.22107321779 -0.917811293518 0.22107321779 -0.917811293518 0.05 0
67
+ 40000000000 0.05 0 0.291730854497 -0.897855248171 0.291730854497 -0.897855248171 0.05 0
data/passive_4port.s4p ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ! passive_4port
2
+ ! Four-port with two independent thru paths. Exercises N>2 handling.
3
+ # HZ S RI R 50
4
+ 1000000000 0 0 0.897443010235 -0.0677941249751 0 0 0 0 0.897443010235 -0.0677941249751 0 0 0 0 0 0 0 0 0 0 0 0 0.897443010235 -0.0677941249751 0 0 0 0 0.897443010235 -0.0677941249751 0 0
5
+ 1619047619.05 0 0 0.893302471001 -0.109593317785 0 0 0 0 0.893302471001 -0.109593317785 0 0 0 0 0 0 0 0 0 0 0 0 0.893302471001 -0.109593317785 0 0 0 0 0.893302471001 -0.109593317785 0 0
6
+ 2238095238.1 0 0 0.887216168355 -0.151153797869 0 0 0 0 0.887216168355 -0.151153797869 0 0 0 0 0 0 0 0 0 0 0 0 0.887216168355 -0.151153797869 0 0 0 0 0.887216168355 -0.151153797869 0 0
7
+ 2857142857.14 0 0 0.879197359288 -0.192385039493 0 0 0 0 0.879197359288 -0.192385039493 0 0 0 0 0 0 0 0 0 0 0 0 0.879197359288 -0.192385039493 0 0 0 0 0.879197359288 -0.192385039493 0 0
8
+ 3476190476.19 0 0 0.86926351012 -0.23319723406 0 0 0 0 0.86926351012 -0.23319723406 0 0 0 0 0 0 0 0 0 0 0 0 0.86926351012 -0.23319723406 0 0 0 0 0.86926351012 -0.23319723406 0 0
9
+ 4095238095.24 0 0 0.857436258449 -0.27350148573 0 0 0 0 0.857436258449 -0.27350148573 0 0 0 0 0 0 0 0 0 0 0 0 0.857436258449 -0.27350148573 0 0 0 0 0.857436258449 -0.27350148573 0 0
10
+ 4714285714.29 0 0 0.843741366024 -0.313210005044 0 0 0 0 0.843741366024 -0.313210005044 0 0 0 0 0 0 0 0 0 0 0 0 0.843741366024 -0.313210005044 0 0 0 0 0.843741366024 -0.313210005044 0 0
11
+ 5333333333.33 0 0 0.828208662629 -0.352236300153 0 0 0 0 0.828208662629 -0.352236300153 0 0 0 0 0 0 0 0 0 0 0 0 0.828208662629 -0.352236300153 0 0 0 0 0.828208662629 -0.352236300153 0 0
12
+ 5952380952.38 0 0 0.810871981112 -0.390495365206 0 0 0 0 0.810871981112 -0.390495365206 0 0 0 0 0 0 0 0 0 0 0 0 0.810871981112 -0.390495365206 0 0 0 0 0.810871981112 -0.390495365206 0 0
13
+ 6571428571.43 0 0 0.791769083688 -0.427903865506 0 0 0 0 0.791769083688 -0.427903865506 0 0 0 0 0 0 0 0 0 0 0 0 0.791769083688 -0.427903865506 0 0 0 0 0.791769083688 -0.427903865506 0 0
14
+ 7190476190.48 0 0 0.77094157969 -0.464380319033 0 0 0 0 0.77094157969 -0.464380319033 0 0 0 0 0 0 0 0 0 0 0 0 0.77094157969 -0.464380319033 0 0 0 0 0.77094157969 -0.464380319033 0 0
15
+ 7809523809.52 0 0 0.748434834932 -0.49984527392 0 0 0 0 0.748434834932 -0.49984527392 0 0 0 0 0 0 0 0 0 0 0 0 0.748434834932 -0.49984527392 0 0 0 0 0.748434834932 -0.49984527392 0 0
16
+ 8428571428.57 0 0 0.724297872901 -0.534221481514 0 0 0 0 0.724297872901 -0.534221481514 0 0 0 0 0 0 0 0 0 0 0 0 0.724297872901 -0.534221481514 0 0 0 0 0.724297872901 -0.534221481514 0 0
17
+ 9047619047.62 0 0 0.698583267969 -0.56743406464 0 0 0 0 0.698583267969 -0.56743406464 0 0 0 0 0 0 0 0 0 0 0 0 0.698583267969 -0.56743406464 0 0 0 0 0.698583267969 -0.56743406464 0 0
18
+ 9666666666.67 0 0 0.671347030882 -0.599410680691 0 0 0 0 0.671347030882 -0.599410680691 0 0 0 0 0 0 0 0 0 0 0 0 0.671347030882 -0.599410680691 0 0 0 0 0.671347030882 -0.599410680691 0 0
19
+ 10285714285.7 0 0 0.642648486757 -0.630081679204 0 0 0 0 0.642648486757 -0.630081679204 0 0 0 0 0 0 0 0 0 0 0 0 0.642648486757 -0.630081679204 0 0 0 0 0.642648486757 -0.630081679204 0 0
20
+ 10904761904.8 0 0 0.612550145863 -0.659380253574 0 0 0 0 0.612550145863 -0.659380253574 0 0 0 0 0 0 0 0 0 0 0 0 0.612550145863 -0.659380253574 0 0 0 0 0.612550145863 -0.659380253574 0 0
21
+ 11523809523.8 0 0 0.58111756746 -0.687242586565 0 0 0 0 0.58111756746 -0.687242586565 0 0 0 0 0 0 0 0 0 0 0 0 0.58111756746 -0.687242586565 0 0 0 0 0.58111756746 -0.687242586565 0 0
22
+ 12142857142.9 0 0 0.548419217007 -0.713607989318 0 0 0 0 0.548419217007 -0.713607989318 0 0 0 0 0 0 0 0 0 0 0 0 0.548419217007 -0.713607989318 0 0 0 0 0.548419217007 -0.713607989318 0 0
23
+ 12761904761.9 0 0 0.514526317022 -0.738419033539 0 0 0 0 0.514526317022 -0.738419033539 0 0 0 0 0 0 0 0 0 0 0 0 0.514526317022 -0.738419033539 0 0 0 0 0.514526317022 -0.738419033539 0 0
24
+ 13380952381 0 0 0.479512691958 -0.76162167659 0 0 0 0 0.479512691958 -0.76162167659 0 0 0 0 0 0 0 0 0 0 0 0 0.479512691958 -0.76162167659 0 0 0 0 0.479512691958 -0.76162167659 0 0
25
+ 14000000000 0 0 0.443454607393 -0.783165379203 0 0 0 0 0.443454607393 -0.783165379203 0 0 0 0 0 0 0 0 0 0 0 0 0.443454607393 -0.783165379203 0 0 0 0 0.443454607393 -0.783165379203 0 0
26
+ 14619047619 0 0 0.406430603918 -0.80300321556 0 0 0 0 0.406430603918 -0.80300321556 0 0 0 0 0 0 0 0 0 0 0 0 0.406430603918 -0.80300321556 0 0 0 0 0.406430603918 -0.80300321556 0 0
27
+ 15238095238.1 0 0 0.368521326053 -0.821091975508 0 0 0 0 0.368521326053 -0.821091975508 0 0 0 0 0 0 0 0 0 0 0 0 0.368521326053 -0.821091975508 0 0 0 0 0.368521326053 -0.821091975508 0 0
28
+ 15857142857.1 0 0 0.329809346599 -0.837392258679 0 0 0 0 0.329809346599 -0.837392258679 0 0 0 0 0 0 0 0 0 0 0 0 0.329809346599 -0.837392258679 0 0 0 0 0.329809346599 -0.837392258679 0 0
29
+ 16476190476.2 0 0 0.290378986775 -0.851868560307 0 0 0 0 0.290378986775 -0.851868560307 0 0 0 0 0 0 0 0 0 0 0 0 0.290378986775 -0.851868560307 0 0 0 0 0.290378986775 -0.851868560307 0 0
30
+ 17095238095.2 0 0 0.250316132552 -0.864489348566 0 0 0 0 0.250316132552 -0.864489348566 0 0 0 0 0 0 0 0 0 0 0 0 0.250316132552 -0.864489348566 0 0 0 0 0.250316132552 -0.864489348566 0 0
31
+ 17714285714.3 0 0 0.209708047584 -0.875227133251 0 0 0 0 0.209708047584 -0.875227133251 0 0 0 0 0 0 0 0 0 0 0 0 0.209708047584 -0.875227133251 0 0 0 0 0.209708047584 -0.875227133251 0 0
32
+ 18333333333.3 0 0 0.168643183127 -0.884058525656 0 0 0 0 0.168643183127 -0.884058525656 0 0 0 0 0 0 0 0 0 0 0 0 0.168643183127 -0.884058525656 0 0 0 0 0.168643183127 -0.884058525656 0 0
33
+ 18952380952.4 0 0 0.12721098538 -0.890964289519 0 0 0 0 0.12721098538 -0.890964289519 0 0 0 0 0 0 0 0 0 0 0 0 0.12721098538 -0.890964289519 0 0 0 0 0.12721098538 -0.890964289519 0 0
34
+ 19571428571.4 0 0 0.0855017006558 -0.895929382923 0 0 0 0 0.0855017006558 -0.895929382923 0 0 0 0 0 0 0 0 0 0 0 0 0.0855017006558 -0.895929382923 0 0 0 0 0.0855017006558 -0.895929382923 0 0
35
+ 20190476190.5 0 0 0.0436061788102 -0.898942991056 0 0 0 0 0.0436061788102 -0.898942991056 0 0 0 0 0 0 0 0 0 0 0 0 0.0436061788102 -0.898942991056 0 0 0 0 0.0436061788102 -0.898942991056 0 0
36
+ 20809523809.5 0 0 0.00161567535403 -0.899998549773 0 0 0 0 0.00161567535403 -0.899998549773 0 0 0 0 0 0 0 0 0 0 0 0 0.00161567535403 -0.899998549773 0 0 0 0 0.00161567535403 -0.899998549773 0 0
37
+ 21428571428.6 0 0 -0.0403783473155 -0.899093759887 0 0 0 0 -0.0403783473155 -0.899093759887 0 0 0 0 0 0 0 0 0 0 0 0 -0.0403783473155 -0.899093759887 0 0 0 0 -0.0403783473155 -0.899093759887 0 0
38
+ 22047619047.6 0 0 -0.0822844191358 -0.896230592185 0 0 0 0 -0.0822844191358 -0.896230592185 0 0 0 0 0 0 0 0 0 0 0 0 -0.0822844191358 -0.896230592185 0 0 0 0 -0.0822844191358 -0.896230592185 0 0
39
+ 22666666666.7 0 0 -0.124011261616 -0.891415283127 0 0 0 0 -0.124011261616 -0.891415283127 0 0 0 0 0 0 0 0 0 0 0 0 -0.124011261616 -0.891415283127 0 0 0 0 -0.124011261616 -0.891415283127 0 0
40
+ 23285714285.7 0 0 -0.165467986658 -0.88465832127 0 0 0 0 -0.165467986658 -0.88465832127 0 0 0 0 0 0 0 0 0 0 0 0 -0.165467986658 -0.88465832127 0 0 0 0 -0.165467986658 -0.88465832127 0 0
41
+ 23904761904.8 0 0 -0.206564294522 -0.875974424415 0 0 0 0 -0.206564294522 -0.875974424415 0 0 0 0 0 0 0 0 0 0 0 0 -0.206564294522 -0.875974424415 0 0 0 0 -0.206564294522 -0.875974424415 0 0
42
+ 24523809523.8 0 0 -0.247210670522 -0.865382507554 0 0 0 0 -0.247210670522 -0.865382507554 0 0 0 0 0 0 0 0 0 0 0 0 -0.247210670522 -0.865382507554 0 0 0 0 -0.247210670522 -0.865382507554 0 0
43
+ 25142857142.9 0 0 -0.287318579996 -0.852905641668 0 0 0 0 -0.287318579996 -0.852905641668 0 0 0 0 0 0 0 0 0 0 0 0 -0.287318579996 -0.852905641668 0 0 0 0 -0.287318579996 -0.852905641668 0 0
44
+ 25761904761.9 0 0 -0.326800661154 -0.838571003475 0 0 0 0 -0.326800661154 -0.838571003475 0 0 0 0 0 0 0 0 0 0 0 0 -0.326800661154 -0.838571003475 0 0 0 0 -0.326800661154 -0.838571003475 0 0
45
+ 26380952381 0 0 -0.365570915366 -0.822409816234 0 0 0 0 -0.365570915366 -0.822409816234 0 0 0 0 0 0 0 0 0 0 0 0 -0.365570915366 -0.822409816234 0 0 0 0 -0.365570915366 -0.822409816234 0 0
46
+ 27000000000 0 0 -0.403544894481 -0.804457281736 0 0 0 0 -0.403544894481 -0.804457281736 0 0 0 0 0 0 0 0 0 0 0 0 -0.403544894481 -0.804457281736 0 0 0 0 -0.403544894481 -0.804457281736 0 0
47
+ 27619047619 0 0 -0.440639884769 -0.784752503628 0 0 0 0 -0.440639884769 -0.784752503628 0 0 0 0 0 0 0 0 0 0 0 0 -0.440639884769 -0.784752503628 0 0 0 0 -0.440639884769 -0.784752503628 0 0
48
+ 28238095238.1 0 0 -0.476775087085 -0.763338402241 0 0 0 0 -0.476775087085 -0.763338402241 0 0 0 0 0 0 0 0 0 0 0 0 -0.476775087085 -0.763338402241 0 0 0 0 -0.476775087085 -0.763338402241 0 0
49
+ 28857142857.1 0 0 -0.511871792866 -0.740261621096 0 0 0 0 -0.511871792866 -0.740261621096 0 0 0 0 0 0 0 0 0 0 0 0 -0.511871792866 -0.740261621096 0 0 0 0 -0.511871792866 -0.740261621096 0 0
50
+ 29476190476.2 0 0 -0.54585355557 -0.715572425316 0 0 0 0 -0.54585355557 -0.715572425316 0 0 0 0 0 0 0 0 0 0 0 0 -0.54585355557 -0.715572425316 0 0 0 0 -0.54585355557 -0.715572425316 0 0
51
+ 30095238095.2 0 0 -0.578646357185 -0.689324592131 0 0 0 0 -0.578646357185 -0.689324592131 0 0 0 0 0 0 0 0 0 0 0 0 -0.578646357185 -0.689324592131 0 0 0 0 -0.578646357185 -0.689324592131 0 0
52
+ 30714285714.3 0 0 -0.610178769462 -0.661575293748 0 0 0 0 -0.610178769462 -0.661575293748 0 0 0 0 0 0 0 0 0 0 0 0 -0.610178769462 -0.661575293748 0 0 0 0 -0.610178769462 -0.661575293748 0 0
53
+ 31333333333.3 0 0 -0.640382109488 -0.632384972819 0 0 0 0 -0.640382109488 -0.632384972819 0 0 0 0 0 0 0 0 0 0 0 0 -0.640382109488 -0.632384972819 0 0 0 0 -0.640382109488 -0.632384972819 0 0
54
+ 31952380952.4 0 0 -0.669190589297 -0.601817210784 0 0 0 0 -0.669190589297 -0.601817210784 0 0 0 0 0 0 0 0 0 0 0 0 -0.669190589297 -0.601817210784 0 0 0 0 -0.669190589297 -0.601817210784 0 0
55
+ 32571428571.4 0 0 -0.696541459161 -0.569938589384 0 0 0 0 -0.696541459161 -0.569938589384 0 0 0 0 0 0 0 0 0 0 0 0 -0.696541459161 -0.569938589384 0 0 0 0 -0.696541459161 -0.569938589384 0 0
56
+ 33190476190.5 0 0 -0.722375144275 -0.536818545632 0 0 0 0 -0.722375144275 -0.536818545632 0 0 0 0 0 0 0 0 0 0 0 0 -0.722375144275 -0.536818545632 0 0 0 0 -0.722375144275 -0.536818545632 0 0
57
+ 33809523809.5 0 0 -0.746635374515 -0.502529220567 0 0 0 0 -0.746635374515 -0.502529220567 0 0 0 0 0 0 0 0 0 0 0 0 -0.746635374515 -0.502529220567 0 0 0 0 -0.746635374515 -0.502529220567 0 0
58
+ 34428571428.6 0 0 -0.769269307009 -0.467145302121 0 0 0 0 -0.769269307009 -0.467145302121 0 0 0 0 0 0 0 0 0 0 0 0 -0.769269307009 -0.467145302121 0 0 0 0 -0.769269307009 -0.467145302121 0 0
59
+ 35047619047.6 0 0 -0.790227641236 -0.430743862436 0 0 0 0 -0.790227641236 -0.430743862436 0 0 0 0 0 0 0 0 0 0 0 0 -0.790227641236 -0.430743862436 0 0 0 0 -0.790227641236 -0.430743862436 0 0
60
+ 35666666666.7 0 0 -0.80946472641 -0.393404189986 0 0 0 0 -0.80946472641 -0.393404189986 0 0 0 0 0 0 0 0 0 0 0 0 -0.80946472641 -0.393404189986 0 0 0 0 -0.80946472641 -0.393404189986 0 0
61
+ 36285714285.7 0 0 -0.826938660915 -0.355207616872 0 0 0 0 -0.826938660915 -0.355207616872 0 0 0 0 0 0 0 0 0 0 0 0 -0.826938660915 -0.355207616872 0 0 0 0 -0.826938660915 -0.355207616872 0 0
62
+ 36904761904.8 0 0 -0.842611383576 -0.316237341673 0 0 0 0 -0.842611383576 -0.316237341673 0 0 0 0 0 0 0 0 0 0 0 0 -0.842611383576 -0.316237341673 0 0 0 0 -0.842611383576 -0.316237341673 0 0
63
+ 37523809523.8 0 0 -0.856448756559 -0.276578248219 0 0 0 0 -0.856448756559 -0.276578248219 0 0 0 0 0 0 0 0 0 0 0 0 -0.856448756559 -0.276578248219 0 0 0 0 -0.856448756559 -0.276578248219 0 0
64
+ 38142857142.9 0 0 -0.868420639734 -0.236316720703 0 0 0 0 -0.868420639734 -0.236316720703 0 0 0 0 0 0 0 0 0 0 0 0 -0.868420639734 -0.236316720703 0 0 0 0 -0.868420639734 -0.236316720703 0 0
65
+ 38761904761.9 0 0 -0.87850095632 -0.19554045552 0 0 0 0 -0.87850095632 -0.19554045552 0 0 0 0 0 0 0 0 0 0 0 0 -0.87850095632 -0.19554045552 0 0 0 0 -0.87850095632 -0.19554045552 0 0
66
+ 39380952381 0 0 -0.886667749687 -0.154338270253 0 0 0 0 -0.886667749687 -0.154338270253 0 0 0 0 0 0 0 0 0 0 0 0 -0.886667749687 -0.154338270253 0 0 0 0 -0.886667749687 -0.154338270253 0 0
67
+ 40000000000 0 0 -0.892903231183 -0.112799910208 0 0 0 0 -0.892903231183 -0.112799910208 0 0 0 0 0 0 0 0 0 0 0 0 -0.892903231183 -0.112799910208 0 0 0 0 -0.892903231183 -0.112799910208 0 0
data/passive_attenuator.s2p ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ! passive_attenuator
2
+ ! Ideal 10 dB matched attenuator.
3
+ # HZ S RI R 50
4
+ 1000000000 0 0 0.316227766017 0 0.316227766017 0 0 0
5
+ 1619047619.05 0 0 0.316227766017 0 0.316227766017 0 0 0
6
+ 2238095238.1 0 0 0.316227766017 0 0.316227766017 0 0 0
7
+ 2857142857.14 0 0 0.316227766017 0 0.316227766017 0 0 0
8
+ 3476190476.19 0 0 0.316227766017 0 0.316227766017 0 0 0
9
+ 4095238095.24 0 0 0.316227766017 0 0.316227766017 0 0 0
10
+ 4714285714.29 0 0 0.316227766017 0 0.316227766017 0 0 0
11
+ 5333333333.33 0 0 0.316227766017 0 0.316227766017 0 0 0
12
+ 5952380952.38 0 0 0.316227766017 0 0.316227766017 0 0 0
13
+ 6571428571.43 0 0 0.316227766017 0 0.316227766017 0 0 0
14
+ 7190476190.48 0 0 0.316227766017 0 0.316227766017 0 0 0
15
+ 7809523809.52 0 0 0.316227766017 0 0.316227766017 0 0 0
16
+ 8428571428.57 0 0 0.316227766017 0 0.316227766017 0 0 0
17
+ 9047619047.62 0 0 0.316227766017 0 0.316227766017 0 0 0
18
+ 9666666666.67 0 0 0.316227766017 0 0.316227766017 0 0 0
19
+ 10285714285.7 0 0 0.316227766017 0 0.316227766017 0 0 0
20
+ 10904761904.8 0 0 0.316227766017 0 0.316227766017 0 0 0
21
+ 11523809523.8 0 0 0.316227766017 0 0.316227766017 0 0 0
22
+ 12142857142.9 0 0 0.316227766017 0 0.316227766017 0 0 0
23
+ 12761904761.9 0 0 0.316227766017 0 0.316227766017 0 0 0
24
+ 13380952381 0 0 0.316227766017 0 0.316227766017 0 0 0
25
+ 14000000000 0 0 0.316227766017 0 0.316227766017 0 0 0
26
+ 14619047619 0 0 0.316227766017 0 0.316227766017 0 0 0
27
+ 15238095238.1 0 0 0.316227766017 0 0.316227766017 0 0 0
28
+ 15857142857.1 0 0 0.316227766017 0 0.316227766017 0 0 0
29
+ 16476190476.2 0 0 0.316227766017 0 0.316227766017 0 0 0
30
+ 17095238095.2 0 0 0.316227766017 0 0.316227766017 0 0 0
31
+ 17714285714.3 0 0 0.316227766017 0 0.316227766017 0 0 0
32
+ 18333333333.3 0 0 0.316227766017 0 0.316227766017 0 0 0
33
+ 18952380952.4 0 0 0.316227766017 0 0.316227766017 0 0 0
34
+ 19571428571.4 0 0 0.316227766017 0 0.316227766017 0 0 0
35
+ 20190476190.5 0 0 0.316227766017 0 0.316227766017 0 0 0
36
+ 20809523809.5 0 0 0.316227766017 0 0.316227766017 0 0 0
37
+ 21428571428.6 0 0 0.316227766017 0 0.316227766017 0 0 0
38
+ 22047619047.6 0 0 0.316227766017 0 0.316227766017 0 0 0
39
+ 22666666666.7 0 0 0.316227766017 0 0.316227766017 0 0 0
40
+ 23285714285.7 0 0 0.316227766017 0 0.316227766017 0 0 0
41
+ 23904761904.8 0 0 0.316227766017 0 0.316227766017 0 0 0
42
+ 24523809523.8 0 0 0.316227766017 0 0.316227766017 0 0 0
43
+ 25142857142.9 0 0 0.316227766017 0 0.316227766017 0 0 0
44
+ 25761904761.9 0 0 0.316227766017 0 0.316227766017 0 0 0
45
+ 26380952381 0 0 0.316227766017 0 0.316227766017 0 0 0
46
+ 27000000000 0 0 0.316227766017 0 0.316227766017 0 0 0
47
+ 27619047619 0 0 0.316227766017 0 0.316227766017 0 0 0
48
+ 28238095238.1 0 0 0.316227766017 0 0.316227766017 0 0 0
49
+ 28857142857.1 0 0 0.316227766017 0 0.316227766017 0 0 0
50
+ 29476190476.2 0 0 0.316227766017 0 0.316227766017 0 0 0
51
+ 30095238095.2 0 0 0.316227766017 0 0.316227766017 0 0 0
52
+ 30714285714.3 0 0 0.316227766017 0 0.316227766017 0 0 0
53
+ 31333333333.3 0 0 0.316227766017 0 0.316227766017 0 0 0
54
+ 31952380952.4 0 0 0.316227766017 0 0.316227766017 0 0 0
55
+ 32571428571.4 0 0 0.316227766017 0 0.316227766017 0 0 0
56
+ 33190476190.5 0 0 0.316227766017 0 0.316227766017 0 0 0
57
+ 33809523809.5 0 0 0.316227766017 0 0.316227766017 0 0 0
58
+ 34428571428.6 0 0 0.316227766017 0 0.316227766017 0 0 0
59
+ 35047619047.6 0 0 0.316227766017 0 0.316227766017 0 0 0
60
+ 35666666666.7 0 0 0.316227766017 0 0.316227766017 0 0 0
61
+ 36285714285.7 0 0 0.316227766017 0 0.316227766017 0 0 0
62
+ 36904761904.8 0 0 0.316227766017 0 0.316227766017 0 0 0
63
+ 37523809523.8 0 0 0.316227766017 0 0.316227766017 0 0 0
64
+ 38142857142.9 0 0 0.316227766017 0 0.316227766017 0 0 0
65
+ 38761904761.9 0 0 0.316227766017 0 0.316227766017 0 0 0
66
+ 39380952381 0 0 0.316227766017 0 0.316227766017 0 0 0
67
+ 40000000000 0 0 0.316227766017 0 0.316227766017 0 0 0
data/passive_line.s2p ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ! passive_line
2
+ ! Lossy 20 ps delay line, 0.5 dB insertion loss. The baseline sane case.
3
+ # HZ S RI R 50
4
+ 1000000000 0.05 0 0.936616674299 -0.118322202306 0.936616674299 -0.118322202306 0.05 0
5
+ 1619047619.05 0.05 0 0.924588885489 -0.190752014312 0.924588885489 -0.190752014312 0.05 0
6
+ 2238095238.1 0.05 0 0.906968706207 -0.262028059748 0.906968706207 -0.262028059748 0.05 0
7
+ 2857142857.14 0.05 0 0.883862712386 -0.331719224327 0.883862712386 -0.331719224327 0.05 0
8
+ 3476190476.19 0.05 0 0.855410660994 -0.39940397994 0.855410660994 -0.39940397994 0.05 0
9
+ 4095238095.24 0.05 0 0.821784644713 -0.464672934275 0.821784644713 -0.464672934275 0.05 0
10
+ 4714285714.29 0.05 0 0.783188051034 -0.527131307031 0.783188051034 -0.527131307031 0.05 0
11
+ 5333333333.33 0.05 0 0.739854332063 -0.586401317753 0.739854332063 -0.586401317753 0.05 0
12
+ 5952380952.38 0.05 0 0.692045592483 -0.642124470846 0.692045592483 -0.642124470846 0.05 0
13
+ 6571428571.43 0.05 0 0.64005100421 -0.693963723939 0.64005100421 -0.693963723939 0.05 0
14
+ 7190476190.48 0.05 0 0.584185057333 -0.741605526491 0.584185057333 -0.741605526491 0.05 0
15
+ 7809523809.52 0.05 0 0.524785657914 -0.784761716307 0.524785657914 -0.784761716307 0.05 0
16
+ 8428571428.57 0.05 0 0.462212084157 -0.823171262492 0.462212084157 -0.823171262492 0.05 0
17
+ 9047619047.62 0.05 0 0.396842813311 -0.856601844299 0.396842813311 -0.856601844299 0.05 0
18
+ 9666666666.67 0.05 0 0.329073232443 -0.884851256327 0.329073232443 -0.884851256327 0.05 0
19
+ 10285714285.7 0.05 0 0.259313246934 -0.90774863156 0.259313246934 -0.90774863156 0.05 0
20
+ 10904761904.8 0.05 0 0.187984801156 -0.925155474863 0.187984801156 -0.925155474863 0.05 0
21
+ 11523809523.8 0.05 0 0.11551932634 -0.936966500669 0.11551932634 -0.936966500669 0.05 0
22
+ 12142857142.9 0.05 0 0.0423551310551 -0.943110269803 0.0423551310551 -0.943110269803 0.05 0
23
+ 12761904761.9 0.05 0 -0.0310652499088 -0.943549621579 -0.0310652499088 -0.943549621579 0.05 0
24
+ 13380952381 0.05 0 -0.104297732218 -0.938281898572 -0.104297732218 -0.938281898572 0.05 0
25
+ 14000000000 0.05 0 -0.176899368047 -0.927338962687 -0.176899368047 -0.927338962687 0.05 0
26
+ 14619047619 0.05 0 -0.248431025256 -0.910787002446 -0.248431025256 -0.910787002446 0.05 0
27
+ 15238095238.1 0.05 0 -0.318460043486 -0.88872613264 -0.318460043486 -0.88872613264 0.05 0
28
+ 15857142857.1 0.05 0 -0.386562851115 -0.861289788789 -0.386562851115 -0.861289788789 0.05 0
29
+ 16476190476.2 0.05 0 -0.452327527236 -0.828643920052 -0.452327527236 -0.828643920052 0.05 0
30
+ 17095238095.2 0.05 0 -0.515356293167 -0.790985985481 -0.515356293167 -0.790985985481 0.05 0
31
+ 17714285714.3 0.05 0 -0.575267918421 -0.748543759689 -0.575267918421 -0.748543759689 0.05 0
32
+ 18333333333.3 0.05 0 -0.631700026589 -0.701573955148 -0.631700026589 -0.701573955148 0.05 0
33
+ 18952380952.4 0.05 0 -0.684311287172 -0.650360669462 -0.684311287172 -0.650360669462 0.05 0
34
+ 19571428571.4 0.05 0 -0.73278348013 -0.595213666999 -0.73278348013 -0.595213666999 0.05 0
35
+ 20190476190.5 0.05 0 -0.776823420639 -0.536466505273 -0.776823420639 -0.536466505273 0.05 0
36
+ 20809523809.5 0.05 0 -0.816164732424 -0.47447451742 -0.816164732424 -0.47447451742 0.05 0
37
+ 21428571428.6 0.05 0 -0.850569458938 -0.409612662958 -0.850569458938 -0.409612662958 0.05 0
38
+ 22047619047.6 0.05 0 -0.879829502651 -0.342273259836 -0.879829502651 -0.342273259836 0.05 0
39
+ 22666666666.7 0.05 0 -0.903767883726 -0.272863611498 -0.903767883726 -0.272863611498 0.05 0
40
+ 23285714285.7 0.05 0 -0.922239810487 -0.201803543298 -0.922239810487 -0.201803543298 0.05 0
41
+ 23904761904.8 0.05 0 -0.935133555193 -0.12952286318 -0.935133555193 -0.12952286318 0.05 0
42
+ 24523809523.8 0.05 0 -0.942371129826 -0.0564587619789 -0.942371129826 -0.0564587619789 0.05 0
43
+ 25142857142.9 0.05 0 -0.943908757802 0.0169468309352 -0.943908757802 0.0169468309352 0.05 0
44
+ 25761904761.9 0.05 0 -0.939737138753 0.0902499206749 -0.939737138753 0.0902499206749 0.05 0
45
+ 26380952381 0.05 0 -0.929881504784 0.163007132344 -0.929881504784 0.163007132344 0.05 0
46
+ 27000000000 0.05 0 -0.914401467851 0.2347783928 -0.914401467851 0.2347783928 0.05 0
47
+ 27619047619 0.05 0 -0.893390659203 0.305129592441 -0.893390659203 0.305129592441 0.05 0
48
+ 28238095238.1 0.05 0 -0.866976163047 0.373635210923 -0.866976163047 0.373635210923 0.05 0
49
+ 28857142857.1 0.05 0 -0.835317747881 0.439880890934 -0.835317747881 0.439880890934 0.05 0
50
+ 29476190476.2 0.05 0 -0.798606900128 0.50346594443 -0.798606900128 0.50346594443 0.05 0
51
+ 30095238095.2 0.05 0 -0.757065665932 0.564005776213 -0.757065665932 0.564005776213 0.05 0
52
+ 30714285714.3 0.05 0 -0.710945308101 0.621134210153 -0.710945308101 0.621134210153 0.05 0
53
+ 31333333333.3 0.05 0 -0.66052478635 0.674505704016 -0.66052478635 0.674505704016 0.05 0
54
+ 31952380952.4 0.05 0 -0.60610907 0.72379743948 -0.60610907 0.72379743948 0.05 0
55
+ 32571428571.4 0.05 0 -0.548027293371 0.768711274702 -0.548027293371 0.768711274702 0.05 0
56
+ 33190476190.5 0.05 0 -0.486630765004 0.808975547643 -0.486630765004 0.808975547643 0.05 0
57
+ 33809523809.5 0.05 0 -0.422290842773 0.844346719212 -0.422290842773 0.844346719212 0.05 0
58
+ 34428571428.6 0.05 0 -0.355396687712 0.874610846318 -0.355396687712 0.874610846318 0.05 0
59
+ 35047619047.6 0.05 0 -0.286352910174 0.899584875912 -0.286352910174 0.899584875912 0.05 0
60
+ 35666666666.7 0.05 0 -0.215577122537 0.91911775218 -0.215577122537 0.91911775218 0.05 0
61
+ 36285714285.7 0.05 0 -0.143497413272 0.933091330213 -0.143497413272 0.933091330213 0.05 0
62
+ 36904761904.8 0.05 0 -0.0705497576361 0.941421090603 -0.0705497576361 0.941421090603 0.05 0
63
+ 37523809523.8 0.05 0 0.0028246193223 0.944056650662 0.0028246193223 0.944056650662 0.05 0
64
+ 38142857142.9 0.05 0 0.0761819115262 0.940982069165 0.0761819115262 0.940982069165 0.05 0
65
+ 38761904761.9 0.05 0 0.149078416235 0.932215942766 0.149078416235 0.932215942766 0.05 0
66
+ 39380952381 0.05 0 0.22107321779 0.917811293518 0.22107321779 0.917811293518 0.05 0
67
+ 40000000000 0.05 0 0.291730854497 0.897855248171 0.291730854497 0.897855248171 0.05 0
data/passive_resonator.s2p ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ! passive_resonator
2
+ ! Shunt resonator, Q=30 at 20 GHz. Sharp phase slope near resonance -- the case where a group-delay check without phase unwrapping fails.
3
+ # HZ S RI R 50
4
+ 1000000000 0.708934277816 -0.00118451842576 7.63517671937e-05 0.00118205677766 7.63517671937e-05 0.00118205677766 0.708934277816 -0.00118451842576
5
+ 1619047619.05 0.708931026601 -0.00192560754526 0.0002007533824 0.00191512136809 0.0002007533824 0.00191512136809 0.708931026601 -0.00192560754526
6
+ 2238095238.1 0.708926141135 -0.00267794203413 0.000385358084376 0.00265008962394 0.000385358084376 0.00265008962394 0.708926141135 -0.00267794203413
7
+ 2857142857.14 0.708919504909 -0.0034461364822 0.000631814269284 0.00338776445673 0.000631814269284 0.00338776445673 0.708919504909 -0.0034461364822
8
+ 3476190476.19 0.708910955786 -0.00423512457876 0.00094237969524 0.00412902420156 0.00094237969524 0.00412902420156 0.708910955786 -0.00423512457876
9
+ 4095238095.24 0.70890027837 -0.00505027061583 0.00131999396885 0.00487484806679 0.00131999396885 0.00487484806679 0.70890027837 -0.00505027061583
10
+ 4714285714.29 0.708887193429 -0.00589750028567 0.00176837645697 0.00562634531078 0.00176837645697 0.00562634531078 0.708887193429 -0.00589750028567
11
+ 5333333333.33 0.708871343489 -0.00678345783243 0.00229215577979 0.00638478940956 0.00229215577979 0.00638478940956 0.708871343489 -0.00678345783243
12
+ 5952380952.38 0.708852273301 -0.00771569882306 0.00289703949615 0.00715165881045 0.00289703949615 0.00715165881045 0.708852273301 -0.00771569882306
13
+ 6571428571.43 0.708829403313 -0.00870293097944 0.00359003600748 0.00792868632246 0.00359003600748 0.00792868632246 0.708829403313 -0.00870293097944
14
+ 7190476190.48 0.708801993413 -0.00975532011325 0.0043797455639 0.00871791982115 0.0043797455639 0.00871791982115 0.708801993413 -0.00975532011325
15
+ 7809523809.52 0.7087690929 -0.0108848849348 0.00527674429949 0.0095217978064 0.00527674429949 0.0095217978064 0.7087690929 -0.0108848849348
16
+ 8428571428.57 0.708729470602 -0.0121060144905 0.00629409563606 0.0103432445377 0.00629409563606 0.0103432445377 0.708729470602 -0.0121060144905
17
+ 9047619047.62 0.708681515851 -0.0134361570361 0.0074480390906 0.0111857911046 0.0074480390906 0.0111857911046 0.708681515851 -0.0134361570361
18
+ 9666666666.67 0.708623095804 -0.0148967522858 0.00875893068049 0.0120537310369 0.00875893068049 0.0120537310369 0.708623095804 -0.0148967522858
19
+ 10285714285.7 0.70855134595 -0.0165145152774 0.0102525471462 0.0129523221219 0.0102525471462 0.0129523221219 0.70855134595 -0.0165145152774
20
+ 10904761904.8 0.708462355894 -0.0183232384336 0.01196192756 0.013888050186 0.01196192756 0.013888050186 0.708462355894 -0.0183232384336
21
+ 11523809523.8 0.70835068653 -0.020366374673 0.0139300276029 0.0148689757896 0.0139300276029 0.0148689757896 0.70835068653 -0.020366374673
22
+ 12142857142.9 0.708208607522 -0.022700828093 0.0162136356734 0.0159051906012 0.0162136356734 0.0159051906012 0.708208607522 -0.022700828093
23
+ 12761904761.9 0.708024854682 -0.0254026665274 0.0188893076712 0.0170094143496 0.0188893076712 0.0170094143496 0.708024854682 -0.0254026665274
24
+ 13380952381 0.70778253034 -0.0285759960012 0.0220626435904 0.0181977578393 0.0220626435904 0.0181977578393 0.70778253034 -0.0285759960012
25
+ 14000000000 0.707455402814 -0.0323672406516 0.0258833195131 0.0194906379421 0.0258833195131 0.0194906379421 0.707455402814 -0.0323672406516
26
+ 14619047619 0.70700105109 -0.0369890873828 0.0305705018399 0.0209136803177 0.0305705018399 0.0209136803177 0.70700105109 -0.0369890873828
27
+ 15238095238.1 0.706347382872 -0.0427626523685 0.0364580499309 0.0224979399474 0.0364580499309 0.0224979399474 0.706347382872 -0.0427626523685
28
+ 15857142857.1 0.705364109008 -0.0501962643861 0.0440800285044 0.0242770732661 0.0440800285044 0.0242770732661 0.705364109008 -0.0501962643861
29
+ 16476190476.2 0.703796596228 -0.0601437921129 0.0543453460892 0.0262730889052 0.0543453460892 0.0262730889052 0.703796596228 -0.0601437921129
30
+ 17095238095.2 0.701093186269 -0.0741533776844 0.0689309385809 0.0284387567636 0.0689309385809 0.0284387567636 0.701093186269 -0.0741533776844
31
+ 17714285714.3 0.695876317324 -0.0953315409465 0.0912879063277 0.030416819046 0.0912879063277 0.030416819046 0.695876317324 -0.0953315409465
32
+ 18333333333.3 0.683907068226 -0.130834395661 0.129703456064 0.0303498412125 0.129703456064 0.0303498412125 0.683907068226 -0.130834395661
33
+ 18952380952.4 0.646918009692 -0.20030157535 0.209017108907 0.0166982713572 0.209017108907 0.0166982713572 0.646918009692 -0.20030157535
34
+ 19571428571.4 0.445338049993 -0.342622695502 0.41106145631 -0.133801365188 0.41106145631 -0.133801365188 0.445338049993 -0.342622695502
35
+ 20190476190.5 0.173266384296 0.30465321599 -0.131426076555 -0.602065595177 -0.131426076555 -0.602065595177 0.173266384296 0.30465321599
36
+ 20809523809.5 0.602660920356 0.253077047892 -0.216695773122 -0.168479616724 -0.216695773122 -0.168479616724 0.602660920356 0.253077047892
37
+ 21428571428.6 0.669904934949 0.161701191195 -0.148961718501 -0.0740346253658 -0.148961718501 -0.0740346253658 0.669904934949 0.161701191195
38
+ 22047619047.6 0.688859642596 0.117600890287 -0.11188030969 -0.0414226525511 -0.11188030969 -0.0414226525511 0.688859642596 0.117600890287
39
+ 22666666666.7 0.696647971814 0.0925235587565 -0.089735886915 -0.0256725821924 -0.089735886915 -0.0256725821924 0.696647971814 0.0925235587565
40
+ 23285714285.7 0.700589619696 0.0764693888242 -0.0751289319632 -0.016519000056 -0.0751289319632 -0.016519000056 0.700589619696 0.0764693888242
41
+ 23904761904.8 0.702862681333 0.0653367404424 -0.0647644681075 -0.0105518549696 -0.0647644681075 -0.0105518549696 0.702862681333 0.0653367404424
42
+ 24523809523.8 0.70429585895 0.0571682875658 -0.0570038812161 -0.00634853709154 -0.0570038812161 -0.00634853709154 0.70429585895 0.0571682875658
43
+ 25142857142.9 0.705259973695 0.0509189104309 -0.0509498570205 -0.00321909423719 -0.0509498570205 -0.00321909423719 0.705259973695 0.0509189104309
44
+ 25761904761.9 0.705941223843 0.0459817066364 -0.046072351286 -0.000791211446514 -0.046072351286 -0.000791211446514 0.705941223843 0.0459817066364
45
+ 26380952381 0.706441522604 0.0419807567602 -0.0420390177507 0.00115265963259 -0.0420390177507 0.00115265963259 0.706441522604 0.0419807567602
46
+ 27000000000 0.706820516647 0.0386710313059 -0.0386312712486 0.00274770832855 -0.0386312712486 0.00274770832855 0.706820516647 0.0386710313059
47
+ 27619047619 0.707115037986 0.0358860881778 -0.0356996367288 0.00408216862581 -0.0356996367288 0.00408216862581 0.707115037986 0.0358860881778
48
+ 28238095238.1 0.707348850976 0.03350895104 -0.0331385457983 0.00521597928821 -0.0331385457983 0.00521597928821 0.707348850976 0.03350895104
49
+ 28857142857.1 0.707537860251 0.0314550252907 -0.0308713902197 0.00619123536128 -0.0308713902197 0.00619123536128 0.707537860251 0.0314550252907
50
+ 29476190476.2 0.707693045374 0.029661628311 -0.0288412809567 0.00703834368904 -0.0288412809567 0.00703834368904 0.707693045374 0.029661628311
51
+ 30095238095.2 0.707822190244 0.0280813308849 -0.027005127808 0.0077798046886 -0.027005127808 0.0077798046886 0.707822190244 0.0280813308849
52
+ 30714285714.3 0.707930942005 0.0266775854202 -0.0253297281007 0.00843262096609 -0.0253297281007 0.00843262096609 0.707930942005 0.0266775854202
53
+ 31333333333.3 0.708023481232 0.0254217751092 -0.0237891125433 0.00900987977924 -0.0237891125433 0.00900987977924 0.708023481232 0.0254217751092
54
+ 31952380952.4 0.708102958507 0.0242911733167 -0.0223627012545 0.00952182125534 -0.0223627012545 0.00952182125534 0.708102958507 0.0242911733167
55
+ 32571428571.4 0.708171786174 0.0232675018679 -0.0210339956524 0.00997657685035 -0.0210339956524 0.00997657685035 0.708171786174 0.0232675018679
56
+ 33190476190.5 0.708231837754 0.0223358928564 -0.0197896330466 0.0103806907282 -0.0197896330466 0.0103806907282 0.708231837754 0.0223358928564
57
+ 33809523809.5 0.708284587038 0.0214841281512 -0.0186186918488 0.0107394948646 -0.0186186918488 0.0107394948646 0.708284587038 0.0214841281512
58
+ 34428571428.6 0.708331206879 0.0207020736815 -0.0175121732027 0.0110573835075 -0.0175121732027 0.0110573835075 0.708331206879 0.0207020736815
59
+ 35047619047.6 0.70837264053 0.0199812527047 -0.0164626089029 0.0113380170772 -0.0164626089029 0.0113380170772 0.70837264053 0.0199812527047
60
+ 35666666666.7 0.708409653924 0.0193145198038 -0.0154637611092 0.0115844757485 -0.0154637611092 0.0115844757485 0.708409653924 0.0193145198038
61
+ 36285714285.7 0.708442874525 0.0186958089308 -0.0145103897199 0.011799376593 -0.0145103897199 0.011799376593 0.708442874525 0.0186958089308
62
+ 36904761904.8 0.708472820549 0.0181199365972 -0.0135980702535 0.0119849639539 -0.0135980702535 0.0119849639539 0.708472820549 0.0181199365972
63
+ 37523809523.8 0.70849992321 0.0175824466259 -0.0127230498827 0.0121431799038 -0.0127230498827 0.0121431799038 0.70849992321 0.0175824466259
64
+ 38142857142.9 0.708524543826 0.0170794865756 -0.0118821326005 0.0122757197042 -0.0118821326005 0.0122757197042 0.708524543826 0.0170794865756
65
+ 38761904761.9 0.708546987106 0.0166077085477 -0.0110725868552 0.012384075846 -0.0110725868552 0.012384075846 0.708546987106 0.0166077085477
66
+ 39380952381 0.70856751157 0.0161641889409 -0.0102920706779 0.0124695733062 -0.0102920706779 0.0124695733062 0.70856751157 0.0161641889409
67
+ 40000000000 0.708586337782 0.0157463630618 -0.00953857054758 0.0125333979836 -0.00953857054758 0.0125333979836 0.708586337782 0.0157463630618
generate.py ADDED
@@ -0,0 +1,252 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Generate the sparam-conformance corpus.
2
+
3
+ A labelled set of S-parameter networks with ground-truth physical verdicts.
4
+ Every case is synthesised from a closed-form model, so the label is derived
5
+ from construction rather than asserted -- we know a network is non-passive
6
+ because we built it that way, not because a checker said so.
7
+
8
+ Run: python generate.py [--out data]
9
+ """
10
+
11
+ from __future__ import annotations
12
+
13
+ import argparse
14
+ import hashlib
15
+ import json
16
+ from dataclasses import dataclass, field
17
+ from pathlib import Path
18
+
19
+ import numpy as np
20
+
21
+ FREQ = np.linspace(1e9, 40e9, 64)
22
+
23
+ # The five laws, in the order every checker should report them.
24
+ LAWS = ("passivity", "reciprocity", "energy_conservation",
25
+ "positive_real_z0", "group_delay_nonneg")
26
+
27
+
28
+ @dataclass
29
+ class Case:
30
+ name: str
31
+ s: np.ndarray
32
+ freq: np.ndarray
33
+ z0: float
34
+ expect: dict[str, bool] # law -> should_pass
35
+ physical: bool # is this a realizable passive device?
36
+ note: str
37
+ tags: list[str] = field(default_factory=list)
38
+
39
+
40
+ def _line(loss_db=0.5, delay_s=20e-12, refl=0.05):
41
+ amp = 10.0 ** (-abs(loss_db) / 20.0)
42
+ s21 = amp * np.exp(-1j * 2 * np.pi * FREQ * delay_s)
43
+ s = np.zeros((len(FREQ), 2, 2), dtype=complex)
44
+ s[:, 0, 0] = s[:, 1, 1] = refl
45
+ s[:, 0, 1] = s[:, 1, 0] = s21
46
+ return s
47
+
48
+
49
+ def _resonator(f0=20e9, q=30.0, delay_s=10e-12):
50
+ """A passive shunt resonator: sharp phase, still causal and passive."""
51
+ x = (FREQ / f0) - (f0 / FREQ)
52
+ denom = 1.0 + 1j * q * x
53
+ s21 = (1.0 / denom) * np.exp(-1j * 2 * np.pi * FREQ * delay_s)
54
+ s11 = 1.0 - 1.0 / denom
55
+ s = np.zeros((len(FREQ), 2, 2), dtype=complex)
56
+ s[:, 0, 0] = s[:, 1, 1] = s11
57
+ s[:, 0, 1] = s[:, 1, 0] = s21
58
+ # A resonator built naively from these closed forms is NOT passive -- the
59
+ # 2x2 spectral norm exceeds 1 near resonance. Normalise by the worst
60
+ # singular value so the network genuinely satisfies the law its label
61
+ # claims. A corpus whose "passive" case is not passive is worse than no
62
+ # corpus at all.
63
+ worst = max(np.linalg.svd(m, compute_uv=False)[0] for m in s)
64
+ return s * (0.98 / worst)
65
+
66
+
67
+ def _attenuator(db=10.0):
68
+ a = 10.0 ** (-db / 20.0)
69
+ s = np.zeros((len(FREQ), 2, 2), dtype=complex)
70
+ s[:, 0, 1] = s[:, 1, 0] = a
71
+ return s
72
+
73
+
74
+ def _matched_load():
75
+ return np.zeros((len(FREQ), 2, 2), dtype=complex)
76
+
77
+
78
+ def _marginal_passive():
79
+ """sigma_max just below 1 -- a lossless line. Must PASS."""
80
+ s21 = np.exp(-1j * 2 * np.pi * FREQ * 15e-12) * (1.0 - 1e-12)
81
+ s = np.zeros((len(FREQ), 2, 2), dtype=complex)
82
+ s[:, 0, 1] = s[:, 1, 0] = s21
83
+ return s
84
+
85
+
86
+ def _thru_4port():
87
+ """Two independent thru paths: 1-2 and 3-4. Passive and reciprocal."""
88
+ n = len(FREQ)
89
+ s = np.zeros((n, 4, 4), dtype=complex)
90
+ a = 0.9 * np.exp(-1j * 2 * np.pi * FREQ * 12e-12)
91
+ s[:, 0, 1] = s[:, 1, 0] = a
92
+ s[:, 2, 3] = s[:, 3, 2] = a
93
+ return s
94
+
95
+
96
+ def build_cases() -> list[Case]:
97
+ ok = {law: True for law in LAWS}
98
+ cases: list[Case] = []
99
+
100
+ # ---------- physically realizable: everything must pass ----------
101
+ cases.append(Case(
102
+ "passive_line", _line(), FREQ, 50.0, dict(ok), True,
103
+ "Lossy 20 ps delay line, 0.5 dB insertion loss. The baseline sane case.",
104
+ ["passive", "2port"]))
105
+
106
+ cases.append(Case(
107
+ "passive_resonator", _resonator(), FREQ, 50.0, dict(ok), True,
108
+ "Shunt resonator, Q=30 at 20 GHz. Sharp phase slope near resonance -- "
109
+ "the case where a group-delay check without phase unwrapping fails.",
110
+ ["passive", "2port", "sharp_phase"]))
111
+
112
+ cases.append(Case(
113
+ "passive_attenuator", _attenuator(), FREQ, 50.0, dict(ok), True,
114
+ "Ideal 10 dB matched attenuator.", ["passive", "2port"]))
115
+
116
+ cases.append(Case(
117
+ "matched_load", _matched_load(), FREQ, 50.0, dict(ok), True,
118
+ "All-zero S: perfectly matched, fully absorbing. A degenerate but "
119
+ "legal network; checkers that divide by |S| must not blow up.",
120
+ ["passive", "2port", "degenerate"]))
121
+
122
+ cases.append(Case(
123
+ "marginal_lossless", _marginal_passive(), FREQ, 50.0, dict(ok), True,
124
+ "Lossless line with sigma_max = 1 - 1e-12. Sits on the passivity "
125
+ "boundary; a checker with a too-tight tolerance false-alarms here.",
126
+ ["passive", "2port", "boundary"]))
127
+
128
+ cases.append(Case(
129
+ "passive_4port", _thru_4port(), FREQ, 50.0, dict(ok), True,
130
+ "Four-port with two independent thru paths. Exercises N>2 handling.",
131
+ ["passive", "4port"]))
132
+
133
+ # ---------- non-physical: exactly one law must fail ----------
134
+ s = _line()
135
+ s[:, 0, 1] *= 3.0
136
+ s[:, 1, 0] *= 3.0
137
+ cases.append(Case(
138
+ "active_gain", s, FREQ, 50.0,
139
+ {**ok, "passivity": False, "energy_conservation": False}, False,
140
+ "Delay line with 3x through-path gain. Creates energy: fails both the "
141
+ "spectral-norm and the row-power tests.", ["nonphysical", "2port"]))
142
+
143
+ s = _line()
144
+ s[:, 0, 0] = s[:, 1, 1] = 0.9
145
+ s[:, 0, 1] = s[:, 1, 0] = 0.9
146
+ cases.append(Case(
147
+ "energy_row_violation", s, FREQ, 50.0,
148
+ {**ok, "passivity": False, "energy_conservation": False}, False,
149
+ "Row power > 1 when port 1 is driven.", ["nonphysical", "2port"]))
150
+
151
+ s = _line()
152
+ s[:, 0, 0] = s[:, 1, 1] = -1.6
153
+ cases.append(Case(
154
+ "negative_resistance", s, FREQ, 50.0,
155
+ {**ok, "passivity": False, "positive_real_z0": False,
156
+ "energy_conservation": False}, False,
157
+ "|S11| > 1 gives Re(Z_in) < 0: negative resistance at the port. It "
158
+ "unavoidably breaks energy conservation too -- a reflection "
159
+ "coefficient above unity returns more power than arrives -- so this "
160
+ "case cannot isolate a single law, and the label says so.",
161
+ ["nonphysical", "2port"]))
162
+
163
+ s = _line()
164
+ amp = np.abs(s[:, 0, 1])
165
+ s[:, 0, 1] = s[:, 1, 0] = amp * np.exp(+1j * 2 * np.pi * FREQ * 20e-12)
166
+ cases.append(Case(
167
+ "noncausal_advance", s, FREQ, 50.0,
168
+ {**ok, "group_delay_nonneg": False}, False,
169
+ "Phase advances with frequency: the output precedes the input. "
170
+ "Passive and reciprocal, so ONLY the causality check should fire.",
171
+ ["nonphysical", "2port", "isolates_one_law"]))
172
+
173
+ # ---------- real device that legitimately fails a law ----------
174
+ s = _line()
175
+ s[:, 0, 1] = s[:, 1, 0] * 0.02 # 34 dB isolation one way
176
+ cases.append(Case(
177
+ "ferrite_isolator", s, FREQ, 50.0,
178
+ {**ok, "reciprocity": False}, True,
179
+ "A ferrite isolator. NON-RECIPROCAL BY DESIGN and entirely realizable "
180
+ "-- the medium is not reciprocal. The reciprocity check correctly "
181
+ "fires, and that is a true positive for the law but NOT a defect in "
182
+ "the device. Any tool reporting this must let the user say so.",
183
+ ["physical", "2port", "expected_law_failure"]))
184
+
185
+ return cases
186
+
187
+
188
+ def write_touchstone(path: Path, c: Case) -> None:
189
+ n = c.s.shape[1]
190
+ lines = [f"! {c.name}", f"! {c.note}", f"# HZ S RI R {c.z0:g}"]
191
+ for fi, f in enumerate(c.freq):
192
+ m = c.s[fi]
193
+ if n == 2: # Touchstone 2-port: S11 S21 S12 S22
194
+ vals = [m[0, 0], m[1, 0], m[0, 1], m[1, 1]]
195
+ else: # N>=3: row-major
196
+ vals = list(m.reshape(-1))
197
+ lines.append(f"{f:.12g} " + " ".join(
198
+ f"{v.real:.12g} {v.imag:.12g}" for v in vals))
199
+ path.write_text("\n".join(lines) + "\n")
200
+
201
+
202
+ def main() -> int:
203
+ ap = argparse.ArgumentParser()
204
+ ap.add_argument("--out", default="data")
205
+ args = ap.parse_args()
206
+ out = Path(__file__).resolve().parent / args.out
207
+ out.mkdir(parents=True, exist_ok=True)
208
+
209
+ cases = build_cases()
210
+ manifest = {
211
+ "corpus": "sparam-conformance",
212
+ "version": "1.0.0",
213
+ "license": "CC-BY-4.0",
214
+ "n_cases": len(cases),
215
+ "laws": list(LAWS),
216
+ "freq_hz": {"start": float(FREQ[0]), "stop": float(FREQ[-1]),
217
+ "n": int(len(FREQ))},
218
+ "note": (
219
+ "Every network is synthesised from a closed-form model, so each "
220
+ "label is derived from construction rather than from a checker's "
221
+ "opinion. 'physical' marks whether the device is realizable; a "
222
+ "device can be physical AND legitimately fail a law -- see "
223
+ "ferrite_isolator."
224
+ ),
225
+ "cases": [],
226
+ }
227
+
228
+ for c in cases:
229
+ n = c.s.shape[1]
230
+ fname = f"{c.name}.s{n}p"
231
+ write_touchstone(out / fname, c)
232
+ digest = hashlib.sha256((out / fname).read_bytes()).hexdigest()
233
+ manifest["cases"].append({
234
+ "name": c.name,
235
+ "file": fname,
236
+ "n_ports": n,
237
+ "z0_ohm": c.z0,
238
+ "physical": c.physical,
239
+ "expect": c.expect,
240
+ "expect_all_pass": all(c.expect.values()),
241
+ "note": c.note,
242
+ "tags": c.tags,
243
+ "sha256": digest,
244
+ })
245
+
246
+ (out / "manifest.json").write_text(json.dumps(manifest, indent=2) + "\n")
247
+ print(f"wrote {len(cases)} cases + manifest.json to {out}")
248
+ return 0
249
+
250
+
251
+ if __name__ == "__main__":
252
+ raise SystemExit(main())
score.py ADDED
@@ -0,0 +1,171 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Score any S-parameter physical-validity checker against the corpus.
2
+
3
+ The metric is deliberately NOT a single accuracy number. A checker has two
4
+ independent ways to be wrong and they carry very different costs:
5
+
6
+ FALSE PASS the checker admits a non-physical network.
7
+ This is the one that ships a broken model downstream.
8
+
9
+ FALSE FAIL the checker rejects a realizable network.
10
+ Annoying, erodes trust, but nothing bad reaches a simulator.
11
+
12
+ So both are reported, per law, and the headline verdict requires ZERO false
13
+ passes. A checker that flags everything has no false passes and is useless --
14
+ which is why the false-fail count sits beside it, exactly as in the
15
+ abstain-bench design.
16
+
17
+ Adapter contract: point --checker at `module:function` where the function takes
18
+ a Touchstone path and returns {law_name: bool_passed}.
19
+
20
+ Usage:
21
+ python score.py --checker sparam_lint_adapter:check
22
+ python score.py --checker mypkg.mychecker:run --json
23
+ """
24
+
25
+ from __future__ import annotations
26
+
27
+ import argparse
28
+ import importlib
29
+ import json
30
+ import sys
31
+ from pathlib import Path
32
+
33
+ HERE = Path(__file__).resolve().parent
34
+ DATA = HERE / "data"
35
+
36
+
37
+ def load_manifest(data_dir: Path = DATA) -> dict:
38
+ mf = data_dir / "manifest.json"
39
+ if not mf.exists():
40
+ raise SystemExit(f"no manifest at {mf} -- run generate.py first")
41
+ return json.loads(mf.read_text())
42
+
43
+
44
+ def _load_checker(spec: str):
45
+ if ":" not in spec:
46
+ raise ValueError(f"expected 'module:function', got {spec!r}")
47
+ mod, fn = spec.split(":", 1)
48
+ f = getattr(importlib.import_module(mod), fn, None)
49
+ if f is None or not callable(f):
50
+ raise ValueError(f"{mod} has no callable {fn!r}")
51
+ return f
52
+
53
+
54
+ def score(checker, manifest: dict, data_dir: Path = DATA) -> dict:
55
+ laws = manifest["laws"]
56
+ per_case = []
57
+ false_pass = 0
58
+ false_fail = 0
59
+ errors = 0
60
+ per_law = {law: {"false_pass": 0, "false_fail": 0, "correct": 0} for law in laws}
61
+
62
+ for c in manifest["cases"]:
63
+ path = data_dir / c["file"]
64
+ try:
65
+ got = checker(str(path))
66
+ except Exception as exc: # noqa: BLE001
67
+ errors += 1
68
+ per_case.append({"name": c["name"], "error": f"{type(exc).__name__}: {exc}"})
69
+ continue
70
+
71
+ if not isinstance(got, dict):
72
+ errors += 1
73
+ per_case.append({"name": c["name"],
74
+ "error": f"checker returned {type(got).__name__}, expected dict"})
75
+ continue
76
+
77
+ case_fp, case_ff, missing = [], [], []
78
+ for law in laws:
79
+ if law not in got:
80
+ missing.append(law)
81
+ continue
82
+ expected = c["expect"][law]
83
+ actual = bool(got[law])
84
+ if actual == expected:
85
+ per_law[law]["correct"] += 1
86
+ elif actual and not expected:
87
+ per_law[law]["false_pass"] += 1
88
+ case_fp.append(law)
89
+ else:
90
+ per_law[law]["false_fail"] += 1
91
+ case_ff.append(law)
92
+
93
+ false_pass += len(case_fp)
94
+ false_fail += len(case_ff)
95
+ per_case.append({
96
+ "name": c["name"],
97
+ "physical": c["physical"],
98
+ "false_pass_laws": case_fp,
99
+ "false_fail_laws": case_ff,
100
+ "missing_laws": missing,
101
+ "correct": not case_fp and not case_ff and not missing,
102
+ })
103
+
104
+ n_law_checks = len(manifest["cases"]) * len(laws)
105
+ return {
106
+ "corpus_version": manifest["version"],
107
+ "n_cases": len(manifest["cases"]),
108
+ "n_law_checks": n_law_checks,
109
+ "false_pass": false_pass,
110
+ "false_fail": false_fail,
111
+ "checker_errors": errors,
112
+ "per_law": per_law,
113
+ "per_case": per_case,
114
+ "passed": false_pass == 0 and errors == 0,
115
+ "verdict_rule": (
116
+ "A conforming checker has ZERO false passes and ZERO errors. "
117
+ "False fails are reported but do not fail the verdict, because a "
118
+ "conservative checker is safe; a permissive one is not."
119
+ ),
120
+ }
121
+
122
+
123
+ def main(argv: list[str] | None = None) -> int:
124
+ ap = argparse.ArgumentParser(description="Score a checker against sparam-conformance.")
125
+ ap.add_argument("--checker", required=True, help="module:function")
126
+ ap.add_argument("--data", default=str(DATA))
127
+ ap.add_argument("--json", action="store_true")
128
+ args = ap.parse_args(argv)
129
+
130
+ data_dir = Path(args.data)
131
+ manifest = load_manifest(data_dir)
132
+ try:
133
+ checker = _load_checker(args.checker)
134
+ except Exception as exc: # noqa: BLE001
135
+ print(f"error: {exc}", file=sys.stderr)
136
+ return 2
137
+
138
+ result = score(checker, manifest, data_dir)
139
+ result["checker"] = args.checker
140
+
141
+ if args.json:
142
+ print(json.dumps(result, indent=2))
143
+ else:
144
+ print(f"sparam-conformance v{result['corpus_version']} "
145
+ f"{result['n_cases']} cases x {len(manifest['laws'])} laws")
146
+ print()
147
+ for c in result["per_case"]:
148
+ if "error" in c:
149
+ print(f" [ERR ] {c['name']:<22} {c['error']}")
150
+ elif c["correct"]:
151
+ print(f" [ OK ] {c['name']}")
152
+ else:
153
+ bits = []
154
+ if c["false_pass_laws"]:
155
+ bits.append("FALSE PASS: " + ", ".join(c["false_pass_laws"]))
156
+ if c["false_fail_laws"]:
157
+ bits.append("false fail: " + ", ".join(c["false_fail_laws"]))
158
+ if c["missing_laws"]:
159
+ bits.append("not reported: " + ", ".join(c["missing_laws"]))
160
+ print(f" [FAIL] {c['name']:<22} {'; '.join(bits)}")
161
+ print()
162
+ print(f" false passes : {result['false_pass']} <- must be 0")
163
+ print(f" false fails : {result['false_fail']}")
164
+ print(f" errors : {result['checker_errors']}")
165
+ print(f" verdict : {'CONFORMING' if result['passed'] else 'NOT CONFORMING'}")
166
+
167
+ return 0 if result["passed"] else 1
168
+
169
+
170
+ if __name__ == "__main__":
171
+ raise SystemExit(main())
sparam_lint_adapter.py ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ """Reference adapter: sparam-lint -> the conformance scorer contract.
2
+
3
+ Any checker can be scored by writing five lines like this.
4
+ """
5
+ from sparam_lint import read_touchstone, run_battery
6
+
7
+
8
+ def check(path: str) -> dict[str, bool]:
9
+ net = read_touchstone(path)
10
+ return {r.name: r.passed for r in run_battery(net.s, net.freq_hz, net.z0)}
tests/test_conformance.py ADDED
@@ -0,0 +1,188 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Tests for the sparam-conformance corpus.
2
+
3
+ The load-bearing tests verify the LABELS, not the checker. A corpus whose
4
+ ground truth is wrong is worse than no corpus, because every checker scored
5
+ against it inherits the error. Each label is therefore re-derived here from
6
+ the network itself by independent linear algebra.
7
+ """
8
+
9
+ from __future__ import annotations
10
+
11
+ import hashlib
12
+ import subprocess
13
+ import sys
14
+ from pathlib import Path
15
+
16
+ import numpy as np
17
+ import pytest
18
+
19
+ HERE = Path(__file__).resolve().parents[1]
20
+ sys.path.insert(0, str(HERE))
21
+ sys.path.insert(0, str(HERE.parent / "sparam-lint" / "src"))
22
+
23
+ from generate import LAWS # noqa: E402
24
+ from score import load_manifest, score # noqa: E402
25
+ from sparam_lint import read_touchstone # noqa: E402
26
+
27
+ DATA = HERE / "data"
28
+ MANIFEST = load_manifest(DATA)
29
+
30
+
31
+ def _read(name):
32
+ case = next(c for c in MANIFEST["cases"] if c["name"] == name)
33
+ return read_touchstone(DATA / case["file"]), case
34
+
35
+
36
+ # --------------------------------------------------- labels re-derived, not trusted
37
+
38
+ @pytest.mark.parametrize("case", MANIFEST["cases"], ids=lambda c: c["name"])
39
+ def test_passivity_label_matches_independent_svd(case):
40
+ net = read_touchstone(DATA / case["file"])
41
+ sig = max(np.linalg.svd(m, compute_uv=False)[0] for m in net.s)
42
+ assert case["expect"]["passivity"] == bool(sig <= 1.0 + 1e-9), (
43
+ f"{case['name']}: label says passivity={case['expect']['passivity']} "
44
+ f"but sigma_max={sig:.6f}"
45
+ )
46
+
47
+
48
+ @pytest.mark.parametrize("case", MANIFEST["cases"], ids=lambda c: c["name"])
49
+ def test_reciprocity_label_matches_independent_asymmetry(case):
50
+ net = read_touchstone(DATA / case["file"])
51
+ asym = max(
52
+ np.linalg.norm(m - m.T, "fro") / max(np.linalg.norm(m, "fro"), 1e-300)
53
+ for m in net.s
54
+ )
55
+ assert case["expect"]["reciprocity"] == bool(asym <= 1e-6), (
56
+ f"{case['name']}: label says reciprocity={case['expect']['reciprocity']} "
57
+ f"but asymmetry={asym:.3e}"
58
+ )
59
+
60
+
61
+ @pytest.mark.parametrize("case", MANIFEST["cases"], ids=lambda c: c["name"])
62
+ def test_energy_label_matches_independent_row_power(case):
63
+ net = read_touchstone(DATA / case["file"])
64
+ rowp = max(np.sum(np.abs(m) ** 2, axis=1).max() for m in net.s)
65
+ assert case["expect"]["energy_conservation"] == bool(rowp <= 1.0 + 1e-9), (
66
+ f"{case['name']}: label says energy={case['expect']['energy_conservation']} "
67
+ f"but max row power={rowp:.6f}"
68
+ )
69
+
70
+
71
+ def test_physical_cases_pass_every_law_except_declared_exceptions():
72
+ """A case marked physical must pass all five laws, unless it is explicitly
73
+ tagged as a real device that legitimately fails one (e.g. an isolator)."""
74
+ for c in MANIFEST["cases"]:
75
+ if not c["physical"]:
76
+ continue
77
+ fails = [k for k, v in c["expect"].items() if not v]
78
+ if fails:
79
+ assert "expected_law_failure" in c["tags"], (
80
+ f"{c['name']} is marked physical and fails {fails} but is not "
81
+ "tagged expected_law_failure"
82
+ )
83
+
84
+
85
+ def test_at_least_one_case_isolates_a_single_law():
86
+ """Without an isolating case you cannot tell which check is alive."""
87
+ isolating = [c for c in MANIFEST["cases"]
88
+ if sum(1 for v in c["expect"].values() if not v) == 1
89
+ and not c["physical"]]
90
+ assert isolating, "corpus needs a case that breaks exactly one law"
91
+
92
+
93
+ def test_corpus_covers_every_law_in_both_directions():
94
+ for law in LAWS:
95
+ passes = [c for c in MANIFEST["cases"] if c["expect"][law]]
96
+ fails = [c for c in MANIFEST["cases"] if not c["expect"][law]]
97
+ assert passes, f"no case where {law} passes"
98
+ assert fails, f"no case where {law} fails"
99
+
100
+
101
+ # ------------------------------------------------------------------- integrity
102
+
103
+ def test_files_match_recorded_hashes():
104
+ for c in MANIFEST["cases"]:
105
+ digest = hashlib.sha256((DATA / c["file"]).read_bytes()).hexdigest()
106
+ assert digest == c["sha256"], f"{c['file']} changed since manifest was written"
107
+
108
+
109
+ def test_generation_is_deterministic(tmp_path):
110
+ """Regenerating must reproduce byte-identical files."""
111
+ subprocess.run([sys.executable, str(HERE / "generate.py"),
112
+ "--out", str(tmp_path)], check=True, cwd=HERE,
113
+ capture_output=True)
114
+ for c in MANIFEST["cases"]:
115
+ a = (DATA / c["file"]).read_bytes()
116
+ b = (tmp_path / c["file"]).read_bytes()
117
+ assert a == b, f"{c['file']} is not reproducible"
118
+
119
+
120
+ def test_multiport_case_present():
121
+ ports = {c["n_ports"] for c in MANIFEST["cases"]}
122
+ assert ports - {2}, "corpus must exercise N>2"
123
+
124
+
125
+ # ---------------------------------------------------------------------- scorer
126
+
127
+ def _perfect(path):
128
+ case = next(c for c in MANIFEST["cases"] if c["file"] == Path(path).name)
129
+ return dict(case["expect"])
130
+
131
+
132
+ def _always_pass(path):
133
+ return {law: True for law in LAWS}
134
+
135
+
136
+ def _always_fail(path):
137
+ return {law: False for law in LAWS}
138
+
139
+
140
+ def test_scorer_gives_perfect_checker_a_clean_sheet():
141
+ r = score(_perfect, MANIFEST, DATA)
142
+ assert r["false_pass"] == 0 and r["false_fail"] == 0 and r["passed"]
143
+
144
+
145
+ def test_scorer_catches_permissive_checker():
146
+ """The one that matters: a checker that admits everything must NOT pass."""
147
+ r = score(_always_pass, MANIFEST, DATA)
148
+ assert r["false_pass"] > 0
149
+ assert not r["passed"], "a permissive checker must never be CONFORMING"
150
+
151
+
152
+ def test_conservative_checker_has_no_false_passes_but_many_false_fails():
153
+ r = score(_always_fail, MANIFEST, DATA)
154
+ assert r["false_pass"] == 0
155
+ assert r["false_fail"] > 0
156
+ assert r["passed"], "a conservative checker is safe, so it conforms"
157
+
158
+
159
+ def test_scorer_records_checker_errors_without_crashing():
160
+ def boom(path):
161
+ raise RuntimeError("nope")
162
+
163
+ r = score(boom, MANIFEST, DATA)
164
+ assert r["checker_errors"] == len(MANIFEST["cases"])
165
+ assert not r["passed"]
166
+
167
+
168
+ def test_scorer_rejects_wrong_return_type():
169
+ r = score(lambda p: "not a dict", MANIFEST, DATA)
170
+ assert r["checker_errors"] == len(MANIFEST["cases"])
171
+
172
+
173
+ def test_missing_law_is_reported_not_silently_passed():
174
+ def partial(path):
175
+ return {"passivity": True}
176
+
177
+ r = score(partial, MANIFEST, DATA)
178
+ assert all(c["missing_laws"] for c in r["per_case"])
179
+
180
+
181
+ # ------------------------------------------- the reference adapter really works
182
+
183
+ def test_reference_adapter_conforms():
184
+ from sparam_lint_adapter import check
185
+ r = score(check, MANIFEST, DATA)
186
+ assert r["checker_errors"] == 0
187
+ assert r["false_pass"] == 0, f"sparam-lint false passes: {r['per_case']}"
188
+ assert r["passed"]