kicad2ems.gui.powercircuittab

The Circuit page: a circuit model (pcbqs.circuit's, format 2: any circuit of
parts, nodes and drives) as a schematic to edit, and as JSON.

A model comes from a file: a study's config names it ([analysis.circuit] model =
"buck.json", a path beside the config), and the circuits to start from are
examples like any other, under File > Examples > Circuits. Saving the study
writes the model back beside its config.

The page is the model's editor only. Its settings are a panel made from the
circuit analysis's options, as every analysis's are
(analysispanel.AnalysisPanel: the tools' own tables, `--describe`), in the Study
dock when the page is the window's. Under them, a section Model has the values
the model itself holds: its parameters and its sweep. A run is the analysis's
command on the model as edited (written into the run's folder); what it leaves
is shown where every result is: its report, tables and waveforms on the Results
page, its fields in the Viewer, its log on the Run page.
class kicad2ems.gui.powercircuittab.PowerCircuitTab(win=None, analysis=None)[source]
blank()[source]
The page as a new circuit: no parts, no file (blank()).
board_path()[source]
The PCB named here, else the study's board (the window's
settings).
is_blank()[source]
No parts on the page (a new circuit's, or every part removed).
load_model(path=None)[source]
A model from a file (asked for when none is named): its libraries and
its board, named beside it, found from where it is. True when it
loaded.
load_settings(tab, keep_model=False)[source]
A config's [analysis.circuit] table (its paths already whole): the
model it names, the options it sets (the copper and fields ticks), a
board and a folder of its own. An empty one: the page as it opens;
keep_model (a proposal that names no model, only settings for it): the
model on the page stays; else no model named: the page is blank (a new
circuit). A model that will not load (not a circuit model): the page is
blank, and the config keeps naming that file, which nothing writes over
until another model is loaded, started or edited.
open_run(folder)[source]
A run's folder is the one shown (picked in Runs): what the
others may start from. False: it holds no circuit result.
run_tag()[source]
A run's name: the model file's, else the model's own.
save_settings(config)[source]
What the config at `config` holds of the circuit, {key: value} (paths
relative to it), the model written as a file: the one it came from, else
<config>_circuit.json beside the config. A blank page: no model, nor a
file of one. {}: the page was never given a model and the analysis is
not asked, so the study has no circuit.
set_model(c, diagram=True)[source]
A model into the page; a ValueError for one that is not a circuit
model (format 2).
settings_panel()[source]
The settings out of the page, for the window's Study dock (its Run
starts the run then).
show_examples()[source]
The window's menu of the circuit examples (File > Examples), here
where a circuit is started.
shown()[source]
The settings the page shows: the options' keys, and the model's
parameters and sweep.
static sweep_of(text)[source]
'parameters.vin: 9, 12; R1.resistance_ohm: 24, 48' as the model's
sweep.
classmethod template(name)[source]
A model to start from: one of pcbqs.circuit's examples ('simple' is
its boost converter).
static templates()[source]
pcbqs's example circuits: {name: what it is}; none from a pcbqs
without pcbqs.circuit.
values()[source]
The model as edited: the JSON, with its parameters and sweep as typed
in their fields.
write_model(path, c=None)[source]
The model as a file: its board named relative to it when it is beside
it (a study's folder moves whole).