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:
Specify the
orientation
,length
, andnumber
of monopoles in the line source.Control the
source strength
of individual monopoles.Support for
coherent or incoherent
monopole sources.
The output signals at microphones are generated block-wise using the
result()
generator.See also
acoular.sources.PointSource
For modeling stationary point sources.
Notes
For incoherent sources, a unique seed is set for each monopole to generate independent signals.
- direction = Tuple((0.0, 0.0, 1.0), desc='Line orientation ')¶
Vector to define the orientation of the line source. Default is
(0.0, 0.0, 1.0)
.
- length = Float(1, desc='length of the line source')¶
Vector to define the length of the line source in meters. Default is
1.0
.
- num_sources = Int(1)¶
Number of monopole sources in the line source. Default is
1
.
- source_strength = CArray(desc='coefficients of the source strength')¶
Strength coefficients for each monopole source.
- coherence = Enum('coherent', 'incoherent', desc='coherence mode')¶
Coherence mode for the monopoles (
'coherent'
or'incoherent'
).
- digest = Property( …¶
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:
- num
int
, optional Number of samples per block to yield. Default is
128
.
- num
- 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 ifnum_samples
is not a multiple ofnum
.