MovingPointSource¶
- class acoular.sources.MovingPointSource¶
Bases:
PointSource
Define a moving
point source
emitting asignal
.The
MovingPointSource
class models a sound source that follows aspecified trajectory
while emitting asignal
. This allows for the simulation of dynamic acoustic scenarios, e.g. sources changing position over time such as vehicles in motion.See also
acoular.sources.PointSource
For modeling stationary point sources.
acoular.trajectory.Trajectory
For specifying source motion paths.
- conv_amp = Bool(False, desc='determines if convective amplification is considered')¶
Determines whether convective amplification is considered. When
True
, the amplitude of the signal is adjusted based on the relative motion between the source and microphones. Default isFalse
.
- trajectory = Instance(Trajectory, desc='trajectory of the source')¶
Instance of the
Trajectory
class specifying the source’s motion. The trajectory defines the source’s position and velocity at any given time.
- prepadding = Enum('loop', desc='Behaviour for negative time indices.')¶
Behavior of the signal for negative time indices. Currently only supports
'loop'
. Default is'loop'
.
- 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, accounting for source motion.
The
result()
method provides a generator that yields blocks of the signal received at microphones. It incorporates thesource's trajectory
, convective amplification (if enabled), and environmental propagation effects.- Parameters:
- num
int
, optional Number of samples per block to be yielded. 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
.
- Raises:
IndexError
If no more samples are available from the signal source.
Notes
The method iteratively solves for the emission times of the signal at each microphone using the Newton-Raphson method.
Convective amplification is applied if
conv_amp
= True
, modifying the signal’s amplitude based on the relative motion between the source and microphones.The signal’s emission time is calculated relative to the trajectory’s position and velocity at each step.