differt.em.RadiationPattern#

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

Bases: BaseAntenna

An antenna radiation pattern class, must be subclassed.

Attributes

angular_frequency

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

aperture

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

period

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

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.

plot_radiation_pattern([num_points, ...])

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

polarization_vectors(r)

Compute s and p polarization vectors.

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

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.

abstractmethod polarization_vectors(r)[source]#

Compute s and p polarization vectors.

Parameters:

r (Float[ArrayLike, '*#batch 3']) – The array of positions.

Return type:

tuple[Float[Array, '*batch 3'], Float[Array, '*batch 3']]

Returns:

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

Fields can be either real or complex-valued.

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

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

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

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