-
Notifications
You must be signed in to change notification settings - Fork 6
Get_FFT
from Get_FFT import Filon_COS
Filon_COS(C, t, a=0, outputfile='')
- C: the auto-correlation function in a numpy array
- t: the time frame corresponding to C in a numpy array
- a: frequency interval for FFT, default is 0 so as to be determined as
$2\pi/t_{max}$ - outputfile: the filename of writing out the FFT results
Example
Filon_COS(C, t, a=0, outputfile='')
Description
This module performs Fourier Transformation by using the Filon's integral method (cosine) via:
$$
\begin{align*}
D(\omega)
&=\frac{1}{\pi} \int_{-\infty}^{+\infty} C(t)\cos(\omega t)dt\
&=\frac{1}{\pi}2\int_{t_0=0}^{t_{2n}=\infty} C(t)\cos(\omega t)dt \
&=\frac{1}{\pi}2\delta t(\alpha[C_{2n}\sin(\omega t_{2n})-C_0\sin(\omega t_0)] +\beta F_{2n}+\gamma F_{2n-1})
\end{align*}
$$
where
References
https://mathworld.wolfram.com/FilonsIntegrationFormula.html
http://www.ccl.net/cca/software/SOURCES/FORTRAN/allen-tildesley-book/f.37.shtml
Allen and Tildesley, Computer Simulation of Liquids, Appendix D [P506]