04-13-2008 10:26 AM
04-13-2008 12:49 PM
Zero padding is typically done in the frequency domain, in which case you simply increase the resolution in the time domain without adding distortions (basically an iterpolation).
You seem to pad the time domain signal. This is very difficult to justify because it dramatically distorts the signal. Why do you think you need to have the same sizes?
04-14-2008 01:54 AM
04-14-2008 02:04 AM
04-14-2008 02:16 AM
04-14-2008 03:10 AM - edited 04-14-2008 03:16 AM
04-14-2008 03:33 AM
04-14-2008 03:58 AM
04-14-2008 10:09 AM - edited 04-14-2008 10:11 AM
The problem is that you have a truncated wave and thus zero padding adds a sharp boundary with many new frequencies. Look at the FFT before and after padding in the above example.

Zero padding in the time domain is typically done in decaying wave signals (such as encoutered in NMR FIDs), where the signal has nearly disappeared at the end due to T2 effects. In these cases, zero padding is much more appropriate. That's how I use it.

For example, the following image shows a simulated DEER signal. Here zero padding does not cause much distortion, because the signal has basically decayed to zero. However, zero padding is needed to get a reasonable resolution in the fourier transform. For example, a plain transform without padding will not be able to describe a frequency that contains 1.5 periods in the original signal, while after padding to twice the size, it would be an integer number of periods and thus correspond to a value in the transform.
Since you are chopping up your (very long) original signal, you are probably not interested in the very low frequency signals anyway and I doubt that zero padding is really waht you are looking for. If you zero pad, you might want to add a windowing function to soften the sharp boundary and the patch location. Can you show us some typical data? Maybe it would be more reasonable to just toss the extra tail. Maybe you could also include an overlapping piece and do the last transform with a subset of equal size ending at the end of the data and including some of the data from the previous piece?
If the frequencies really change over time and that last piece is very important, you might need to do something more fancy anyway, e.g. a sliding widow. Have a look at the JTFA toolkit (http://zone.ni.com/devzone/cda/tut/p/id/3548).
04-15-2008 01:14 AM