FAQ

Figure size

March 28, 2005 FAQ No comments

How can I control the figure size or aspect ratio?
There are three basic parameters: screenratio, screenht, and sreenwd. If sreenwd is not provided, it is calculated as screenht/screenratio. The defaults are:
screenratio=0.75
screenht=10.24
For a finer control, you can use xinch= (horizontal size), yinch= (vertical size), xll=, xur=, yll=, yur= (x and y coordinates for lower-left and upper-right corners). If not provided, they are calculated from screenht and screenwd.
These parameters apply to sfcontour, sfgraph, sfgrey, sfplotrays, and sfwiggle.

Color schemes

March 28, 2005 FAQ 2 comments

What color schemes are available in sfgrey and sfgrey3?
The color scheme in sfgrey and sfgrey3 is selected by color= parameter. The default is color=I.
The picture shows different color schemes available.

Changing from uppercase to lowercase letters reverses the color scale:

Adding “C” to the colorscheme name highlights the clipped values:

These examples are taken from rsf/rsf/sfgrey.

FFT

March 17, 2005 FAQ 5 comments

How is FFT implemented in RSF? What FFT conventions are used? What choices of array size are efficient?
There are two main fft programs: sffft1 and sffft3.
sffft1 takes real input and transforms it to complex by applying real-to-complex FFT on the first axis. It does the inverse transform when inv=y.
sffft3 applies complex-to-complex FFT on the specified axis. The sign of the transform is determined by the sign parameter.
sfcosft applies real-to-real cosine transform.
Here is an example 2-D FFT figure from Jon Claerbout reproduced in bei/ft1/plane4:

RSF utilizes the KISS FFT library for applying FFT. There are some faster open-source software solutions available, most notably FFTW but KISS (Keep It Simple, Stupid) FFT is attractive because of it simplicity and compactness. The library can handle an arbitrary data size. However, some sizes (prime factor powers) are more efficient than others. For example, here are CPU times for running sffft1 on files with different sizes:

n1 CPU time
999,999 0.01 s
1,000,000 0.01 s
1,000,001 1.64 s

Update: sffft1, sffft3, and some other programs that use FFT, now pad the data to the nearest optimal size.

VERSION and SVN

March 16, 2005 FAQ No comments

How do I make the VERSION line of self doc work correctly?
Make sure the tag $Id$ is in the file and run
svn propset svn:keywords Id filename
The version information will be updated when you make changes to the file and commit it to the repository.