Modeling source signals¶
API references¶
- class doatools.model.signals.SignalGenerator[source]¶
Bases:
ABCAbstrace base class for all signal generators.
Extend this class to create your own signal generators.
- abstract property dim¶
Retrieves the dimension of the signal generator.
- class doatools.model.signals.ComplexStochasticSignal(dim, C=1.0)[source]¶
Bases:
SignalGeneratorCreates a signal generator that generates zero-mean complex circularly-symmetric Gaussian signals.
- Parameters:
dim (int) – Dimension of the complex Gaussian distribution. Must match the size of
CifCis not a scalar.C –
Covariance matrix of the complex Gaussian distribution. Can be specified by
A full covariance matrix.
An real vector denoting the diagonals of the covariance matrix if the covariance matrix is diagonal.
A scalar if the covariance matrix is diagonal and all diagonal elements share the same value. In this case, parameter n must be specified.
Default value is 1.0.
- property dim¶
Retrieves the dimension of the signal generator.
- class doatools.model.signals.RandomPhaseSignal(dim, amplitudes=1.0)[source]¶
Bases:
SignalGeneratorCreates a random phase signal generator.
The phases are uniformly and independently sampled from \([-\pi, \pi]\).
- Parameters:
dim (int) – Dimension of the signal (usually equal to the number of sources).
amplitudes –
Amplitudes of the signal. Can be specified by
A scalar if all sources have the same amplitude.
A vector if the sources have different amplitudes.
- property dim¶
Retrieves the dimension of the signal generator.