comnum.zadoff_chu#

comnum.zadoff_chu(u, n_zc)#

Register the bindings of this module. The Zadoff–Chu sequence x_u(n) = exp(-jπ u n (n + 1) / N) of root u and odd length N (constant amplitude, zero periodic autocorrelation at every nonzero lag; the PSS of LTE is the one of length 63, its middle element punctured).

Parameters:
  • u (int) – the root, nonzero modulo n_zc and prime to it.

  • n_zc (int) – the odd length N.

Returns:

the N values (complex128).

Return type:

numpy.ndarray

Raises:

ValueError – for an even length or a root that is not prime to it.

Examples

>>> import comnum, numpy as np
>>> x = comnum.zadoff_chu(25, 63)
>>> bool(np.allclose(np.abs(x), 1.0)), round(float(abs(np.vdot(x, np.roll(x, 3)))), 9)
(True, 0.0)