komm.ComplexSequence
General complex sequence. It is denoted by $x[n]$, with elements in $\mathbb{C}$. Its length (or period) is denoted by $L$.
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])
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:
-
shifts
(ArrayLike | None
) –See the corresponding parameter in
komm.autocorrelation
. -
normalized
(bool
) –See the corresponding parameter in
komm.autocorrelation
.
Returns:
-
NDArray[complexfloating]
–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:
-
shifts
(ArrayLike | None
) –See the corresponding parameter in
komm.cyclic_autocorrelation
. -
normalized
(bool
) –See the corresponding parameter in
komm.cyclic_autocorrelation
.
Returns:
-
NDArray[complexfloating]
–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])