kicad2ems.fdtd.antenna

Antenna mode on an FDTD engine: one excited port, absorbing boundaries, a
quarter wavelength of air and a near-field to far-field (NF2FF) box recorded at
a set of frequencies; after the run, the far field analysed (fields/antenna.py:
match, gain, polarisation, patterns).

A phased drive (--drive several ports) is one run per driven port, the others
terminated: an incident wave on that port alone. Each run's far field divided by
its incident wave is the field per unit wave, so any drive a is sum_k a_k E_k,
exact at every recorded frequency and with the coupling between the elements
(phased.py's incident basis). run_phased runs them; combine_phased gives the
drive's antenna result and the array file the GUI steers.
kicad2ems.fdtd.antenna.analyse(m, freq, ffr, ff_pattern=None, step=2.0, log=<built-in function print>, *, path, ports, token, k, col)[source]
Run hook (analyse=): input match, gain over frequency and the pattern
cuts from a finished antenna run (token: the NF2FF box). Returns the result
dict.
kicad2ems.fdtd.antenna.analyse_port(m, ffr, step, *, path, ports, token, k, col)[source]
Run hook of a phased drive's run (port k driven): its far field per unit
incident wave at every recorded frequency, on the coarse sphere (Eth, Eph:
(nf, nphi, ntheta)) and the cut planes (cuts: {name: (Et, Ep)}, (nf,
angles)). The incident wave is uf_inc / sqrt(Z_ref) at the port
(CalcPort).
kicad2ems.fdtd.antenna.antenna_air(fmin, fmax, air=None)[source]
Air margin (mm) of antenna runs: lambda / 4 at the band centre, at least
5 mm (unless given).
kicad2ems.fdtd.antenna.combine_phased(m, freq, res, a, excite, ff_pattern=None, step=2.0, log=<built-in function print>, pos=None)[source]
The antenna of drive a (incident waves, one per port of m.ports) from
run_phased's runs: (result dict as analyse's, with drive, peak and
active_db, and the array data for phased.save). The pattern frequency: the
given one, else the resonance of the first driven port's active
reflection.
kicad2ems.fdtd.antenna.cut_grids(step)[source]
The pattern cuts' angles: theta from -180 to 180 (deg) in the xz and yz
planes, phi round at theta 90.
kicad2ems.fdtd.antenna.exc_fmax(fmin, fmax)[source]
Upper edge of the antenna runs' excitation: 30 % of the band beyond
fmax.
kicad2ems.fdtd.antenna.nf2ff_box(freqs)[source]
Run hook (run.run_excitations setup=): an NF2FF box recording at `freqs`
(Hz).
kicad2ems.fdtd.antenna.record_freqs(fmin, fmax, extra=(), n=21)[source]
Frequencies (Hz) at which the NF2FF box records: n over the band plus any
given ones.
kicad2ems.fdtd.antenna.run_antenna(m, mesh, freq, k, bc, out_dir, ff_extra=(), ff_pattern=None, step=2.0, log=<built-in function print>, **run_kw)[source]
FDTD run with port k excited and an NF2FF box: run.run_excitations with
the antenna hooks. The excitation reaches 30 % of the band beyond fmax: in
the top ~15 % of a Gaussian's band (its -20 dB edge) the far field came out
wrong (dipole: 6.3 dBi and 107 % efficiency at fmax). Returns the RunResult;
RunResult.extra[port name] holds the antenna results.
kicad2ems.fdtd.antenna.run_phased(m, mesh, freq, excite, bc, out_dir, ff_extra=(), step=2.0, log=<built-in function print>, jobs=1, **run_kw)[source]
The runs of a phased drive: each port of excite driven once, with an
NF2FF box (analyse_port). Returns the RunResult; RunResult.extra[port name]
holds each run's far field per unit incident wave.