plt.semilogy(t, np.abs((tspline10 - tresp) / tresp), label='Splined 10/dec') plt.xlabel('Time (s)') plt.tight_layout() plt.show() ############################################################################### # Runtimes and number of required frequencies for each method: # # +-------------------+-----------+------------------+ # |Fourier DLF Method | Time (ms) | # of frequencies | # +===================+===========+==================+ # |Standard | 1442 | 8100 | # +-------------------+-----------+------------------+ # |Lagged Convolution | 17 | 105 | # +-------------------+-----------+------------------+ # |Splined 4/dec | 14 | 37 | # +-------------------+-----------+------------------+ # |Splined 10/dec | 32 | 91 | # +-------------------+-----------+------------------+ # # All methods require 201 wavenumbers (1 offset, filter length is 201). # # So the lagged convolution has a relative error of roughly 1e-5, hence 0.001 # %, which is more then enough for real-world applications. # # If you want to measure the runtime on your machine set ``tparam['verb'] = # 2``. empymod.Report()
# (F) Plots # --------- plt.figure(figsize=(5, 4)) ax1 = plt.subplot(111) plt.title("Resistive cube in a deep marine setting") plt.plot(times, epm_bg * 1e9, ".4", lw=2, label="empymod") plt.plot(times, spg_bg * 1e9, "C0--", label="SimPEG Background") plt.plot(times, spg_tg * 1e9, "C1--", label="SimPEG Target") plt.ylabel("$E_x$ (nV/m)") plt.xscale("log") plt.xlim([0.1, 10]) plt.legend(loc=3) plt.grid(axis="y", c="0.9") plt.xlabel("Time (s)") # Switch off spines ax1.spines["top"].set_visible(False) ax1.spines["right"].set_visible(False) plt.tight_layout() plt.show() ############################################################################### empymod.Report([SimPEG, discretize, pymatsolver])