comnum.rrc_taps#

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

The root-raised-cosine pulse at the times t (continuous time, symbol period ts): (sin(πt'(1-β)) + 4βt' cos(πt'(1+β))) / (πt'(1 - (4βt')²)) with t' = t/ts, divided by ts, and its limits at t = 0 and |t| = ts/(4β) (Proakis & Salehi, Digital Communications, 5th ed., Sec. 9.2-1).

Parameters:
  • t (array_like) – the times (in units of ts’s time base).

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

  • ts (float) – the symbol period.

Returns:

the pulse at every time (float64); ∫ h² dt = 1 for ts = 1.

Return type:

numpy.ndarray

Raises:

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

Examples

>>> import comnum, math
>>> h = comnum.rrc_taps([0.0, 1.0], 0.3)
>>> round(float(h[0]), 12) == round(1 - 0.3 + 4 * 0.3 / math.pi, 12)
True