differt.em.AbstractAntenna#
- class AbstractAntenna(frequency, *, center=<factory>)[source]#
Bases:
BaseAntennaAbstract base class for antennas.
Attributes
The angular frequency \(\omega = 2 \pi f\).
The aperture \(A\) of an isotropic antenna.
The period \(T = 1/f\).
The reference power (W) radiated by this antenna.
The wavelength \(\lambda = c / f\).
The wavenumber \(k = \omega / c\).
The frequency \(f\) at which the antenna is operating.
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
-
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:
- Returns:
The antenna directive gain.
See also
- 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
- abstractmethod fields(r, t=None)[source]#
Compute electric and magnetic fields in vacuum at given position and (optional) time.
- Parameters:
r (
Float[ArrayLike, "*#batch 3"]) – Position vector relative to the antenna center.t (
Float[ArrayLike, "*#batch"]|None) –Time instant.
If not provided, initial time instant is assumed.
- 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.
- 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, supersedesdistanceby setting the distance relatively to thewavelength.kwargs (
Any) – Keyword arguments passed todraw_surface.
- Return type:
- Returns:
The resulting plot output.
- poynting_vector(r, t=None)[source]#
Compute the Poynting vector in vacuum at given position and (optional) time.
- Parameters:
r (
Float[ArrayLike, "*#batch 3"]) – Position vector relative to the antenna center.t (
Float[ArrayLike, "*#batch"]|None) –Time instant.
If not provided, initial time instant is assumed.
- Return type:
- 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 byGeometricFieldSolver.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_fieldscalls this with the direction of the first path segment (leaving the transmitter) whenevertx_polarizationis set to anAbstractAntennainstance, using the result instead of the solver’s owntx_wavefront_radiiattribute.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:
Nonefor a planar wavefront (the far-field, plane-wave approximation – seeAbstractFarFieldAntenna); 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, whererho_sandrho_pare the two principal radii ands_hat/p_hatare unit vectors (orthogonal tok_hatand 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, seesp_directionsandsp_rotation_matrix(which a subclass reporting an astigmatic wavefront can reuse to derives_hat/p_hatfromk_hatand its own fixed reference axis, e.g.Dipole.moment, exactly assp_directionsderives a local basis from a ray direction and a surface normal).The default implementation returns
0for every direction, i.e., an ideal point source located exactly at this antenna’scenter(no offset at all).
-
center: