# How would I use FFT for derivatives?

jjweimer

Mon, 08/29/2016 - 05:42 pm

- FFT a spectrum
- cut noise above a specific frequency
- differentiate
- measure a characteristic parameter in the derivative

I've got the tools to do the FFT and remove the noise. I know how to get this to work well, and I know it is a more rigorous smoothing method than N-point smoothing. I don't yet have the full appreciation of the derivative in FFT space. I found this reference ...

http://math.mit.edu/~stevenj/fft-deriv.pdf

... and note in particular Algorithm 1 on page 5. I think this can be directly implemented in Igor Pro. Has anyone gone down this path to do a derivative in FFT space?

There is a brief discussion of this topic in the Image Processing Tutorial. Execute

I'm not sure why you would choose to use this approach to compute the derivative (unless you are looking for MatrixOP applications :). Although the method is fast, it could potentially introduce undesirable sampling artifacts.

A.G.

WaveMetrics, Inc.

August 31, 2016 at 07:15 am - Permalink

My interest in doing derivatives in the FFT domain is because I will be in that domain for the smoothing operation. Eventually, I would want to check the speed increase too, but only if the proof of concept algorithm that I have in mind proves to be reliably better in precision and accuracy than the current approach taken in the literature (n-point smoothing + n-point derivative).

As to the "artifacts", if you mean Gibb's oscillations at the end points ... yes, I know. I have a "trick" though. I subtract a line, mirror/invert the spectrum through an end point, and add the inversion to the original (doubling the range). Then, I do the FFT and filter out the noise. This eliminates the majority (if not all) of the end-point oscillations when the filtered FFT is inverted back and the "smoothed" spectrum is recovered.

--

J. J. Weimer

Chemistry / Chemical & Materials Engineering, UAH

August 31, 2016 at 07:48 am - Permalink