# How to deal with signal not equally spaced in time when performing FFT?

I wonder to know what is the best way to handle not equally spaced in time signal when performing FFT ?

I guess it depends on the signal itself. I work with signal with about 1000 - 5000 samples and they can contain between 0 to 20% missing samples. And I am interested in both main frequencies AND amplitudes.

Currently I do a basic linear interpolation to "fill" missing samples. I heard somewhere that we could actually "fill" missing samples with NaN (I didn't try yet).

What do you think about these two options ? Advantages and disadvantages ?

• Do you know the original time-stamps? Or it is some unpredictable jitter?
– jojeck
Commented May 22, 2014 at 20:56
• Are you talking about duration of missing samples ? If so it can be random but most of the time they are continuous. For example in signal with a length of 1000, I can have three areas with 20 missing points and maybe some single missing points in other areas. I am not sure I answer to your question... Commented May 22, 2014 at 21:05
• Well - non equally spaced signal is usually caused by deviation of sampling period, i.e. sometimes you get your sample every 0.1 sec and sometimes every 0.12 second. I understand that in your case jitter is not a problem but missing samples? Therefore I might suggest some higher order interpolation techniques or splines. Eventually wavelet based methods can also provide satisfactory results.
– jojeck
Commented May 22, 2014 at 21:13
• Ok sorry. You're saying that when I get sample every 0.1s I can have a small shift and you're right but in that case we will admit that this shift is insignificant. So my question was about missing samples for example I get a sample for 0, 0.1, 0.2, 0.4 and 0.5. Here sample with timestamp 0.3 is missing. Commented May 22, 2014 at 21:20