Environment#

class acoular.environments.Environment

Bases: HasStrictTraits

A 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 gpos in 3-D space to each of the M points in mpos.

Parameters:
gposnumpy.ndarray of floats

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).

mposfloat or numpy.ndarray of floats, 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.

Returns:
rmnumpy.ndarray of floats

The distances between each point in gpos and mpos. The result is an array of

  • shape (N,) if mpos is a single point, or

  • shape (N, M) if mpos consists of multiple points.

See also

dist_mat()

Compute distance matrix.