kicad2ems.core.fields.antenna¶
Antenna mode: one excited port, absorbing (PML) boundaries on all six sides, a
near-field to far-field (NF2FF) box recorded at a set of frequencies, and after
the run:
input match S11, input impedance, resonance (minimum |S11|), -10 dB
bandwidth
over frequency directivity, radiation efficiency (Prad / accepted power),
gain, realized gain (Prad / incident power) at the recorded
frequencies
polarisation at each recorded frequency's gain maximum: the axial ratio,
the sense (RHCP / LHCP, IEEE: seen from behind, the field
turning clockwise is right-handed) and the gain in each hand
patterns gain in the xz (phi = 0) and yz (phi = 90 deg) planes and the
xy plane (theta = 90), and a 3D pattern, at the pattern
frequency (default: the resonance)
Coordinates are those of the model (x right, y up as seen from the top of the
board, z out of the board's top side), so phi = 0 is +x, theta = 0 is the
board's top-side normal.
- kicad2ems.core.fields.antenna.add_polarisation(rows, E_theta, E_phi, theta, phi, phi_first=False)[source]¶
Each gain_table row with its polarisation at the maximum: AR_db, sense (RHCP, LHCP, or linear above 20 dB), G_rhcp_dbi, G_lhcp_dbi, peak direction (theta, phi deg).
- kicad2ems.core.fields.antenna.describe(match, rows, f_pat)[source]¶
The log lines of an antenna result: the match (match_summary), then a row per recorded frequency (gain_table, with add_polarisation's columns when they are there), the pattern frequency f_pat marked.
- kicad2ems.core.fields.antenna.gain_table(ff_freq, dmax, prad, p_acc, p_inc)[source]¶
Per recorded frequency: directivity, efficiency, gain and realized gain (linear and dBi).
- kicad2ems.core.fields.antenna.match_summary(freq, s11, z0)[source]¶
Resonance (minimum |S11|), its S11 in dB, input impedance there and the -10 dB band around it.
- kicad2ems.core.fields.antenna.pattern_gain(E_norm, dmax, eff)[source]¶
Gain (linear) over a pattern grid from the far-field magnitude: D = (|E| / |E|max)^2 Dmax.
- kicad2ems.core.fields.antenna.polarisation(E_theta, E_phi, theta, phi, phi_first=False)[source]¶
Axial ratio (dB), sense and the right- / left-hand shares of the power at the far field's maximum (E_theta, E_phi complex on the theta x phi grid, or phi x theta with phi_first; theta, phi in degrees): E = E_R (t - j p) / sqrt 2 + E_L (t + j p) / sqrt 2 for exp(j w t). Linear polarisation has an infinite axial ratio (capped at 60 dB).
- kicad2ems.core.fields.antenna.read(path)[source]¶
An antenna run's results (save's file), checked: ValueError when this kicad2ems cannot read it.
- kicad2ems.core.fields.antenna.read_sphere(path)[source]¶
The full-sphere far field of an antenna run (<run>/nf2ff_sphere.h5, written by analyse) -> dict(theta, phi (deg), freq (Hz), dmax (linear), prad, e_norm (nf, nphi, ntheta) |E| far field).
- kicad2ems.core.fields.antenna.save(res, path)[source]¶
JSON summary (without the 3D sphere), stamped kicad2ems-antenna (formats.py).