Modeling array elements¶
API references¶
-
class
doatools.model.array_elements.ArrayElement[source]¶ Bases:
abc.ABCBase class for array elements.
-
output_size¶ Retrieves the output size of this array element.
For scalar sensors, the output size is one. For vector sensors, the output size is greater than one.
-
is_scalar¶ Retrieves whether this array element has a scalar output.
-
is_isotropic¶ Retrieves whether this array element is isotropic.
-
is_polarized¶ Retrieves whether this array element measures polarized waves.
-
calc_spatial_response(r, az, el, polarization=None)[source]¶ Calculates the spatial response of for given sources configurations.
Parameters: - r (float or ndarray) – A single range value or an array of
range values. Must have the same shape as
azandel. - az (float or ndarray) – A single azimuth angle or an array of
azimuth angles. Must have the same shape as
azandel. - el (float or ndarray) – A single elevation angle or an array
of elevation angles. Must have the same shape as
azandel. - polarization (ndarray or None) – Polarization information.
Suppose
r,az,elshare the same shape(d1, d2, ..., dn). Thenpolarizationshould have a shape of(d1, d2, ..., dn, l), wherelis the number of polarization parameters for each source. Default value isNone.
Returns: A spatial response tensor. For a scalar element, the shape should be the same as that of
r,az, orel. For a vector element (output_size > 1), the shape is given by(l, d1, d2, ..., dn), wherelis equal tooutput_sizeand(d1, d2, ..., dn)is the shape ofr,az, orel.Return type: - r (float or ndarray) – A single range value or an array of
range values. Must have the same shape as
-
-
class
doatools.model.array_elements.IsotropicScalarSensor[source]¶ Bases:
doatools.model.array_elements.ArrayElementCreates an isotropic scalar array element.
-
output_size¶ Retrieves the output size of this array element.
For scalar sensors, the output size is one. For vector sensors, the output size is greater than one.
-
is_isotropic¶ Retrieves whether this array element is isotropic.
-
is_polarized¶ Retrieves whether this array element measures polarized waves.
-
-
doatools.model.array_elements.ISOTROPIC_SCALAR_SENSOR= <doatools.model.array_elements.IsotropicScalarSensor object>¶ An isotropic scalar sensor.
-
class
doatools.model.array_elements.CustomNonisotropicSensor(f_sr, output_size=1, polarized=False)[source]¶ Bases:
doatools.model.array_elements.ArrayElementCreates a customize non-isotropic sensor.
Parameters: - f_sr (Callable) – Custom spatial response function.
It accepts four inputs:
r,az,el, andpolarization, and outputs the spatial response. Seecalc_spatial_response()for more details. - output_size (int) – Output size of the sensor. Must be consistent with
the output of
f_sr. Default value is1. - polarized (bool) – Specifies whether the sensor measures polarized waves.
Must be consistent with the implemention in
f_sr. Default value isFalse.
-
output_size¶ Retrieves the output size of this array element.
For scalar sensors, the output size is one. For vector sensors, the output size is greater than one.
-
is_isotropic¶ Retrieves whether this array element is isotropic.
-
is_polarized¶ Retrieves whether this array element measures polarized waves.
- f_sr (Callable) – Custom spatial response function.
It accepts four inputs: