Program of the month: sfai2refl

August 2, 2013 Programs No comments

sfai2refl converts acoustic impedance to normal-incidence PP reflectivity using the simple equation
$$R(t) = \frac{I(t+\Delta t) – I(t)}{I(t+\Delta t) + I(t)}$$

The program is useful for convolution modeling. The following example from rsf/rsf/wedge shows a classic example of wedge modeling, which is used for analyzing the tuning phenomenon (Kallweit, R. and L. Wood, 1982, The limits of resolution of zero-phase wavelets: Geophysics, v. 47, 1035–-1046.)

A more sophisticated example from geo384w/hw5/sigsbee2 computes an effective reflectivity of the Sigsbee model:

The program has no parameters.

10 previous programs of the month

First Working Workshop

July 28, 2013 Celebration 2 comments

An unusual experiment in collaborative reproducible research took place in Austin, Texas, on July 25-27: 25 participants from 9 different organizations gathered at the Bureau of Economic Geology, The University of Texas at Austin for the First Madagascar Working Workshop. The participants divided into 10 teams of 2-3 people by pairing experienced Madagascar developers with novice users. Each team worked on a small project, updating either reproducible papers or entries in the migration gallery. At the conclusion of the meeting, the participants discussed their experience and plans for future workshops.

Butterfly algorithm for generalized Radon

July 26, 2013 Documentation No comments

A new paper is added to the collection of reproducible documents:
A fast butterfly algorithm for generalized Radon transforms

madagascar-1.5 released

July 24, 2013 Celebration No comments

The 1.5 stable release features nine new reproducible papers and multiple other enhancements including the addition of the RVL (Rice Vector Library) and IWAVE++ full waveform inversion packages from Bill Symes and The Rice Inversion Project.

According to the SourceForge statistics, the previous 1.4 stable distribution has been downloaded more than 3,000 times. The total number of Madagascar downloads is approaching 25,000. According to Ohloh.net,, the year before 1.5 release was the period of a record development activity, with 32 contributors (up 33% compared to the previous year) making 1,570 commits to the repository (up 35%). Ohloh.net says that Madagascar “has a well established, mature codebase maintained by a very large development team with increasing year-over-year commits” and estimated 167 man-years of effort.

Program of the month: sftime2depth

July 1, 2013 Programs 2 comments

sftime2depth converts the input from vertical time to depth coordinates.

The following example from rsf/su/rsflab9 shows a seismic image converted from time to depth by this transformation:

The example is borrowed from John Stockwell’s lecture notes on Geophysical Image Processing and translated from Seismic Unix to Madagascar. The transformation follows the simple equation
$$t = 2\,\int\limits_{0}^{z} \frac{d\zeta}{v(\zeta)}$$,
where $t$ is two-way vertical time, $z$ is depth, and $v(z)$ is vertical velocity.

The sampling of the output depth axis is controlled by nz=, dz=, and z0=. If the velocity (provided in the auxiliary velocity= file) is sampled in time rather than depth, use intime=y. If it is slowness rather than velocity, use slow=y. If the input is in one-way time rather than two-way time, use twoway=n. The interpolation is carried out using B-splines. The spline order is controlled by extend=. By default, cubic splines (extend=4) are used.

The inverse transformation is given by sfdepth2time.

In the presence of lateral velocity variations, the correct transformation from time to depth is not as simple and needs additional corrections. See Time-to-depth conversion and seismic velocity estimation using time-migration velocity.

10 previous programs of the month

Lowrank modeling in orthorhombic media

June 25, 2013 Documentation No comments

A new paper is added to the collection of reproducible documents:
Modeling of pseudo-acoustic P-waves in orthorhombic media with a lowrank approximation

Kirchhoff migration with traveltime source-derivatives

June 24, 2013 Documentation No comments

A new paper is added to the collection of reproducible documents:
Kirchhoff migration using eikonal-based computation of traveltime source-derivatives

Extending MATLAB interface

June 13, 2013 Systems No comments

For those using MATLAB interface to Madagascar, a new function, m8r, allows running Madagascar programs and workflows directly on MATLAB objects. The following MATLAB code runs regularized time-frequency analysis using sftimefreq:

% create chirp signal
t=0:0.001:1;
y=chirp(t,100,1,25,'q',[],'convex');

% spectragram analysis in MATLAB
spectrogram(y,256,200,256,1000);
set(gca,'xlim',[0,250]);
set(gca,'ydir','reverse');
ylabel('Time (s)');

% time-frequency analysis in Madagascar
tf = m8r('sftimefreq rect=50 nw=251 dw=1',y',0.001);

f = 0:250;
imagesc(t,f,tf);
xlabel('Frequency (Hz)');
ylabel('Time (s)');

Program of the month: sfwiggle

June 12, 2013 Programs No comments

sfwiggle plots data using the traditional seismic method of wiggly traces.

The following example from rsf/rsf/rsftour shows a typical output:

Similarly to other plotting programs, there are multiple parameters that control the output. For example, poly=y draws solid polygons for highlighting positive data, transp=y transposes the two axes, xreverse=y or yreverse=y reverse the corresponding axis. Data scaling is controlled with either the absolute clip (clip=) or percentage clip (pclip=).

The following example uses transp=y poly=y yreverse=y pclip=100 unit2=km unit1=s label1=Time label2=Offset:

Use seemean=y to display lines corresponding to the mean value, use zplot= to control relative separation between different traces (the default is 0.75). The following example from bei/sg/toldi uses zplot=0.4:

Finally, sfwiggle makes it possible to plot irregularly sampled data by providing trace coordinates in xpos= file and (optionally) coordinate range with xmin= and xmax=. The following example from jsg/avo/avo2 shows a seismic gather displayed with (a) sfgrey in trace-number coordinates and (b) sfwiggle in offset coordinates.

10 previous programs of the month:

Elastic wave equations on GPU

June 11, 2013 Documentation No comments

A new paper is added to the collection of reproducible documents:
Solving 3D anisotropic elastic wave equations on parallel GPU devices
This is the first contribution from the University of Western Australia.