differt.em.AbstractAntenna#

class AbstractAntenna(frequency, *, center=<factory>)[source]#

Bases: BaseAntenna

Abstract base class for antennas.

Attributes

angular_frequency

The angular frequency \(\omega = 2 \pi f\).

aperture

The aperture \(A\) of an isotropic antenna.

period

The period \(T = 1/f\).

reference_power

The reference power (W) radiated by this antenna.

wavelength

The wavelength \(\lambda = c / f\).

wavenumber

The wavenumber \(k = \omega / c\).

frequency

The frequency \(f\) at which the antenna is operating.

center

The center position of the antenna, from which the fields are radiated.

Methods

directive_gain([num_points])

Compute an estimate of the antenna directive gain.

directivity([num_points])

Compute an estimate of the antenna directivity for azimuthal and elevation angles.

fields(r[, t])

Compute electric and magnetic fields in vacuum at given position and (optional) time.

plot_radiation_pattern([num_points, ...])

Plot the radiation pattern (normalized power) of this antenna.

poynting_vector(r[, t])

Compute the Poynting vector in vacuum at given position and (optional) time.

wavefront_radii(k_hat)

Return the radii of curvature of the wavefront this antenna emits, in the given direction(s).

Detailed documentation

property angular_frequency: Float[Array, ''][source]#

The angular frequency \(\omega = 2 \pi f\).

property aperture: Float[Array, ''][source]#

The aperture \(A\) of an isotropic antenna.

center: Float[Array, "3"]#

The center position of the antenna, from which the fields are radiated.

Default value is the origin.

directive_gain(num_points=int(1e2))[source]#

Compute an estimate of the antenna directive gain.

Note

Subclasses may provide a more accurate or exact implementation.

Parameters:

num_points (int) – The number of points used for the estimate.

Return type:

Float[Array, ""]

Returns:

The antenna directive gain.

See also

directivity

directivity(num_points=int(1e2))[source]#

Compute an estimate of the antenna directivity for azimuthal and elevation angles.

Note

Subclasses may provide a more accurate or exact implementation.

Parameters:

num_points (int) –

The number of points to sample along the elevation axis.

Twice this number of points are sampled on the azimuthal axis.

Return type:

tuple[Float[Array, "2*{num_points}"], Float[Array, "{num_points}"], Float[Array, "2*{num_points} {num_points}"]]

Returns:

Azimuthal and elevation angles, as well as corresponding directivity values.

See also

directive_gain

abstractmethod fields(r, t=None)[source]#

Compute electric and magnetic fields in vacuum at given position and (optional) time.

Parameters:
Return type:

tuple[Inexact[Array, "*batch 3"], Inexact[Array, "*batch 3"]]

Returns:

The electric \(\vec{E}\) and magnetic \(\vec{B}\) fields.

Fields can be either real or complex-valued.

frequency: Float[Array, ""]#

The frequency \(f\) at which the antenna is operating.

property period: Float[Array, ''][source]#

The period \(T = 1/f\).

plot_radiation_pattern(num_points=int(1e2), distance=1.0, num_wavelengths=None, **kwargs)[source]#

Plot the radiation pattern (normalized power) of this antenna.

The power is computed on points on a sphere around the antenna.

Parameters:
  • num_points (int) –

    The number of points to sample along the elevation axis.

    Twice this number of points are sampled on the azimuthal axis.

  • distance (Float[ArrayLike, ""]) – The distance from the antenna at which power samples are evaluated.

  • num_wavelengths (Float[ArrayLike, ""] | None) – If provided, supersedes distance by setting the distance relatively to the wavelength.

  • kwargs (Any) – Keyword arguments passed to draw_surface.

Return type:

Any

Returns:

The resulting plot output.

poynting_vector(r, t=None)[source]#

Compute the Poynting vector in vacuum at given position and (optional) time.

Parameters:
Return type:

Inexact[Array, "*batch 3"]

Returns:

The Poynting vector \(\vec{S}\).

It can be either real or complex-valued.

abstract property reference_power: Float[Array, ''][source]#

The reference power (W) radiated by this antenna.

This is the maximal value of the Poynting vector at a distance of one meter from this antenna, multiplied by the area of the sphere (\(4\pi\)), to obtain a power.

wavefront_radii(k_hat)[source]#

Return the radii of curvature of the wavefront this antenna emits, in the given direction(s).

This is an offset distance (or pair of distances) – the same quantity as, and with the same sign convention as, tx_wavefront_radii – added to the geometric path length by GeometricFieldSolver.spreading_factor, rather than the (generally much larger, and direction-independent only for an isotropic source) total radius of curvature at some distant observation point. GeometricFieldSolver.compute_fields calls this with the direction of the first path segment (leaving the transmitter) whenever tx_polarization is set to an AbstractAntenna instance, using the result instead of the solver’s own tx_wavefront_radii attribute.

A single position-like argument cannot, by itself, encode an astigmatic wavefront’s orientation (its two principal radii apply along two specific, generally direction-dependent axes, not just “the wavefront’s curvature at that point”); this is why the argument here is the propagation direction rather than a position – see the (rho_s, s_hat, rho_p, p_hat) return case below.

Parameters:

k_hat (Float[ArrayLike, "*#batch 3"]) – The (unit-length) direction of propagation away from this antenna, towards the observation point.

Return type:

Float[Array, "*batch"] | tuple[Float[Array, "*batch"], Float[Array, "*batch 3"], Float[Array, "*batch"], Float[Array, "*batch 3"]] | None

Returns:

None for a planar wavefront (the far-field, plane-wave approximation – see AbstractFarFieldAntenna); a single value for an isotropic (spherical) wavefront, the same in every direction; or a (rho_s, s_hat, rho_p, p_hat) 4-tuple for a general astigmatic wavefront, where rho_s and rho_p are the two principal radii and s_hat/p_hat are unit vectors (orthogonal to k_hat and to each other) giving the direction each one applies along – the same (explicit vector pair, rather than a bare angle) convention used elsewhere in this module for a local s-/p-plane basis, see sp_directions and sp_rotation_matrix (which a subclass reporting an astigmatic wavefront can reuse to derive s_hat/p_hat from k_hat and its own fixed reference axis, e.g. Dipole.moment, exactly as sp_directions derives a local basis from a ray direction and a surface normal).

The default implementation returns 0 for every direction, i.e., an ideal point source located exactly at this antenna’s center (no offset at all).

property wavelength: Float[Array, ''][source]#

The wavelength \(\lambda = c / f\).

property wavenumber: Float[Array, ''][source]#

The wavenumber \(k = \omega / c\).