I am trying to create a sine chirp in python using the following code but my results don't look correct.
from scipy.signal import chirp
import numpy as np
import matplotlib.pyplot as plt
t = np.linspace(0, 320e-9, 1601);
x = chirp(t, 2.5e9, 320e-9, 4.5e9, method='linear', phi=-90)
I have tried various frequencies but none of them looks normal.
You have about 5 samples per nanosecond. Even at 2.5 GHz, this is just meeting the Nyquist sampling rate. When the frequency reaches 4.5 GHz, the nyquist sample rate will be 9 Sa/ns, and you will be undersampling by a factor of nearly 2.
Increase the number of samples in your
linspacecall by a factor of at least 4, and be sure to zoom in your plot to a range where you can distinguish individual cycles of your signal.