Skip to main content

SensorArray

Struct SensorArray 

Source
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

Source

pub fn new( frequency: f64, convention: TimeConvention, ) -> Result<Self, ErrorsJSL>

An empty array in vacuum, sampling element pattern containers with cubic interpolation.

Source

pub fn with_interpolation(self, method: InterpolationMethod) -> Self

Source

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.

Source

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.

Source

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.

Source

pub fn from_pattern( positions: &[[f64; 3]], pattern: Arc<HarmonicField>, ) -> Result<Self, ErrorsJSL>

An array of elements sharing one sampled pattern.

Source

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.

Source

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.

Source

pub fn elements(&self) -> &[ArrayElement]

Source

pub fn len(&self) -> usize

Source

pub fn is_empty(&self) -> bool

Source

pub fn frequency(&self) -> f64

Source

pub fn convention(&self) -> TimeConvention

Source

pub fn wavelength(&self) -> f64

The free-space wavelength.

Source

pub fn wavenumber(&self) -> f64

The (real) wavenumber.

Source

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 (θ, φ).

Source

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.

Source

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.

Source

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.

Source

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.

Trait Implementations§

Source§

impl Clone for SensorArray

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SensorArray

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> MaybeSerialize for T
where T: ?Sized,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.