komm.GaussianPulse
Gaussian pulse. It is a pulse with spectrum given by $$ \hat{p}(f) = \frac{1}{\sqrt{2 \pi} \bar{B}} \mathrm{e}^{-\frac{1}{2} (f / \bar{B})^2}, $$ where the $\bar{B} = B / \sqrt{\ln 2}$, and $B$ is the half-power bandwidth of the filter.
The waveform of the Gaussian pulse is depicted below for $B = 0.5$, and for $B = 1$.
Attributes:
-
half_power_bandwidth
(float
) –The half-power bandwidth $B$ of the pulse. The default value is
1.0
.
waveform()
The waveform $p(t)$ of the pulse.
For the Gaussian pulse, it is given by $$ p(t) = \mathrm{e}^{-\frac{1}{2} (2 \pi \bar{B} t)^2}. $$
Examples:
>>> pulse = komm.GaussianPulse(half_power_bandwidth=0.25)
>>> pulse.waveform(
... [-1.0, -0.75, -0.5, -0.25, 0.0, 0.25, 0.5, 0.75, 1.0],
... ).round(3)
array([0.169, 0.367, 0.641, 0.895, 1. , 0.895, 0.641, 0.367, 0.169])
spectrum()
The spectrum $\hat{p}(f)$ of the pulse.
Examples:
>>> pulse = komm.GaussianPulse(half_power_bandwidth=0.25)
>>> np.abs(pulse.spectrum(
... [-1.0, -0.75, -0.5, -0.25, 0.0, 0.25, 0.5, 0.75, 1.0],
... )).round(3)
array([0.005, 0.059, 0.332, 0.939, 1.329, 0.939, 0.332, 0.059, 0.005])
autocorrelation()
The autocorrelation function $R(\tau)$ of the pulse.
For the Gaussian pulse, it is given by $$ R(\tau) = \frac{1}{2 \sqrt{\pi} \bar{B}} \mathbb{e}^{-(\pi \bar{B} \tau)^2}. $$
Examples:
>>> pulse = komm.GaussianPulse(half_power_bandwidth=0.25)
>>> pulse.autocorrelation(
... [-1.0, -0.75, -0.5, -0.25, 0.0, 0.25, 0.5, 0.75, 1.0],
... ).round(3)
array([0.386, 0.569, 0.752, 0.889, 0.939, 0.889, 0.752, 0.569, 0.386])
energy_density_spectrum()
The energy density spectrum $S(f)$ of the pulse.
For the Gaussian pulse, it is given by $$ S(f) = \frac{1}{2 \pi \bar{B}^2} \mathrm{e}^{-(f / \bar{B})^2}. $$
Examples:
>>> pulse = komm.GaussianPulse(half_power_bandwidth=0.25)
>>> pulse.energy_density_spectrum(
... [-1.0, -0.75, -0.5, -0.25, 0.0, 0.25, 0.5, 0.75, 1.0],
... ).round(3)
array([0. , 0.003, 0.11 , 0.883, 1.765, 0.883, 0.11 , 0.003, 0. ])