comnum.rc_taps#

comnum.rc_taps(t, rolloff, *, ts=1.0)#

The raised-cosine pulse at the times t (continuous time, symbol period ts): sinc(t/ts) cos(πβt/ts) / (1 - (2βt/ts)²) divided by ts, Nyquist (zero at the other symbol instants).

Parameters:
  • t (array_like) – the times.

  • rolloff (float) – the roll-off β.

  • ts (float) – the symbol period.

Returns:

the pulse at every time (float64).

Return type:

numpy.ndarray

Raises:

ValueError – for an input that is not an array of numbers of the expected shape.

Examples

>>> import comnum
>>> [abs(round(float(v), 12)) for v in comnum.rc_taps([0.0, 1.0, 2.0], 0.5)]
[1.0, 0.0, 0.0]