sfclip is very simple yet very useful program. It "clips" the data to the specified maximum by the absolute value.

Here is a simple test. First, let us make some data.

bash$ sfmath n1=10 output="sin(x1)" > data.rsf

bash$ < data.rsf sfdisfil

0: 0 0.8415 0.9093 0.1411 -0.7568

5: -0.9589 -0.2794 0.657 0.9894 0.4121

Now clip it to 0.5 by maximum absolute value.

bash$ < data.rsf sfclip clip=0.5 > clip.rsf

bash$ < clip.rsf sfdisfil

0: 0.5 0.5 0.5 0.1411 -0.5

5: -0.5 -0.2794 0.5 0.5 0.4121

What if you need to clip the data not by the maximum value but to a specified range? Use

sfclip2.

bash$ < data.rsf sfclip2 lower=0 upper=0.9 > clip2.rsf

bash$ < clip2.rsf sfdisfil

0: 0 0.8415 0.9 0.1411 0

5: 0 0 0.657 0.9 0.4121

**sfclip** should handle correctly infinite values, for example those resulting from division by zero.

bash$ sfmath n1=10 output=1/x1 > data.rsf

bash$ < data.rsf sfdisfil

0: inf 1 0.5 0.3333 0.25

5: 0.2 0.1667 0.1429 0.125 0.1111

bash$ < data.rsf sfclip clip=0.3 > clip.rsf

bash$ < clip.rsf sfdisfil

0: 0.3 0.3 0.3 0.3 0.25

5: 0.2 0.1667 0.1429 0.125 0.1111

A prototype of

**sfclip** is used as an example in

Guide to madagascar API. The

actual program is a little different.

sfsmooth, one of the most useful Madagascar programs, implements smoothing by triangle filtering. The idea of triangle filtering is explained in Jon Claerbout's books Processing versus Inversion and Image Estimation by Example. You can find the explan

Weblog:Madagascar development blogTracked:Jan 12, 12:33sfspectra computes spectrum, the absolute value of the 1-D Fourier transform along the fast axis. The following example from rsf/su/rsfkasper shows a seismic shot gather before and after high-pass filtering and the corresponding spectra computed with

Weblog:Madagascar development blogTracked:Mar 18, 17:16sfgrey3 generates "cube" plots from 3-D data. A cube plot displays sections from a 3-D cube as faces of the cube. Some of the options specific to this kind of display are: flat= The flat parameter tells sfgrey3 whether to display the cube as a

Weblog:Madagascar development blogTracked:Apr 09, 12:42sfderiv applies the first derivative filter. The algorithm implemented in this program is described in the paper Pei, S.-C., and P.-H. Wang, 2001, Closed-form design of maximally flat FIR Hilbert transformers, differentiators, and fractional delaye

Weblog:Madagascar development blogTracked:May 06, 08:10sfderiv applies the first derivative filter. The algorithm implemented in this program is described in the paper Pei, S.-C., and P.-H. Wang, 2001, Closed-form design of maximally flat FIR Hilbert transformers, differentiators, and fractional delaye

Weblog:Madagascar development blogTracked:May 06, 08:11sfderiv applies the first derivative filter. The algorithm implemented in this program is described in the paper Pei, S.-C., and P.-H. Wang, 2001, Closed-form design of maximally flat FIR Hilbert transformers, differentiators, and fractional delaye

Weblog:Madagascar development blogTracked:Jun 02, 06:46sfdip estimates a local slope (dip) using the plane-wave destruction algorithm. The dip is measured in time samples. If α is the dip angle, then the output of sfdip corresponds to the dimensionless quantity p=tanα. The following example

Weblog:Madagascar development blogTracked:Jun 04, 05:46sffft3 implements a complex-to-complex Fast Fourier Transform (FFT) along an arbitrary axis. The FFT library that Madagascar uses is KISS FFT, created by Mark Borgerding. KISS stands for Keep it simple, Stupid! KISS FFT may not be as fast as FFTW but i

Weblog:Madagascar development blogTracked:Jul 08, 12:34Previous programs of the month:sffft3sfdipsfderivsfgrey3sfspectrasfnoisesfgraphsfclipsfagcsfenvelopesfcontoursfsmooth

Weblog:Madagascar development blogTracked:Sep 03, 14:02sfpick performs automatic picking from semblance-like panels. The underlying algorithm is described in Appendix B of the paper Velocity analysis using AB semblance and is inspired by the method of virtual endoscopy in medical imaging. The following

Weblog:Madagascar development blogTracked:Sep 08, 16:07sfiwarp performs mapping between different coordinates. If you have sampled functions f(x) and y(x), sfiwarp with inv=y (the default) finds sampled f(y). If inv=n, sfiwarp takes f(y) and y(x) and finds f(x). In both cases, the sampled y(x) function is sup

Weblog:Madagascar development blogTracked:Sep 09, 12:52sfpick performs automatic picking from semblance-like panels. The underlying algorithm is described in Appendix B of the paper Velocity analysis using AB semblance and is inspired by the method of virtual endoscopy in medical imaging. The following

Weblog:Madagascar development blogTracked:Sep 09, 12:52sfkirmod is a program for modeling seismic reflection data using the Kirchhoff method. According to this method, the reflection response is computed by integrating over the reflector surface. For a theoretical derivation, see, for example, Haddon, R. A

Weblog:Madagascar development blogTracked:Oct 13, 19:46