kicad2ems.fem.palace.antenna

Antenna mode with Palace: the far field of one driven port, and from it what
kicad2ems's other solvers report (kicad2ems.core.fields.antenna: match,
directivity, efficiency, gain, polarisation, pattern cuts and the sphere).

Palace integrates the fields on the air box's faces to the far field r E at
given angles (its FarField postprocessing), in a second run at a few frequencies
over the band and the pattern frequency, the antenna's port alone driven:

    # the sphere every 5 deg and the three cuts every `step`
    ang = angles(step)
    ...config(mdl, ffr, tol=0, excite=[k], farfield=ang,
              out='postpro_ff'), run...
    ant, sphere = analyse(ffr, s11, pinc, th, ph, E, step, f_pattern)

The model is the finite board in air: its edges and its back radiate. The
accepted power is the incident wave's less the reflected, so the efficiency
counts what the dielectric (and, with --palace-loss, the copper) absorbs.
kicad2ems.fem.palace.antenna.analyse(ffr, s11, pinc, theta, phi, E, step=2.0, f_pattern=None)[source]
The antenna result of a far-field run. ffr (nf,) Hz; s11, pinc (nf,) the
driven port's reflection and incident power (run.read_incident); theta, phi
(n,), E (nf, n, 3): Palace's r E (run.read_farfield). Returns (ant, sphere):
the result dict without the match (rows, f_pattern, cuts, sphere) and the
sphere file's arrays (theta, phi, freq, dmax, prad, e_norm (nf, nphi,
ntheta)).
kicad2ems.fem.palace.antenna.angles(step=2.0)[source]
The (theta, phi) pairs (deg) asked of Palace: the sphere and the cuts,
each direction once.
kicad2ems.fem.palace.antenna.cut_angles(step)[source]
The pattern cuts: theta from -180 to 180 in the xz and yz planes, phi
round at theta = 90 (deg).
kicad2ems.fem.palace.antenna.spherical(E, theta, phi)[source]
(E_theta, E_phi) of Cartesian far fields E (..., n, 3) at the angles
theta, phi (n,), deg.