Environment#
- class acoular.environments.Environment
Bases:
HasStrictTraitsA simple acoustic environment without flow.
This class models an acoustic environment where the propagation of sound is considered to occur in a homogeneous medium without any flow effects (e.g., wind). It provides functionality for computing the travel time or distances between grid point locations and microphone locations.
Notes
The
dist_mat()function is used internally to compute the pairwise distances between grid points and microphone positions efficiently.This class assumes a static, homogeneous environment without accounting for factors like temperature gradients, humidity, or atmospheric turbulence.
- digest
A unique identifier based on the environment properties. (read-only)
- c
The speed of sound in the environment. Default is
343.0, which corresponds to the approximate speed of sound at 20°C in dry air at sea level, if the unit is m/s.
- roi
The region of interest (ROI) for calculations. (Not needed for most types of environment.) Default is
None.
- apparent_r(gpos, mpos=0.0)
Compute the distances between two sets of points.
The distance for each of the N points in
gposin 3-D space to each of the M points inmpos.- Parameters:
- gpos
numpy.ndarrayoffloats The coordinates of the first set of points. Should be of shape
(3, N), where N is the number of points (x, y, z in rows).- mpos
floatornumpy.ndarrayoffloats, optional The coordinates of the second set of points. If a scalar is provided, it is treated as the origin
(0, 0, 0). If an array is given, it should have shape(3, M), where M is the number of points.
- gpos
- Returns:
- rm
numpy.ndarrayoffloats The distances between each point in
gposandmpos. The result is an array ofshape (N,) if
mposis a single point, orshape (N, M) if
mposconsists of multiple points.
- rm
See also
dist_mat()Compute distance matrix.