Generating a Noisy ChirpΒΆ

This example shows how to generate a chirp signal, with some analytical gaussian noise, and the usage of the sigmerge function to combine them.

Figure 1.4 from the tutorial.

../_images/sphx_glr_plot_1_3_1_noisy_chirp_001.png
from tftb.generators import fmlin, sigmerge, noisecg
import matplotlib.pyplot as plt
import numpy as np

# Generate a chirp signal

n_points = 128
fmin, fmax = 0.0, 0.5

signal, _ = fmlin(n_points, fmin, fmax)

# Noisy chirp

noisy_signal = sigmerge(signal, noisecg(128), 0)
plt.plot(np.real(noisy_signal))
plt.xlim(0, 128)
plt.title('Noisy chirp')
plt.ylabel('Real Part')
plt.xlabel('Time')
plt.grid()
plt.show()

Total running time of the script: ( 0 minutes 0.149 seconds)

Gallery generated by Sphinx-Gallery