Acoular 24.10 documentation

SourceMixer

«  UncorrelatedNoiseSource   ::   sources   ::   PointSourceConvolve  »

SourceMixer

class acoular.sources.SourceMixer

Bases: SamplesGenerator

Mixes the signals from several sources.

sources = List(Instance(SamplesGenerator, ()))

List of SamplesGenerator objects to be mixed.

sample_freq = Property(depends_on=['sdigest'])

Sampling frequency of the signal.

numchannels = Property(depends_on=['sdigest'])

Number of channels.

numsamples = Property(depends_on=['sdigest'])

Number of samples.

weights = CArray(desc='channel weights')

Amplitude weight(s) for the sources as array. If not set, all source signals are equally weighted. Must match the number of sources in sources.

validate_sources()

Validates if sources fit together.

result(num)

Python generator that yields the output block-wise. The outputs from the sources in the list are being added.

Parameters:
numinteger

This parameter defines the size of the blocks to be yielded (i.e. the number of samples per block).

Returns:
Samples in blocks of shape (num, numchannels).

The last block may be shorter than num.

«  UncorrelatedNoiseSource   ::   sources   ::   PointSourceConvolve  »