In [6]:
import numpy as np
import matplotlib.pyplot as plt
%matplotlib inline
In [ ]:
x = np.linspace(0, 10, 101)*1e-6
In [37]:
length = 10e-6
samplingRate = 1e9
sigma = 10e-7
amp = 1
freq = 1.e6
numPts = np.round(length*samplingRate)
timePts = (1.0/samplingRate)*np.arange(numPts)
realpulse = amp*(np.cos(2*np.pi*timePts*freq)).astype(np.complex)
imagpulse = -1j*amp*(np.sin(2*np.pi*timePts*freq)).astype(np.complex)
plt.plot(timePts, realpulse, timePts, np.imag(imagpulse))
Out[37]:
In [32]:
Out[32]:
In [31]:
pulse
Out[31]:
In [22]:
np.cos(2.*np.pi*timePts)
Out[22]:
In [30]:
timePts
Out[30]:
In [ ]: