LineSource#

class acoular.sources.LineSource

Bases: PointSource

Define a fixed line source with a signal.

The LineSource class models a fixed line source composed of multiple monopole sources arranged along a specified direction. Each monopole can have its own source strength, and the coherence between them can be controlled.

Key Features:

The output signals at microphones are generated block-wise using the result() generator.

See also

PointSource

For modeling stationary point sources.

Notes

For incoherent sources, a unique seed is set for each monopole to generate independent signals.

direction

Vector to define the orientation of the line source. Default is (0.0, 0.0, 1.0).

length

Vector to define the length of the line source in meters. Default is 1.0.

num_sources

Number of monopole sources in the line source. Default is 1.

source_strength

Strength coefficients for each monopole source.

coherence

Coherence mode for the monopoles ('coherent' or 'incoherent').

digest

A unique identifier for the current state of the source, based on its properties. (read-only)

result(num=128)

Generate the output signal at microphones in blocks.

Parameters:
numint, optional

Number of samples per block to yield. Default is 128.

Yields:
numpy.ndarray

A 2D array of shape (num, num_channels) containing the signal detected at the microphones. The last block may have fewer samples if num_samples is not a multiple of num.

signal

Instance of the SignalGenerator class defining the emitted signal.

loc

Coordinates (x, y, z) of the source. Default is np.array([[0.0], [0.0], [1.0]]).

num_channels

Number of output channels, automatically set based on the microphone geometry.

mics

MicGeom object defining the positions of the microphones.

env

An Environment or derived object providing sound propagation details, such as speed of sound in the medium. Default is Environment.

start_t

Start time of the signal in seconds. Default is 0.0.

start

Start time of data acquisition at the microphones in seconds. Default is 0.0.

prepadding

Behavior of the signal for negative time indices, i.e. if (start < start_t):

  • 'loop': Repeat the signal from its end.

  • 'zeros': Use zeros, recommended for deterministic signals.

Default is 'loop'.

up

Internal upsampling factor for finer signal resolution. Default is 16.

num_samples

Total number of samples in the emitted signal, derived from the signal generator.

sample_freq

Sampling frequency of the signal, derived from the signal generator.