kicad2ems.core.pipeline

One run of kicad2ems as a sequence of stages, driven by a config.Settings, over
the solvers (solvers/):

    Job(settings).run()
        preflight() the solvers of the run (Settings.solver_plan; 'lines'
                    resolved to qucs or scikit), each checked before any work:
                    one named in `solvers` that cannot run stops the run here
        model()     the board file -> Board (stack, copper, vias, ports, lumped
                    parts, edge walls), written as <name>_board.json: what every
                    solver gets
        lines()     the transmission-line model (lines/tlines.py): sections, Z0,
                    coupled groups, discontinuities; what the line solvers
                    (qucs, scikit) solve
        choose()    --solvers auto: the full-wave solver estimated cheapest for
                    this board (Solver.estimate) among those that can run and
                    model it, plus the line model; why, in the log and the
                    summary
        assess()    each solver against this board and run: one named that
                    cannot model it stops the run, a reference is left out with
                    a warning
        prepare()   each solver lowers the board to its own form (openEMS:
                    boundaries, mesh and the mesh preview; with --preview it is
                    prepared, not solved) and declares what it changes
                    (deviations: vias moved, parts split, walls as via rows),
                    the report's "What each solver saw"; without openEMS,
                    <name>_model.png
        solve()     the solvers, the cheap ones first: S-parameters over the
                    board's ports
        outputs()   <name>_<solver>.sNp per solver; the first solver's plot
                    <name>_<solver>.png with the others (and --compare)
                    overlaid, and each compared with it; each solver's own
                    outputs (openEMS: field maps, antenna, convergence)
        report()    <name>_run.json (the run summary) and <name>_report.html
                    built from it

Everything the report shows is collected in Job.summary, a JSON-friendly dict
written to <name>_run.json; report.py renders that dict and nothing else. Every
message goes through Job.log (printed, kept for the report, and sent to --events
as JSON lines).
kicad2ems.core.pipeline.board_from_settings(s, log=<built-in function print>)[source]
The Board of a run's settings: the board file through its importer,
resolved with the selection settings - or a board.json written by an earlier
run, as it is (its selection is already applied).
kicad2ems.core.pipeline.causality_note(freq, S, names, what)[source]
(dict for the run summary, a warning or None): S's causality on its band
(causality.check).
kicad2ems.core.pipeline.compare_table(freq, S, Sx, names, floor_db=-40.0)[source]
A reference result (S) against another (Sx) on the same frequencies: per
S-parameter the largest vector difference |S - Sx| and the maxima in dB; for
transmissions also the largest |S| difference in dB (where the reference is
above floor_db) and the delay difference (Sx - S, from the phase slope) in
ps. (A reflection's dB difference is dominated by where its nulls fall, so
it is left out.)
kicad2ems.core.pipeline.make_passive(S)[source]
S (nf x n x n) with each frequency's singular values above 1 clipped to 1
(S = U diag(sv) V^H): the least change, in the 2-norm, that makes it passive
there; (that S, how many frequencies it changed). Terms not computed (NaN)
are left as they are, and so are their frequencies.
kicad2ems.core.pipeline.passivity(freq, S)[source]
dict(max, f, count) of S's largest singular value over the band (a
passive network's is at most 1), its frequency and how many frequencies pass
1 + PASSIVE_TOL; None when no frequency has every term.
kicad2ems.core.pipeline.ram_gb()[source]
Installed RAM in GB (None where sysconf cannot tell).
kicad2ems.core.pipeline.saw_table(m, s, names, deviations)[source]
The report's "What each solver saw": per feature of the board, each
solver's capability (yes / no / ignored / approximated: how) and what it
declared changing there.
kicad2ems.core.pipeline.sparam_table(freq, S, names)[source]
Per S-parameter (lower triangle): |S| in dB at fmin, the centre and fmax,
and its extremes.
kicad2ems.core.pipeline.unknown_note(S, names)[source]
'; not computed (written as 0): S(P2,P2), ...' for the Touchstone header:
the terms that are NaN (ports not driven, or no path between two ports in
the line model), which a Touchstone file cannot leave out.