komm.SincPulse
Sinc pulse. It is a pulse with waveform given by $$ p(t) = \frac{\sin(\pi t)}{\pi t} = \sinc(t). $$
The waveform of the sinc pulse is depicted below.
Attributes:
(No attributes)
waveform()
The waveform $p(t)$ of the pulse.
For the sinc pulse, it is given by $$ p(t) = \sinc(t). $$
Examples:
>>> pulse = komm.SincPulse()
>>> pulse.waveform(
... [-1.0, -0.75, -0.5, -0.25, 0.0, 0.25, 0.5, 0.75, 1.0],
... ).round(3)
array([0. , 0.3 , 0.637, 0.9 , 1. , 0.9 , 0.637, 0.3 , 0. ])
spectrum()
The spectrum $\hat{p}(f)$ of the pulse.
For the sinc pulse, it is given by $$ \hat{p}(f) = \rect(f). $$
Examples:
>>> pulse = komm.SincPulse()
>>> np.abs(pulse.spectrum(
... [-1.0, -0.75, -0.5, -0.25, 0.0, 0.25, 0.5, 0.75, 1.0],
... ))
array([0., 0., 1., 1., 1., 1., 0., 0., 0.])
autocorrelation()
The autocorrelation function $R(\tau)$ of the pulse.
For the sinc pulse, it is given by $$ R(\tau) = \sinc(\tau). $$
Examples:
>>> pulse = komm.SincPulse()
>>> pulse.autocorrelation(
... [-1.0, -0.75, -0.5, -0.25, 0.0, 0.25, 0.5, 0.75, 1.0],
... ).round(3)
array([0. , 0.3 , 0.637, 0.9 , 1. , 0.9 , 0.637, 0.3 , 0. ])
energy_density_spectrum()
The energy density spectrum $S(f)$ of the pulse.
For the sinc pulse, it is given by $$ S(f) = \rect(f). $$
Examples:
>>> pulse = komm.SincPulse()
>>> pulse.energy_density_spectrum(
... [-1.0, -0.75, -0.5, -0.25, 0.0, 0.25, 0.5, 0.75, 1.0],
... )
array([0., 0., 1., 1., 1., 1., 0., 0., 0.])
support
tuple[float, float]
cached
property
The support of the pulse waveform $p(t)$, defined as the interval $[a, b]$ where $p(t)$ is non-zero.
For the sinc pulse, the support is given by $(-\infty, \infty)$.
Examples:
>>> pulse = komm.SincPulse()
>>> pulse.support
(-inf, inf)
taps()
Returns the FIR taps of the pulse.
Parameters:
-
samples_per_symbol
(int
) –The number of samples per symbol.
-
span
(tuple[int, int] | None
) –The time span to consider for the taps. This parameter is optional for pulses with finite support (defaults to $[0, 1]$), but required for pulses with infinite support.
Examples:
>>> pulse = komm.SincPulse()
>>> pulse.taps(samples_per_symbol=4, span=(-1, 1)).round(3)
array([0. , 0.3 , 0.637, 0.9 , 1. , 0.9 , 0.637, 0.3 , 0. ])
>>> pulse.taps(samples_per_symbol=4, span=(-16, 16)).shape
(129,)