The standard spectral diagram looks much like your last plot, though your function produces much more than 10**-4 in the pass band.
import matplotlib.pyplot as plt
import numpy as np
def a(t: np.ndarray) -> np.ndarray:
return (
5.4547990171221e-20 * np.sin(4.35893728452007e-5 * t)**2
- 6.80677962622999e-40 * np.sin(4.35893728452007e-5 * t) * np.cos(4.35893728452007e-5 * t)
+ 3.84259827520928e-19 * np.sin(2831.25294891184 * t)**2
- 2.77555756156289e-17 * np.sin(2831.25294891184 * t) * np.cos(2831.25294891184 * t)
+ 5.45479901712209e-20 * np.cos(4.35893728452007e-5 * t)**2
- 3.87725551857472e-22 * np.cos(2831.25294891184 * t)**2
+ 1391.74933087011 * np.exp(-40.0880015429485 * t) * np.sin(2831.25294891184 * t)
+ 9.5003864918335e-13 * np.exp(-40.0880015429485 * t) * np.cos(2831.25294891184 * t)
- 0.000158807497479067 * np.exp(-9.500167e-15 * t) * np.sin(4.35893728452007e-5 * t)
+ 2094.39510239319 * np.exp(-9.500167e-15 * t) * np.cos(4.35893728452007e-5 * t)
)
fsample = 1e5
tsample = 1/fsample
t = np.arange(0, 1, tsample)
a_t = a(t)
a_f = np.abs(np.fft.rfft(a_t))
f = np.fft.rfftfreq(n=t.size, d=tsample)
fig, ax = plt.subplots()
ax.loglog(f, a_f)
plt.show()
another answer