kicad2ems.dfsynth.validate

Validation with kicad2ems: runs the written board through its solvers, reads the
Touchstone results, measures the band edges and compares them with the spec and
the line model. em_tune() feeds the measured centre / bandwidth error back into
the design's kf / kb and re-runs.
class kicad2ems.dfsynth.validate.Follow(path, log=<built-in function print>)[source]
Follows a kicad2ems run's events (--events, JSON lines) into the log as
it runs: its messages, and its progress every few seconds (an FDTD run: the
timestep and the energy left; a frequency sweep: the frequencies done).
kicad2ems.dfsynth.validate.metrics(design, f, s21, s11=None, relative=True)[source]
Band edges, centre and bandwidth errors, pass-band loss / match of a
response.
kicad2ems.dfsynth.validate.plot(design, results, path, title='')[source]
S21 / S11 of the line model and of each EM result, with the target
edges.
kicad2ems.dfsynth.validate.predicted(mets, fw)[source]
(centre %, bandwidth %) error vs the spec expected of the real board: the
line model's own error (with the copper thickness) times the full-wave
result's ratio over the zero-thickness model (the model of what the solver
sees: the part of the error the line model does not explain).
kicad2ems.dfsynth.validate.run_kicad2ems(toml, outdir, solvers='mom, lines', extra=(), log=<built-in function print>)[source]
Runs kicad2ems; returns {solver name: .s2p path}.
kicad2ems.dfsynth.validate.validate(design, base, solvers='mom, lines', extra=(), log=<built-in function print>, tag='')[source]
Runs kicad2ems on <base>.toml; returns ({name: metrics}, {name: (f, s21,
s11)}).