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.

emit(n)[source]

Emits the signal matrix.

Generates a k x n matrix where k is the dimension of the signal and each column represents a sample.

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 if C is not a scalar.
  • C

    Covariance matrix of the complex Gaussian distribution. Can be specified by

    1. A full covariance matrix.
    2. An real vector denoting the diagonals of the covariance matrix if the covariance matrix is diagonal.
    3. 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.

emit(n)[source]

Emits the signal matrix.

Generates a k x n matrix where k is the dimension of the signal and each column represents a sample.

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

    1. A scalar if all sources have the same amplitude.
    2. A vector if the sources have different amplitudes.
dim

Retrieves the dimension of the signal generator.

emit(n)[source]

Emits the signal matrix.

Generates a k x n matrix where k is the dimension of the signal and each column represents a sample.