next up previous [pdf]

Next: Resampling Up: Processing exercises Previous: Processing exercises

Windowing and plotting

Our next task is to window and plot a significant portion of the data. Add the following line to the SConstruct file:

The window command selects the first ten traces and the time window between 0.4 and 0.8 seconds.

We will plot the windowed data with three different plotting programs.

For convenience, plotting parameters are put in a string called plotpar. A Python string can be enclosed in single, double, or triple quotes. Triple quotes allow the string to span multiple lines. In this case, we use triple quotes for convenience. Next, we loop (using Python's for construct) through three different programs (wiggle, contour, and grey). For each program, the command portion of Result is formed by concatenating two strings with Python's addition operator.

Try running scons -Q wiggle.view. You should see something like the following output in your terminal:

bash$ scons -Q wiggle.view
< Txx.HH /path/to/RSF/bin/sfwindow n2=10 n1=200 f1=200 > windowed.rsf
< windowed.rsf /path/to/RSF/bin/sfwiggle transp=y poly=y yreverse=y 
pclip=100 nc=200 > Fig/wiggle.vpl
/path/to/RSF/bin/sfpen Fig/wiggle.vpl
and a figure similar to Figure 2 appearing on your screen. The -Q switch tells SCons to run in a quiet mode, suppressing verbose comments. We will use it from now on to save space. You can dismiss the figure by using the ``q'' key on the keyboard or by hitting the ``quit'' button.

Run scons -Q view, and you should see simply

bash$ scons -Q view
/path/to/RSF/bin/sfpen Fig/wiggle.vpl
Since the wiggle.vpl figure is up to date, SCons does not rebuild it. After quitting the figure, SCons will resume processing with
< windowed.rsf /path/to/RSF/bin/sfcontour transp=y poly=y yreverse=y 
pclip=100 nc=200 > Fig/contour.vpl
/path/to/RSF/bin/sfpen Fig/contour.vpl
and a figure similar to Figure 3 appearing on your screen. Quitting the figure, produces
< windowed.rsf /path/to/RSF/bin/sfgrey transp=y poly=y yreverse=y 
pclip=100 nc=200 > Fig/grey.vpl
/path/to/RSF/bin/sfpen Fig/grey.vpl
and Figure 4.

wiggle
wiggle
Figure 2.
To see this figure on your screen, run scons wiggle.view
[pdf] [png] [scons]

contour
contour
Figure 3.
To see this figure on your screen, run scons contour.view
[pdf] [png] [scons]

grey
grey
Figure 4.
To see this figure on your screen, run scons grey.view
[pdf] [png] [scons]


next up previous [pdf]

Next: Resampling Up: Processing exercises Previous: Processing exercises

2012-07-19