Modeling source signals¶
API references¶
-
class
doatools.model.signals.
SignalGenerator
[source]¶ Bases:
abc.ABC
Abstrace base class for all signal generators.
Extend this class to create your own signal generators.
-
dim
¶ Retrieves the dimension of the signal generator.
-
-
class
doatools.model.signals.
ComplexStochasticSignal
(dim, C=1.0)[source]¶ Bases:
doatools.model.signals.SignalGenerator
Creates 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
C
ifC
is 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.
-
dim
¶ Retrieves the dimension of the signal generator.
- dim (int) – Dimension of the complex Gaussian distribution. Must match
the size of
-
class
doatools.model.signals.
RandomPhaseSignal
(dim, amplitudes=1.0)[source]¶ Bases:
doatools.model.signals.SignalGenerator
Creates 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.
-
dim
¶ Retrieves the dimension of the signal generator.