Week 7 (ish) update: Fourier transforms

As I mentioned in my last update, our data has been plagued by mysterious double peaks on some of the plots. The problem seems to go away for a while, then reappears for a few runs before vanishing again. We still don’t know why it’s happening or if it is going to affect the final quality of the data, but we would like to find out. To that end, I spent a week or so developing a script that would compute the Fourier transform of any subset of data we collect. A Fourier transform is an integral that returns the frequencies of the data. It’s based on the fact that every single function can be written as an infinite sum of sines and cosines of different frequencies. It’s easy to see for some functions; for example, a Fourier transform of sine(x) only has one frequency, 1, and so the Fourier transform will be 0 everywhere except for at 1. However, for more complicated functions, it becomes impossible to see the frequencies and very difficult to compute the integrals by hand.

By doing a Fourier transform of our data and comparing double peaked data to normal data, we could see if there were any frequencies that were present in one set and not the other. It took a while to get the script set up to show real frequencies, because the Root built-in Fourier transform function gives the shape of the transform but does not scale the axes correctly. In order to get real frequencies, I had to scale the x-axis with the frequency at which we were collecting data (which in turn required that I understand our data-collecting frequencies and how they differed for different variables). Setbacks aside, I eventually got it working and have since been on-call for various people to message me asking for Fourier transforms of whatever run and variable they are looking at in the moment. When we looked at a double-peaked run next to a normal run, we got this: From what we can see, there are no significant differences between the two runs (blue and red). Therefore, in terms of figuring out the cause of the double peaking, we’re back to square one. However, the Fourier transform script has been useful for several other people in their own analyses, so I’m still going to consider it to be a success.