pub struct SensorArray { /* private fields */ }Expand description
A narrowband array of sensors at one frequency.
The response of element n to a plane wave arriving from direction Ω (unit vector r̂)
with Jones vector p = [p_θ, p_φ] in the (θ̂, φ̂) basis at Ω is
a_n = (g_n(Ω) · p) e^{jk r̂·p_n} (the convention’s imaginary unit in the exponent; the dot
product is not conjugated, by reciprocity), where g_n is the element’s gain-normalised
pattern. Beamformer outputs are y = wᴴ x, so the array pattern of weights w is
Σ w_n* g_n(Ω) e^{jk r̂·p_n}.
Implementations§
Source§impl SensorArray
impl SensorArray
Sourcepub fn new(
frequency: f64,
convention: TimeConvention,
) -> Result<Self, ErrorsJSL>
pub fn new( frequency: f64, convention: TimeConvention, ) -> Result<Self, ErrorsJSL>
An empty array in vacuum, sampling element pattern containers with cubic interpolation.
pub fn with_interpolation(self, method: InterpolationMethod) -> Self
Sourcepub fn add_sampled_element(
&mut self,
position: [f64; 3],
pattern: Arc<HarmonicField>,
) -> Result<(), ErrorsJSL>
pub fn add_sampled_element( &mut self, position: [f64; 3], pattern: Arc<HarmonicField>, ) -> Result<(), ErrorsJSL>
Adds an element with a sampled pattern. The pattern must be an electric far field at the array frequency; it is converted to the array’s convention.
Sourcepub fn add_antenna_element(
&mut self,
position: [f64; 3],
antenna: Arc<dyn Antenna + Send + Sync>,
rotation: Rotation3,
efficiency: f64,
) -> Result<(), ErrorsJSL>
pub fn add_antenna_element( &mut self, position: [f64; 3], antenna: Arc<dyn Antenna + Send + Sync>, rotation: Rotation3, efficiency: f64, ) -> Result<(), ErrorsJSL>
Adds an analytic antenna element rotated by rotation, with radiation efficiency.
Sourcepub fn from_antenna(
positions: &[[f64; 3]],
antenna: Arc<dyn Antenna + Send + Sync>,
orientation: &RigidTransform,
frequency: f64,
convention: TimeConvention,
efficiency: f64,
) -> Result<Self, ErrorsJSL>
pub fn from_antenna( positions: &[[f64; 3]], antenna: Arc<dyn Antenna + Send + Sync>, orientation: &RigidTransform, frequency: f64, convention: TimeConvention, efficiency: f64, ) -> Result<Self, ErrorsJSL>
An array of identical antennas at positions, all rotated by orientation (its
translation is ignored), evaluated analytically.
Sourcepub fn from_pattern(
positions: &[[f64; 3]],
pattern: Arc<HarmonicField>,
) -> Result<Self, ErrorsJSL>
pub fn from_pattern( positions: &[[f64; 3]], pattern: Arc<HarmonicField>, ) -> Result<Self, ErrorsJSL>
An array of elements sharing one sampled pattern.
Sourcepub fn linear_positions(n: usize, spacing: f64, axis: [f64; 3]) -> Vec<[f64; 3]>
pub fn linear_positions(n: usize, spacing: f64, axis: [f64; 3]) -> Vec<[f64; 3]>
n elements along axis (normalised) with spacing spacing, centred on the origin.
Sourcepub fn planar_positions(nx: usize, ny: usize, dx: f64, dy: f64) -> Vec<[f64; 3]>
pub fn planar_positions(nx: usize, ny: usize, dx: f64, dy: f64) -> Vec<[f64; 3]>
An nx × ny rectangular grid in the xy plane, centred on the origin.
pub fn elements(&self) -> &[ArrayElement]
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn frequency(&self) -> f64
pub fn convention(&self) -> TimeConvention
Sourcepub fn wavelength(&self) -> f64
pub fn wavelength(&self) -> f64
The free-space wavelength.
Sourcepub fn wavenumber(&self) -> f64
pub fn wavenumber(&self) -> f64
The (real) wavenumber.
Sourcepub fn element_response(
&self,
n: usize,
theta: f64,
phi: f64,
) -> Result<[C64; 2], ErrorsJSL>
pub fn element_response( &self, n: usize, theta: f64, phi: f64, ) -> Result<[C64; 2], ErrorsJSL>
Element n’s [g_θ, g_φ] including the geometric phase, for the direction (θ, φ).
Sourcepub fn response_matrix(
&self,
theta: f64,
phi: f64,
) -> Result<Array2<C64>, ErrorsJSL>
pub fn response_matrix( &self, theta: f64, phi: f64, ) -> Result<Array2<C64>, ErrorsJSL>
The N × 2 response matrix A(Ω) whose rows are the element responses.
Sourcepub fn steering_vector(
&self,
theta: f64,
phi: f64,
polarization: [C64; 2],
) -> Result<Array1<C64>, ErrorsJSL>
pub fn steering_vector( &self, theta: f64, phi: f64, polarization: [C64; 2], ) -> Result<Array1<C64>, ErrorsJSL>
The steering vector A(Ω) p for a wave of Jones polarization p.
Sourcepub fn pattern_at(
&self,
weights: &Array1<C64>,
theta: f64,
phi: f64,
) -> Result<[C64; 2], ErrorsJSL>
pub fn pattern_at( &self, weights: &Array1<C64>, theta: f64, phi: f64, ) -> Result<[C64; 2], ErrorsJSL>
The array pattern Σ w_n* g_n(Ω) e^{jk r̂·p_n} as [E_θ, E_φ] in one direction.
Sourcepub fn array_pattern(
&self,
weights: &Array1<C64>,
domain: Arc<Domain>,
) -> Result<HarmonicField, ErrorsJSL>
pub fn array_pattern( &self, weights: &Array1<C64>, domain: Arc<Domain>, ) -> Result<HarmonicField, ErrorsJSL>
The array pattern of weights sampled on a far-field domain (electric far field,
spherical basis), ready for the directivity and overlap tools.