    Revisiting SEP tour with Madagascar and SCons  Next: Normal Moveout Up: Processing exercises Previous: Windowing and plotting

## Resampling

The next example demonstrated simple signal processing using the Fast Fourier Transform. We will first subsample the original data and then recover the data using Fourier interpolation.

Subsampling is accomplished with sfwindow.

Running scons -Q subsampled.rsf produces

```< windowed.rsf /path/to/RSF/bin/sfwindow j1=2 > subsampled.rsf
```
We can verify that the size of the first axis has decreased by running

```sfin windowed.rsf subsampled.rsf.
```

Try also sfwiggle < subsampled.rsf | sfpen to quickly inspect the subsampled data on the screen.

To interpolate the data back to the original sampling, the following sequence of steps can be applied:

1. Fourier transform from time domain to frequency domain.
3. Inverse Fourier transform from frequency to time.
All three steps are conveniently combined into one using pipes.

Why do we pad the Fourier domain to 102? The time length of the original data is 201 samples. In the frequency domain, it can be represented with 101 positive frequencies plus the zero frequency, which amounts to 102. Note that the output of sffft1 does not contain negative frequencies.

Finally, we display the result. The reconstructed data is shown in Figure 5. Comparing this result with Figure 2, we can verify a fairly accurate reconstruction. resampled
Figure 5.
To see this figure on your screen, run scons resampled.view   As an exercise, try subsampling the data by a factor of 4 and see if you can still reconstruct the original data with the Fourier method.    Revisiting SEP tour with Madagascar and SCons  Next: Normal Moveout Up: Processing exercises Previous: Windowing and plotting

2012-07-19