Definition of omega in fourier_cos_filon
Hello,
First of all thank you for developing and maintaining a tool like dynasor it is very valuable (I am an experimentalist working with X-ray).
Summary
In the function fourier_cos_filon used to calculate the dynamic structure factor, I think (but could be wrong) the energy axis is not defined properly. To me, it looks like the w increment is twice smaller than it should be.
What is the current bug behavior?
Currently it is calculated using w = np.linspace(0, 2 * np.pi / (2 * dt), f.shape[1])
What is the expected correct behavior?
I think it should read w = np.linspace(0, 2 * np.pi / (2 * dt), f.shape[1] // 2 + 1)
w
w containes values in the interval [0, pi/dt).
length of w is f.shape[1] // 2 + 1.
These frequencies corresponds to the frequencies from an fft.
w == 2*np.pi*np.fft.rfftfreq(f.shape[1], dt)