API Reference
This API reference is a comprehensive list of public types and public functions. Any change in the documented signature of these functions or methods is considered "breaking" and will trigger an increase in the "major" version number.
All types or functions which are not mentioned on this page are considered private to AntennaFieldRepresentations.jl. Private functions can vary drastically between minor version updates and the enduser should not rely on these internal functions and types.
Public Types
AntennaFieldRepresentations.AbstractSphericalCoefficients — Type
AbstractSphericalCoefficients{C <: Number }Supertype for collections of spherical coefficients.
Can be accessed like an AbstractVector{C} with a single index j or with a triple index (s,ℓ,m), where j = 2 * (ℓ * (ℓ + 1) + m - 1) + s.
AntennaFieldRepresentations.AntennaFieldRepresentation — Type
AntennaFieldRepresentation{P <: PropagationType, C <: Number} <: AbstractVector{C}Equivalent representation of the electromagnetic fields of an antenna (in a certain region of space where the representation converges).
Each instance of AntennaFieldRepresentation is a discretized version of the antenna fields, i.e., a collection of coefficients from which the antenna fields can be (approximately) calculated. The coefficents of the field representation can be accessed via the interface of AbstractVector{C}. In addition to the field coefficients, each instance of AntennaFieldRepresentation stores additional information which allows to calculate the electromagnetic fields from the coefficient vector. In particular, the wavenumber of the radiation frequency of the antenna field is stored.
AntennaFieldRepresentations.ChangeRepresentationMap — Type
ChangeRepresentationMap{A, B, C} <: LinearMaps.LinearMap{C}Supertype for linear map which corresponds to a changerepresentation method.
Type Parameters
A <: AntennaFieldRepresentation: Type of the original representationB <: AntennaFieldRepresentation: Type of the target representationC <: Complex
AntennaFieldRepresentations.DipoleArray — Type
DipoleArray{P, E, T, C} <: AntennaFieldRepresentation{P, C}Array of multiple small dipoles.
Behaves like an AbstractVector{C} with extra context.
Type Parameters
P <: PropagationTypeE <: ElmagTypeT <: NumberC <: Number
AntennaFieldRepresentations.ElmagType — Type
ElmagTypeIndicator for Electric or Magnetic type field expansions.
AntennaFieldRepresentations.FieldSampling — Type
FieldSampling{C}Abstract type for various field samplings.
AntennaFieldRepresentations.FirstOrderSphericalCoefficients — Type
FirstOrderSphericalCoefficients{C} <: AbstractSphericalCoefficients{C}Sparse representation of a collections of only first-order coefficients for a spherical wave expansion.
Can be accessed like an AbstractVector{C} with a single index j or with a triple index (s,ℓ,m), where j = 2 * (ℓ * (ℓ + 1) + m - 1) + s. All coefficients with m ≠ ± 1 are zero by definition.
Examples
values=ComplexF64.(collect(1:16))
sph_coefficients= SphericalCoefficients(values)
firstorder_sph_coefficients = FirstOrderSphericalCoefficients(sph_coefficients)
println(firstorder_sph_coefficients[1, 2, -1])
firstorder_sph_coefficients[1, 2, -1] = 111.0 im
println(firstorder_sph_coefficients[9])AntennaFieldRepresentations.FirstOrderSphericalCoefficients — Method
FirstOrderSphericalCoefficients(coefficients::SphericalCoefficients)Return sparse representation of a collections of only first-order spherical coefficients. All non-first-order coefficients (index m ≠ ±1) are dropped and treated as zero.
Examples
values=ComplexF64.(collect(1:16))
sph_coefficients= SphericalCoefficients(values)
firstorder_sph_coefficients = FirstOrderSphericalCoefficients(sph_coefficients)
println(firstorder_sph_coefficients[1, 2, -1])
println(firstorder_sph_coefficients[1, 2, -2])AntennaFieldRepresentations.FitzgeraldArray — Type
FitzgeraldArray{T, C}Alias for DipoleArray{Radiated,Magnetic,T,C}
A FitzgeraldArray is used to represent an array of multiple small radiating magnetic dipoles. Behaves like an AbstractVector{C} with extra context.
Type Parameters
T <: NumberC <: Number
AntennaFieldRepresentations.GaussLegendreθRegularϕSampling — Type
GaussLegendreθRegularϕSampling <: SphereSamplingStrategySampling strategy on the sphere with regular sampling along ϕ and Gauß-Legendre-Sampling along θ.
ϕ ∈ {0, Δϕ, …, 2π - Δϕ} with Δϕ= 2π / (2L + 2). θ ∈ {acos(xᵢ)} where xᵢ are the Nθ-point Gauß-Legendre quadrature points.
Fields
Nθ::IntegerJϕ::Integer
AntennaFieldRepresentations.HertzArray — Type
HertzArray{T, C}Alias for DipoleArray{Radiated,Electric,T,C}
A HertzArray is used to represent an array of multiple small radiating electric dipoles. Behaves like an AbstractVector{C} with extra context.
Type Parameters
T <: NumberC <: Number
AntennaFieldRepresentations.InterpolateMap — Type
InterpolateMap{Y, T} <: OperationMap{T}Abstract supertype for linear maps which performs an interpolation of predefined sampling points from spherically sampled data.
Type parameters:
Y :: SphereSamplingStrategy: Defines the sampling points of the spherically sampled original data.T <: Real: Defines the number type to represent interpolation parameters, e.g.Float64orFloat32.
AntennaFieldRepresentations.IrregularFieldSampling — Type
IrregularFieldSampling{N, T, C}Field sampling with arbitrary probes at irregularly distributed measurement positions.
Type Parameters
N <: ProbeAntennaT <: RealC <: Complex
AntennaFieldRepresentations.IrregularFieldSampling — Method
IrregularFieldSampling(positions::Array{V}, eulerangles::Array{D}, probeIDs::Array{<:Integer}, probes::Vector{P}) where{V, D, P<:ProbeAntenna}Returns an IrregularFieldSampling struct for sampling an AntennaFieldRepresentation with arbitrary probes at irregularly distributed measurement positions.
Inputs:
positions::Array{V}: An array of 3D position vectors. Julia must be able toconvertthe typeVinto anSVector{3,T<:Real}.eulerangles::Array{D}: An array of 3-Tuples denoting the Euler anglesχ,ϑ, and ,φfor rotating the probe antenna at each sample position. The definition of the Euler angles is aligned with their definition in therotatefunction. Julia must be able toconvertthe typeDinto aTuple{T,T,T}}.probeIDs::Array{<:Integer}: Array of probeIDs (= indices) to assign a probe from the listprobesto each sample.probes::Vector{P<:ProbeAntenna}: Vector of probe antennas which occur in the field sampling
AntennaFieldRepresentations.LocalθLocalϕInterpolateMap — Type
LocalθLocalϕInterpolateMap{Y,orderθ,orderϕ,T} <: InterpolateMap{Y,T}Linear map which performs a local interpolation of predefined sampling points from spherically sampled data.
Type parameters
Y :: SphereSamplingStrategy: Defines the sampling points of the spherically sampled original data.orderθ: Integer which defines the interpolation order along θ.orderϕ: Integer which defines the interpolation order along ϕ.T <: Real: Defines the number type to represent interpolation parameters, e.g.Float64orFloat32.
AntennaFieldRepresentations.MLFMMSource — Type
MLFMMSource{A,M,Y,C,X} <: AntennaFieldRepresentation{Radiated,C}MLFMM representation of the contained Radiated AntennaFieldRepresentation.
Behaves like an AbstractVector{C} with extra context.
Type Parameters
A <: AntennaFieldRepresentation: Type of the contained field representationM<:ResampleMap: Type of the resample map to aggregate the internal plane wave representationsY <: SphereSamplingStrategy: Sampling strategy for the internal plane wave representationsC <: NumberX <: MLFMMTree: Type of the underlying tree structure
AntennaFieldRepresentations.OperationMap — Type
OperationMap{C} <: LinearMaps.LinearMap{C}Supertype for function-like object which corresponds to a certain method acting on an AntennaFieldRepresentation.
Type Parameters
C <: Complex
AntennaFieldRepresentations.PlaneWaveExpansion — Type
PlaneWaveExpansion{P,Y,C} <: AntennaFieldRepresentation{P,C}Collection of electromagnetic plane waves propagating into various directions.
Behaves like an AbstractVector{C} with extra context.
Type Parameters
P <: PropagationTypeY <: SphereSamplingStrategy: Defines the propagation directions of the stored plane wave samplesC <: Number
AntennaFieldRepresentations.PlaneWaveExpansion — Method
PlaneWaveExpansion(P, samplingstrategy, Eθ, Eϕ, wavenumber)Returns a collection of electromagnetic plane waves propagating into various directions.
Arguments:
P::PropagationType: Radiated(), Incident(), or Absorbed()samplingstrategy<:SphereSamplingStrategy: sampling strategy which defines the propagation directions of the plane wave samplesEθ::Matrix{C}: θ-component amplitudes of the plane wavesEϕ::Matrix{C}: ϕ-component amplitudes of the plane waveswavenumber: wavenumber
AntennaFieldRepresentations.ProbeAntenna — Type
ProbeAntenna{A}Wrapper around an AntennaFieldRepresentation to indicate that it is used as a probe.
Type Parameters
A <: AntennaFieldRepresentation
AntennaFieldRepresentations.PropagationType — Type
PropagationTypeIndicator for Radiated, Absorbed, or Incident type field expansions.
AntennaFieldRepresentations.RegularθRegularϕSampling — Type
RegularθRegularϕSampling <: SphereSamplingStrategyA regular sampling strategy on the sphere has samples equiangularly distributed along the θ- and ϕ-coordinates.
ϕ ∈ {0, Δϕ, …, 2π - Δϕ} with Δϕ= 2π / Jϕ. θ ∈ {0, Δθ, …, π - Δθ / 2} if Jθ is odd or θ ∈ {0, Δθ, …, π} if Jθ is even with Δθ = 2π / Jθ if Jθ.
Fields:
Jθ :: IntegerJϕ :: Integer
AntennaFieldRepresentations.SphereSamplingStrategy — Type
SphereSamplingStrategySupertype for sampling strategies on a sphere.
AntennaFieldRepresentations.SphericalCoefficients — Type
SphericalCoefficients{C} <: AbstractSphericalCoefficients{C}Collections of coefficients for a spherical wave expansion.
Can be accessed like an AbstractVector{C} with a single index j or with a triple index (s,ℓ,m), where j = 2 * (ℓ * (ℓ + 1) + m - 1) + s.
Examples
values=ComplexF64.(collect(1:16))
sph_coefficients= SphericalCoefficients(values)
println(sph_coefficients[9])
println(sph_coefficients[1, 2, -1])
sph_coefficients[1, 2, -1] = 111.0im
println(sph_coefficients[9])AntennaFieldRepresentations.SphericalFieldSampling — Type
SphericalFieldSampling{Y,H,C} <: FieldSampling{C}Field sampling on spherical measurement surface with measurement positions distributed according to a SphereSamplingStrategy.
Type Parameters
Y <: SphereSamplingStrategyH <: AbstractSphericalCoefficientsC <: Complex
AntennaFieldRepresentations.SphericalTransmitMap — Type
SphericalTransmitMap{S,F,C} <: TransmitMap{S,F,C}Linear map which corresponds to a transmit method between a SphericalWaveExpansion{Radiated} and a SphericalFieldSampling.
Type Parameters
S <: SphericalWaveExpansion{Radiated}F <: SphericalFieldSamplingC <: Complex
AntennaFieldRepresentations.SphericalWaveExpansion — Type
SphericalWaveExpansion{P,H,C} <: AntennaFieldRepresentation{P, C}Representation of an electromagnetic field as superposition spherical vector wave functions.
Behaves like an AbstractVector{C} with extra context.
Type parameters
P <: PropagationTypeH <: AbstractSphericalCoefficients{C <: Number}: defines how the spherical coefficients are ordered in memory.C <: Complex
AntennaFieldRepresentations.SurfaceCurrentDensity — Type
SurfaceCurrentDensity{P <: PropagationType, E <: ElmagType, S <: BEAST.Space{<: Real} , C} <: AntennaFieldRepresentation{P, C}Representation of an electromagnetic field via equivalent surface currents.
Behaves like an AbstractVector{C} with extra context. The type parameter E defines if electric or magnetic surface current density.
AntennaFieldRepresentations.TransmitMap — Type
TransmitMap{A, F, C} <: OperationMap{C}Supertype for function-like object which corresponds to a transmit method.
Type Parameters
A <: AntennaFieldRepresentationF <: FieldSamplingC <: Complex
Public Functions
AntennaFieldRepresentations.EfieldSampling — Method
EfieldSampling(positions::Vector{V})Returns an IrregularFieldSampling struct for sampling the electric field of an AntennaFieldRepresentation at given positions with Hertzian dipole probes.
For an input vector positions containing N position entries, the resulting IrregularFieldSampling provides the S₂₁-measurement signal in a N × 3 matrix, where the coloumns correspond to the x-, y-, and z-component of the E-field, respectively.
Input:
positions::Vector{V}: A vector of 3D position vectors. Julia must be able toconvertthe typeVinto anSVector{3,T<:Real}.
AntennaFieldRepresentations.HfieldSampling — Method
HfieldSampling(positions::Vector{V})Returns an IrregularFieldSampling struct for sampling the magnetic field of an AntennaFieldRepresentation at given positions with Fitzgerald dipole probes.
For an input vector positions containing N position entries, the resulting IrregularFieldSampling provides the S₂₁-measurement signal in a N × 3 matrix, where the coloumns correspond to the x-, y-, and z-component of the H-field, respectively.
Input:
positions::Vector{V}: A vector of 3D position vectors. Julia must be able toconvertthe typeVinto anSVector{3,T<:Real}.
AntennaFieldRepresentations.asvector — Function
asvector(object::Union{AntennaFieldRepresentation,FieldSampling})Return the coefficient vector of an AntennaFieldRepresentation or the measurement vector of a FieldSampling.
AntennaFieldRepresentations.changerepresentation — Function
changerepresentation(Tnew::Type{<:AntennaFieldRepresentation}, aut_field::AntennaFieldRepresentation; kwargs...)Return an AntennaFieldRepresentation of type Tnew which represents the same antenna fields as aut_field.
The available keyword arguments kwargs depend on Tnew
Examples
# Calculate spherical wave expansion from dipole collection
shifted_hdipole=HertzArray([[0.1,0.2,0.3]], [complex.([0.0, 0.0, 1.0])],[complex(1.0)], k0)
shifted_hspherical=changerepresentation(SphericalWaveExpansion{Radiated}, shifted_hdipole)Keyword arguments
Tnew <: SphericalWaveExpansion:
ϵ::Real = 1e-7: Estimated accuracy of the new representation. Will be overwriten ifLmaxis defined.Lmax::Int = definemodeorder(Pdip, aut_field, ϵ): Equivalent mode order of the resulting spherical expansion.
Tnew <: PlaneWaveExpansion:
ϵ::Real = 1e-7: Estimated accuracy of the new representation. Will be overwriten ifLmaxis defined.Lmax::Int = definemodeorder(Pdip, aut_field, ϵ): Equivalent mode order of the resulting spherical expansion.samplingstrategy::SphereSamplingStrategy = _standardsampling(Lmax),: Samplingstrategy for the resultingPlaneWaveExpansion
See also
ChangeRepresentationMap
AntennaFieldRepresentations.efield! — Function
efield!(storage, aut_field::AntennaFieldRepresentation, R; reset = true)Store E-field vector (in cartesian coordinates) of the field representation aut_field at location R in preallocated storage. If reset=true, storage is overwritten. If reset=false, the field is added to storage.
AntennaFieldRepresentations.efield — Method
efield(aut_field::AntennaFieldRepresentation, R) -> [Ex;Ey;Ez]Return the E-field vector (in cartesian coordinates) of the field representation aut_field at location R.
AntennaFieldRepresentations.ehfield! — Method
ehfield!(storage_efield, storage_hfield, aut_field::AntennaFieldRepresentation, R; reset=true)Store E-field and H-field vector (in cartesian coordinates) of the field representation aut_field at location R in preallocated storages. If reset=true, storages are overwritten. If reset=false, the fields are added to storage_efield and storage_hfield.
For some AntennaFieldRepresentations, data can be shared between the calculations of electric and magnetic fields. Therefore, calling ehfield! may be slightly more performant than calling efield! and hfield! separately in some cases.
AntennaFieldRepresentations.ehfield — Method
ehfield(aut_field::AntennaFieldRepresentation, R) -> [Ex;Ey;Ez], [Hx;Hy;Hz]Returns the E-field and H-field vector (in cartesian coordinates) of the field representation aut_field at location R.
For some AntennaFieldRepresentations, data can be shared between the calculations of electric and magnetic fields. Therefore, calling ehfield may be slightly more performant than calling efield and hfield separately in some cases.
AntennaFieldRepresentations.equivalentorder — Function
equivalentorder(aut_field::AntennaFieldRepresentation; ϵ= 1e-7)Return the estimated spherical mode order L which is needed forin a spherical mode expansion to approximate the aut_field to the desired accuracy ϵ.
AntennaFieldRepresentations.farfield — Method
farfield(aut_field::AntennaFieldRepresentation{Radiated}, (θ, ϕ) ) -> Eθ, Eϕ
farfield(aut_field::AntennaFieldRepresentation{Radiated}, θ, ϕ ) -> Eθ, EϕReturn Eθ,Eϕ-far-field tuple for radiating field representation into direction specified by θ and ϕ.
AntennaFieldRepresentations.getwavenumber — Method
getwavenumber(aut_field::AntennaFieldRepresentation)Returns the wavenumber k=2 π / λ which is stored in the AntennaFieldRepresentation.
AntennaFieldRepresentations.hfield! — Function
hfield!(storage, aut_field::AntennaFieldRepresentation, R; reset = true)Store H-field vector (in cartesian coordinates) of the field representation aut_field at location R in preallocated storage. If reset=true, storage is overwritten. If reset=false, the field is added to storage.
AntennaFieldRepresentations.hfield — Method
hfield(aut_field::AntennaFieldRepresentation, R) -> [Hx;Hy;Hz]Return the H-field vector (in cartesian coordinates) of the field representation aut_field at location R.
AntennaFieldRepresentations.interpolate — Function
interpolate( θϕ::Tuple{T,T}, data::Union{PlaneWaveExpansion, FieldSampling}) where{T<:Real}Returns the two polarizations of spherically sampled data at the new location defined by the tuple θϕ.
See also:
InterPolateMapLocalθLocalϕInterpolateMap
AntennaFieldRepresentations.inverse — Function
inverse(opmap::OperationMap)Return inverse linear map of opmap.
AntennaFieldRepresentations.j_to_sℓm — Method
j_to_sℓm(j)
Convert single index j to multi-index s ℓ m in spherical wave expansionAntennaFieldRepresentations.resample — Function
resample(targetsampling::SphereSamplingStrategy, data::Union{PlaneWaveExpansion, FieldSampling})Returns data resampled according to targetsampling
See also:
ResampleMap
AntennaFieldRepresentations.rotate — Function
rotate(aut_field :: AntennaFieldRepresentation, χ::Number, θ::Number, ϕ::Number) -> rotated_aut_field :: AntennaFieldRepresentationRotate the field representation where the rotation is defined by the Euler angles χ, θ, ϕ.
This is equivalent to the original representation being represented in a rotated coordinate system, where the coordinate axes of the original coordinate system must be rotated around the Euler angles -χ, -θ, -ϕ to get the rotated coordinate frame.
The rotations are performed according to the z,y,z- sequence defined by extrinsic rotations. Extrinsic rotations are elemental rotations that occur about the axes of the fixed coordinate, i.e., not the intrinsic coordinates of the rotated object. First, the object is rotated about the global z-axis by χ. Then, the object is rotated about the global y-axis by θ. Finally, the object is rotated about the global z-axis by ϕ.
Refer to https://en.wikipedia.org/wiki/Euler_angles for more details on Euler angles.
AntennaFieldRepresentations.rotate! — Function
rotate!(rotated_aut_field :: AntennaFieldRepresentation, aut_field::AntennaFieldRepresentation, χ::Number, θ::Number, ϕ::Number)In-place rotate the field representation where the rotation is defined by the Euler angles χ, θ, ϕ.
This is equivalent to the aut_field being represented in a rotated coordinate system, where the coordinate axes of the original coordinate system must be rotated around the Euler angles -χ, -θ, -ϕ to get the rotated coordinate frame.
AntennaFieldRepresentations.samples — Method
samples(samplingstrategy::SphereSamplingStrategy) -> ( θs::Array{Float64,1}, ϕs::Array{Float64,1} )Return sampling points θs, ϕs for the samplingstrategy.
AntennaFieldRepresentations.setwavenumber! — Function
setwavenumber!(aut_field::AntennaFieldRepresentation, val)Sets the wavenumber k=2 π / λ which is stored in the AntennaFieldRepresentation to val.
AntennaFieldRepresentations.spatialshift! — Function
spatialshift!(shifted_aut_field::AntennaFieldRepresentation, aut_field::AntennaFieldRepresentation, R::AbstractVector)Preallocated shift of aut_field to new location R.
This is equivalent to the aut_field being represented in a translated coordinate system, where the coordinate axes of the original coordinate system must be translated by -R to get the translated coordinate frame.
AntennaFieldRepresentations.spatialshift — Method
spatialshift(aut_field::AntennaFieldRepresentation, R::AbstractVector) -> shifted_aut_field::AntennaFieldRepresentationSpatially shift aut_field to new location R.
This is equivalent to the aut_field being represented in a translated coordinate system, where the coordinate axes of the original coordinate system must be translated by -R to get the translated coordinate frame.
AntennaFieldRepresentations.sℓm_to_j — Method
sℓm_to_j(s,ℓ,m)
Convert multi-index s ℓ m to single index j in spherical wave expansionAntennaFieldRepresentations.transmit — Function
transmit(aut_field :: AntennaFieldRepresentation, measurement_setup :: FieldSampling{C}) -> Vector{C}Return sampled antenna field according to the sampling defined by measurement_setup.
AntennaFieldRepresentations.weightsandsamples — Method
weightsandsamples(samplingstrategy::SphereSamplingStrategy) -> ( θweights::Array{Float64,1}, ϕweights::Array{Float64,1}, θs::Array{Float64,1}, ϕs::Array{Float64,1} )Return integration weights θweights, ϕweights and sampling points θs, ϕs for the samplingstrategy.