Acoular 16.5 documentation

SignalGenerator

«  SineGenerator   ::   signals   ::   WNoiseGenerator  »

SignalGenerator

class acoular.signals.SignalGenerator

Bases: traits.has_traits.HasPrivateTraits

Virtual base class for a simple one-channel signal generator.

Defines the common interface for all SignalGenerator classes. This class may be used as a base for specialized SignalGenerator implementations. It should not be used directly as it contains no real functionality.

rms = Float(1.0, desc="rms amplitude")

RMS amplitude of source signal (for point source: in 1 m distance).

sample_freq = Float(1.0, desc="sampling frequency")

Sampling frequency of the signal.

numsamples = Long

Number of samples to generate.

signal()

Deliver the signal.

usignal(factor)

Delivers the signal resampled with multiple of the sampling freq.

Uses fourier transform method for resampling (from scipy.signal).

Parameters:

factor : integer

The factor defines how many times the new sampling frequency is larger than sample_freq.

Returns:

array of floats

The resulting signal of length factor * numsamples.

«  SineGenerator   ::   signals   ::   WNoiseGenerator  »