kicad2ems.gui.filtertab

The Filter page: design a microstrip filter with dfsynth (its own package: the
filter extra), see its layout, dimensions and line-model response, validate it
on the solvers and tune it from them, and open the board it wrote as a kicad2ems
config.

dfsynth runs as a separate process, as kicad2ems runs do: the page follows its
output, and reads what it wrote when it ends (<out>_design.json: the spec, the
dimensions, the layout; <out>_model.s2p; each validation round's S-parameters in
<out>_em/, <out>_em_tune1/, ...). The page never imports dfsynth: its types and
topologies, its substrate presets and its options come from `dfsynth --describe
--json`, so the command line is its only link.

    describe()         dfsynth's description (types, presets, options), or None
                       when it cannot run here
    filter_argv(vals)  dfsynth's command line for the page's settings
    load_design(base)  what a dfsynth run wrote under <base>: design, model and
                       EM responses
    line_level(line)   'error', 'warn' or None: how the page's log shows a line
                       of dfsynth's output
class kicad2ems.gui.filtertab.FilterTab(win=None)[source]
dfsynth's settings on the left; the layout, the responses, the dimensions
and the log on the right.
open_in_kicad2ems()[source]
The board's config in the main window's settings (which previews
it).
progress(text, ms=0)[source]
Where a run is up to: the main window's status bar (and the log).
say(text, level=None, first=True, count=True)[source]
Text into the log; an 'error' or 'warn' in bold red, marked, counted
on the tab (and an error brings the log forward). `first` False: the
rest of a message already marked (and counted).
show_result(res)[source]
A dfsynth run's design, layout and responses into the views.
stop()[source]
Asks a kicad2ems run dfsynth started to stop (the STOP file its
solvers check), and ends dfsynth.
values()[source]
The settings as dfsynth's values (empty fields: None, its
defaults).
kicad2ems.gui.filtertab.describe(python=None)[source]
dfsynth's description, from `dfsynth --describe --json` in this Python
(or `python`): {'kinds': {type: [topologies]}, 'presets': {name: {h, er,
tand, material}}, 'options': [{key, flag, kind, default, choices, help,
group}]}. None when dfsynth cannot run there: not installed, too old to
describe itself, or describing itself in another format (why_not says
which). Asked once.
kicad2ems.gui.filtertab.filter_argv(vals, validate=True, desc=None)[source]
dfsynth's command line (after the interpreter) for the page's values;
None / '' leave dfsynth's default. validate False: the design only (no
--validate, --em-tune, --k2e-args). desc: dfsynth's description (default:
describe()); a value of no option it has is left out.
kicad2ems.gui.filtertab.line_level(line, after=None)[source]
'error', 'warn' or None for a line of dfsynth's output; `after` the
previous line's level (an error's indented lines, a traceback's, are the
error too).
kicad2ems.gui.filtertab.load_design(base)[source]
What dfsynth wrote under <base>, or None: {'design': the design JSON,
'model': (f, S) of the line model, 'em': [(round, {solver: (f, S)})], 'pcb',
'toml'}.
kicad2ems.gui.filtertab.options(desc)[source]
{key: option} of a description, in dfsynth's order.
kicad2ems.gui.filtertab.summary_text(d, notes=True)[source]
The design JSON as text: the spec, the calibration, the line model's and
each validation round's figures.
kicad2ems.gui.filtertab.why_not(python=None)[source]
Why describe() gave None, as the page says it ('' when it did not).