kicad2ems.mom25d.run¶
mom25d.run - solve a Simulation over a band and return S-parameters at the
output reference impedances.
f, S, info = solve_band(sim, 1e9, 6e9, points=401, zref=[50, 50])
Adaptive by default (rational fit through as few EM solves as the tolerance
allows, sampled on `points` frequencies); linear=N solves at N equally spaced
frequencies instead. S is renormalised from each port's characterised line
impedance (wave ports) or its own impedance (lumped ports) to zref.
- kicad2ems.mom25d.run.out_refs(sim, z0)[source]¶
Output reference per (modal) port: z0 (a number, or {port name: ohms}) single-ended, 2 z0 differential, z0 / 2 common.
- kicad2ems.mom25d.run.renorm(S, zc, zref)[source]¶
Renormalise S from reference impedances zc to zref (scalars or per-port, real).
- kicad2ems.mom25d.run.solve_band(sim, fmin, fmax, points=401, zref=50.0, linear=None, afs_tol=0.002, max_solves=40, log=<built-in function print>, keep_mid=False, progress=None, on_step=None, keep_at=(), freq=None)[source]¶
S-parameters of sim over fmin..fmax (Hz): returns (f, S (nf, n, n), info dict with solves, seconds, zref, the solved frequencies, and afs / afs_tol: the adaptive sweep's history (emsdev.afs.adaptive_sweep) and tolerance). max_solves: cap of the adaptive sweep. keep_mid: one extra solve at mid-band keeping the currents (sim.last). progress(solves, at most, f): after each EM solve. on_step(entry): after each model of the adaptive sweep (emsdev.afs.adaptive_sweep). keep_at: frequencies (Hz) the sweep solves among its samples and keeps the currents of, sim.kept {f: currents of the excitations} (a current dump's: no solve of its own). freq: the frequencies asked for (Hz): the adaptive sweep's model is given there (a log sweep's samples spread in log f), in place of `points` spread linearly.