I've coded up the FFT for a dataset I'm working with. My intent is to create a waterfall plot of the result, but the problem I'm running into is if I change my input data size, then I get a different number of frequency bins. Currently I'm just making my input dataset twice the size of the number of pixels I need to map to. I'm trying to figure out a way to map the frequency bins of any data set size to a specific number of pixels. For example, mapping an array of 500 values to an array that is 1250 elements long. It would be nice to have the option to perform linear and non-linear interpolation on the data mapping. I also might need to go the other way, say to map the values to an array that is 300 elements long. I'm not a math major and am coming up with a blank on this one.

## 1 Answer

Pick a large number of points to discretize the frequency domain with. When you have a time signal with less points zero pad until you hit that number. This is sometimes called "spectral interpolation" https://ccrma.stanford.edu/~jos/st/Zero_Padding_Theorem_Spectral.html and does a nice job of interpreting the frequency domain.

useyour FFT for, it might help: note that there are many other types of data representation, and the FFT is not always the most suitable one to use. The choice of solution is strongly dependent on your intended application. $\endgroup$mathematicalquestion. Suppose you had theexactFourier transform available; how would you use that to make your decisions? Are you planning to try to judgeby eyefrom the frequency graph? Does the same type of rock always give a similar frequency distribution? Otherwise, the FFT is not likely to be useful. $\endgroup$mathematicaldetails until you have a betterphysicalunderstanding. $\endgroup$statisticalapproach: collect masses and masses of data and try to get a computer to find patterns/correlations in the data. But I don't know how likely this is to succeed. $\endgroup$1more comment