API Reference
ArrayRadiation.DspUtility._mean
— Method_mean(x)::Real
Calculate the mean of a vector.
julia> using ArrayRadiation
julia> a = [1,2,3,4];
julia> ArrayRadiation.DspUtility._mean(a)
2.5
ArrayRadiation.DspUtility.antenna_matrix
— Methodantenna_matrix(M, N, separation)
Generate locations (2D) for an evenly spaced MxN matrix of antenna elements, ensuring symmetry around the origin.
All elements are placed in the XY-plane.
Arguments
M
: Number of elements along the Y-axis.N
: Number of elements along the X-axis.separation
: Distance between adjacent elements.
Example
julia> using ArrayRadiation
julia> DspUtility.antenna_matrix(1, 2, 0.5)
1×2 Matrix{Tuple{Float64, Float64, Float64}}:
(-0.25, 0.0, 0.0) (0.25, 0.0, 0.0)
julia> DspUtility.antenna_matrix(1, 3, 1/2)
1×3 Matrix{Tuple{Float64, Float64, Float64}}:
(-0.5, 0.0, 0.0) (0.0, 0.0, 0.0) (0.5, 0.0, 0.0)
julia> DspUtility.antenna_matrix(2, 1, 1/2)
2×1 Matrix{Tuple{Float64, Float64, Float64}}:
(0.0, -0.25, 0.0)
(0.0, 0.25, 0.0)
ArrayRadiation.DspUtility.db2mag
— MethodConvert between decibal scale (magnitude) and linear
ArrayRadiation.DspUtility.db2pow
— MethodConvert between decibal scale (power) and linear
ArrayRadiation.DspUtility.discard_low_values
— Methoddiscard_low_values(scalar_value::Real, lower_limit::Real)
This function takes a scalar value and compares it against a specified lower limit. If the scalar value is below the lower_limit
, the function returns nothing
. Otherwise, it returns the scalar value unchanged.
Arguments
scalar_value::Real
: The scalar value to compare.lower_limit::Real
: The threshold value below which the scalar is discarded.
Example
julia> using ArrayRadiation
julia> ArrayRadiation.DspUtility.discard_low_values(50, 40)
50
julia> ArrayRadiation.DspUtility.discard_low_values(30, 40)
ArrayRadiation.DspUtility.energy
— MethodReturn the signal energy in Joule
ArrayRadiation.DspUtility.linear_array
— MethodGenerate locations (1D) for a evenly spaced array of N elements. N is even.
Arguments
N
Number of elements (assumed to be even).separation
Distance between adjacent elements.
ArrayRadiation.DspUtility.mag2db
— MethodConvert between linear scale (magnitude) and decibel
ArrayRadiation.DspUtility.pow2db
— MethodConvert between linear scale (magnitude) and decibel
ArrayRadiation.DspUtility.power_dBW
— MethodReturn the average signal power in dBW
ArrayRadiation.DspUtility.power_dBm
— MethodReturn the average signal power in dBm
ArrayRadiation.Kspace.azimuth2k_hat
— Methodazimuth2k_hat(ϕ::Real)::Vector{Real}
Convert an azimuth angle ϕ (in radians) to a unit-length k-space vector in the XY-plane.
The resulting vector has the form [cos(ϕ), sin(ϕ), 0].
ArrayRadiation.Kspace.cos_taper_k_hat
— Functioncos_taper_k_hat(k_hat_x::Real, k_hat_y::Real, α = 1.4)
Calculate cosine taper for normalized k-space vector [kx, ky, kz]/|k|.
Where |k| = 2π/λ0
Optionally provide α. α=1.4 accounts for mutual coupling between elements.
- R. A. Dana, Electronically Scanned Arrays and K-Space Gain Formulation, Springer, 2019.
ArrayRadiation.Kspace.elevation2k_hat
— Methodelevation2k_hat(θ::Real)::Vector{Real}
Convert an elevation angle θ (in radians) to a unit-length k-space vector in the XZ-plane.
The resulting vector has the form [sin(θ), 0, cos(θ)].
ArrayRadiation.Kspace.gain
— Methodgain(k_xyz::AbstractVector{<:Real}, Ge::Real, r_xyz::AbstractArray, element_weights::AbstractArray)
Calculate GΩ(k), the angular domain gain in direction k for an array with specified element weights.
Arguments
k_xyz
k-space vector.Ge
The antena gain in directionk_xyz
.r_xyz
The placement of each antenna element. inelement_weights
The complex weight of each element. Must have the same size/shape asr_xyz
.
References
- R. A. Dana, Electronically Scanned Arrays and K-Space Gain Formulation, Springer, 2019.
ArrayRadiation.Kspace.gain_1D
— Methodgain_1D(k_xyz::AbstractVector{<:Real}, Ge::Real, r_x::AbstractVector, element_weights::AbstractVector)
Calculate GΩ(k), the angular domain gain in direction k for an array with specified element weights.
Arguments
k_xyz
k-space vector.Ge
The antena gain in directionk_xyz
.r_x
The placement of each antenna element. All elements are placed along the x-axis.element_weights
The complex weight of each element.
References
- R. A. Dana, Electronically Scanned Arrays and K-Space Gain Formulation, Springer, 2019.
ArrayRadiation.Kspace.k2azimuth
— Methodk2azimuth(k_xyz::Vector)::Real
Calculate the azimuth angle ϕ from a k-space vector.
The azimuth angle is the angle between the projection of the vector on the XY-plane and the x-axis.
ArrayRadiation.Kspace.k2elevation
— Methodk2elevation(k_xyz::Vector)::Real
Calculate the elevation angle θ from a k-space vector.
The elevation angle is the angle between the z unit vector and the the k vector.
ArrayRadiation.Kspace.k_xyz
— Functionk_xyz(θ::Real, ϕ::Real, λ0::Real=1)::Vector
Calculate k-space vector, representing antenna elevation and coordinates.
ArrayRadiation.Kspace.maximum_element_separation
— Methodmaximum_element_separation(max_look_angle_deg)
Calculate the maximum array element separation for maximum look angle.
Result is fraction of wavelenth.
ArrayRadiation.Window.cosine_q
— Functioncosine_q(M::Integer, q, scale = true)::AbstractVector
Create a coseine^q weighting (window).
Arguments
M
The length of the window.q
Forq=0
yields a uniform weight,q=1
yelds a cosine weighting, andq=2
yields a Hanning weighting.scale
Max of window is 1, when not scaled.sum( cosine_q(M, q) ) = M
when scaled.
Example
julia> using ArrayRadiation
julia> N = 64;
julia> W = Window.cosine_q(N, 1);
julia> round.( W[1:4], sigdigits=3 )
4-element Vector{Float64}:
0.0385
0.116
0.192
0.269
julia> round( sum(W), sigdigits=2)
64.0
References
- S. Yan, Broadband Array Processing, Springer, 2019
ArrayRadiation.Window.rangeOmit
— MethodReturns 1:n
but omits m.
ArrayRadiation.Window.split_window
— Methodsplit_window(W::AbstractVector)::AbstractVector
Split a window to create a difference beam
Arguments
W
The window to split.
Example
julia> using ArrayRadiation
julia> N = 64;
julia> W = Window.taylor(N, 4, -35);
julia> W = Window.split_window(W);
julia> round.( W[1:4], sigdigits=3 )
4-element Vector{Float64}:
0.28
0.288
0.305
0.329
julia> round.( W[N-3:N], sigdigits=3 )
4-element Vector{Float64}:
-0.329
-0.305
-0.288
-0.28
Below is an example of a split Taylor window.
ArrayRadiation.Window.taylor
— Methodtaylor(N::Integer, n_bar::Integer, sll_dB::Real)::AbstractVector
Create taylor weighting (window).
Arguments
N
The window length.n_bar
The number of nearly constant-level sidelobes adjacent to the main lobe.sll_dB
Peak sidelobe_level in dB.
Example
julia> using ArrayRadiation
julia> W = Window.taylor(64, 4, -35);
julia> round.( W[1:4], sigdigits=3 )
4-element Vector{Float64}:
0.28
0.288
0.305
0.329
julia> round( sum(W), sigdigits=5)
64.0
References
- Carrar, Goodman and Majewski, Spotlight Synthetic Aperture Radar: Signal Processing Algorithms, Artech House, 1995
ArrayRadiation.AntennaElement.cardioid
— Functioncardioid(θ::AbstractFloat, ϕ::AbstractFloat=0.0)
Calculate approximate radiation pattern for a cardioid antenna.
Arguments
θ
Elevation [rad]ϕ
Azimuth [rad]
References
- Costa, Abrao, Rego, A Method for Approximating Directivity Expressions in Generalized Radiation Patterns, Elsevier, 2025.
ArrayRadiation.AntennaElement.cos_taper
— Functioncos_taper(θ::Real, α = 1.4)
Calculate cosine taper for elevation angle θ [rad]. Optionally provide α. α=1.4 accounts for mutual coupling between elements.
- R. A. Dana, Electronically Scanned Arrays and K-Space Gain Formulation, Springer, 2019.
ArrayRadiation.AntennaElement.half_wave_dipole
— Functionhalf_wave_dipole(θ::AbstractFloat, ϕ::AbstractFloat=0.0)
Calculate approximate radiation pattern for a half wave dipole.
Arguments
θ
Elevation [rad]ϕ
Azimuth [rad]
References
- Costa, Abrao, Rego, A Method for Approximating Directivity Expressions in Generalized Radiation Patterns, Elsevier, 2025.
ArrayRadiation.AntennaElement.microstrip_patch
— Functionmicrostrip_patch(θ::AbstractFloat, ϕ::AbstractFloat=0.0)
Calculate approximate radiation pattern for a microstrip patch antenna.
The model is only valid for θ ∈ [−π/2, π/2].
Arguments
θ
Elevation [rad]ϕ
Azimuth [rad]
References
- Costa, Abrao, Rego, A Method for Approximating Directivity Expressions in Generalized Radiation Patterns, Elsevier, 2025.
ArrayRadiation.AntennaElement.yagi_uda
— Functionyagi_uda(θ::AbstractFloat, ϕ::AbstractFloat=0.0)
Calculate approximate radiation pattern for a Yagi Uda antenna.
The model is only valid for θ ∈ [−π/2, π/2].
The model is based on the following geometry:
- Three directors, spaced 0.20λ apart.
- Director lengths: [0.428λ, 0.424λ, 0.428λ]
- Reflector length of 0.482λ
Arguments
θ
Elevation [rad]ϕ
Azimuth [rad]
References
- Costa, Abrao, Rego, A Method for Approximating Directivity Expressions in Generalized Radiation Patterns, Elsevier, 2025.