Skip to content

komm.ComplexSequence

General complex sequence. It is denoted by $x[n]$, with elements in $\mathbb{C}$. Its length (or period) is denoted by $L$.

__init__()

Constructor for the class.

Parameters:

  • sequence (Array1D[complex])

    The complex sequence. Must be a 1D-array of length $L$ with elements in $\mathbb{C}$.

Examples:

>>> seq = ComplexSequence([1, 1j, -1, -1j])
>>> seq.sequence
array([ 1.+0.j,  0.+1.j, -1.+0.j, -0.-1.j])

sequence property

The complex sequence $x[n]$.

length property

The length (or period) $L$ of the complex sequence.

autocorrelation()

Returns the autocorrelation $R[\ell]$ of the complex sequence. See komm.autocorrelation for more details.

Parameters:

Returns:

  • autocorrelation (Array1D[complex])

    The autocorrelation $R[\ell]$ of the complex sequence.

Examples:

>>> seq = ComplexSequence([1, 1j, -1, -1j])
>>> seq.autocorrelation(shifts=[-2, -1, 0, 1, 2])
array([-2.+0.j,  0.-3.j,  4.+0.j,  0.+3.j, -2.+0.j])

cyclic_autocorrelation()

Returns the cyclic autocorrelation $\tilde{R}[\ell]$ of the complex sequence. See komm.cyclic_autocorrelation for more details.

Parameters:

Returns:

  • cyclic_autocorrelation (Array1D[complex])

    The cyclic autocorrelation $\tilde{R}[\ell]$ of the complex sequence.

Examples:

>>> seq = ComplexSequence([1, 1j, -1, -1j])
>>> seq.cyclic_autocorrelation(shifts=[-2, -1, 0, 1, 2])
array([-4.+0.j,  0.-4.j,  4.+0.j,  0.+4.j, -4.+0.j])