label=r"$-f_{sig}(t)\ \sin(\omega t)$", ) plot(t * 1e6, 1e-6 * full_wave.real, "b-", alpha=0.8, marker="None", linewidth=2, label=r"$f_{sig}(t)\ \cos(\omega t)$") xlabel("Time ($\mu s$)", fontsize=14) ylabel("V", fontsize=14) xlim(4, 6) subplot(212) output = np.fft.fft(full_wave) plot(1e-6 * unfuckup(np.fft.fftfreq(len(full_wave), 1.0 / f_sample)), 1e-18 * unfuckup(abs(output) ** 2), "-") LO_freq = lofreq / 256.0 * 200 ylim(1e-5, ylim()[1] * 10) bleh = ylim() semilogy([0, 0], bleh, "k:") text(-9, 1, r"$%.3f MHz$" % (-LO_freq - 6), fontsize=16) text(-4, 0.1, r"$%.3f MHz$" % (-LO_freq), fontsize=16) text(3, 1, r"$%.3f MHz$" % (-LO_freq + 6), fontsize=16) ylim(*bleh) # legend(loc=2, fontsize=14) xlim(-15, 15) xlabel("Frequency (MHz)", fontsize=14) ylabel("Power", fontsize=14) subplot(211) tfilt, vfilt = fourier_filter(output, 200e6, kill_freqs=(-3.125e6, -9.125e6), kill_radius=5) plot(tfilt * 1e6, 1e-6 * vfilt.real, "k-", linewidth=5, label="Re[Filtered]") plot(tfilt * 1e6, 1e-6 * vfilt.imag, "k-", linewidth=5, alpha=0.5, label="Im[Filtered]") xlim(3.9, 5.1) legend(fontsize=14)
subplot(211) text(-3.9, 0.4, r"$-4.1 MHz$", fontsize=14) text(-1.3, 0.6, r"$-0.1 MHz$", fontsize=14) text(0.3, 0.6, r"$0.1 MHz$", fontsize=14) text(2.9, 0.4, r"$4.1 MHz$", fontsize=14) subplot(212) text(-3.8, 0.4, r"$-3.9 MHz$", fontsize=14) text(-1.3, 0.6, r"$-0.1 MHz$", fontsize=14) text(0.3, 0.6, r"$0.1 MHz$", fontsize=14) text(2.9, 0.4, r"$3.9 MHz$", fontsize=14) ylim(0, 0.9) # now the fourier filtered waveform figure(3) subplot(121) t, v = fourier_filter(np.fft.fft(data_p), 1.0 / dt, kill_freqs=(4.1e6, -4.1e6), kill_radius=5) plot(t * 1e6, v, "-", color="Orange", linewidth=2) xlabel(r"Time ($\mu s$)", fontsize=14) ylabel("V", fontsize=14) xlim(100, 120) ylim(-0.25, 0.25) subplot(122) t, v = fourier_filter(np.fft.fft(data_m), 1.0 / dt, kill_freqs=(3.9e6, -3.9e6), kill_radius=5) plot(t * 1e6, v, "-", color="Blue", linewidth=2) xlabel(r"Time ($\mu s$)", fontsize=14) xlim(100, 120) ylim(-0.25, 0.25) gca().set_yticklabels([], visible=False)