RNA Interpolation

November 21, 2011 Documentation No comments

A new paper is added to the collection of reproducible documents:
Seismic data interpolation beyond aliasing using regularized nonstationary autoregression

Fourier finite differences

November 16, 2011 Documentation No comments

A new paper is added to the collection of reproducible documents:
Fourier finite-difference wave propagation

Program of the month: sfenvelope

November 5, 2011 Programs No comments

Complex trace attributes were introduced into geophysics by the paper

Taner, M. T., F. Koehler, and R. E. Sheriff, 1979, Complex seismic trace analysis: Geophysics, 44, 1041-1063.

If $s(t)$ is the input seismic trace, then the analytical trace is defined as the complex-valued signal $a(t) = s(t)+i h(t)$, where $h(t)$ is the Hilbert transform of $s(t)$

$$h(t) =\displaystyle \frac{1}{\pi} \int \frac{s(\tau)}{t-\tau} d\tau\;.$$

The signal envelope is the positive signal $e(t)=\sqrt{s^2(t)+h^2(t)}$. A phase-rotated seismic signal is $p(t)=s(t)\,\cos{\phi} +h(t)\,\sin{\phi}$ where $\phi$ is the phase of rotation. By default, sfenvelope computes the signal envelope. It can also produce a phase-rotated signal if given hilb=y and phase=. If phase=90 (the default value), the phase-rotated signal will be simply the Hilbert transform of the input.

The following figure from book/rsf/rsf/sfenvelope illustrates an application of sfenvelope:

Computing the discrete Hilbert transform is not a trivial task. In the Fourier domain, the continuous Hilbert transform is given by

$$\displaystyle H(\omega) = i\,\operatorname{sgn}(\omega)\,S(\omega)$$

where $\operatorname{sgn}$ is the sign function. The discontinuity of the sign function in the frequency domain at $\omega=0$ is related to the slow $1/t$ decay of the filter impulse response in the time domain. The discontinuity at the Nyquist frequency creates additional oscillations. Different practical implementations shorten the filter impulse response by effectively smoothing the Fourier-domain discontinuities. The Madagascar implementation of the discrete Hilbert transform follows the algorithm described in

Pei, S.-C., and P.-H. Wang, 2001, Closed-form design of maximally flat FIR Hilbert transformers, differentiators, and fractional delayers by power series expansion: IEEE Trans. on Circuits and Systems, v. 48, No. 4, 389-398.

The accuracy/cost trade-off is controlled by two parameters: order= and ref=. The following figures frombook/rsf/rsf/sfenvelope illustrate the effect of the order= parameter:

The Seismic Unix implementation (suhilb program) applies a Hamming window in the time domain. For some reason, it has the filter polarity reversed:

A multidimensional analog of the Hilbert transform is the Riesz transform. It is implemented in the sfriesz program.

Tutorial

November 5, 2011 Documentation No comments

New users often ask for a brief comprehensible introduction to Madagascar. Jeff Gowdin contributes A brief introduction to Madagascar, a tutorial book designed to provide such an introduction.

The purpose of this document is to teach new users how to use the powerful tools in Madagascar to: process data, produce documents and build your own Madagascar programs.

You can access the tutorial in the following forms:

Science Code Manifesto

October 15, 2011 Links 1 comment

You can endorse or discuss Science Code Manifesto published this week at http://sciencecodemanifesto.org/

Software is a cornerstone of science. Without software, twenty-first century science would be impossible. Without better software, science cannot progress.
But the culture and institutions of science have not yet adjusted to this reality. We need to reform them to address this challenge, by adopting these five principles:

Code
All source code written specifically to process data for a published paper must be available to the reviewers and readers of the paper.
Copyright
The copyright ownership and license of any released source code must be clearly stated.
Citation
Researchers who use or adapt science source code in their research must credit the code’s creators in resulting publications.
Credit
Software contributions must be included in systems of scientific assessment, credit, and recognition.
Curation
Source code must remain available, linked to related materials, for the useful lifetime of the publication.

Nick Barnes, the author of the Manifesto, explains its creation as follows:

I wrote it for the Climate Code Foundation, initially as a response and contribution to the Royal Society’s policy study on “Science as a Public Enterprise”. It is partly inspired by the Panton Principles, a bold statement of ideals in scientific data sharing. It refines the ideas I laid out in an opinion piece for Nature in 2010.
However, I did not originate these ideas. They are simply extensions of the core principle of science: publication. Publication is what distinguishes science from alchemy, and is what has propelled science – and human society – so far and so fast in the last 300 years. The Manifesto is the natural application of this principle to the relatively new, and increasingly important, area of science software.
My own ideals, influenced by the Free and Open Source Software movement, go beyond those stated in the Manifesto: I believe that Open Source publication of all science software will be one outcome of the current revolution in scientific methods, a revolution in which I hope this Manifesto will play a part.

Program of the month: sfagc

October 1, 2011 Programs No comments

sfagc implements Automatic Gain Control, a popular technique for normalizing signal amplitudes.
The algorithm is simple: divide the signal by its smoothed absolute value. The smoothing is controlled by rect#= and repeat= parameters, similar to the ones used by sfsmooth.
The following example from rsf/rsf/sfagc illustrates the application of sfagc in comparison with the application of sfpow, which applies a gain based on a power of time. The gains are applied to a shot gather from Alaska from the collection of shot gathers by Yilmaz and Cumro. A similar example appears on page 236 in Jon Claerbout’s Imaging the Earth’s Interior.

For a more accurate algorithm, try sfshapeagc, which computes the gain function using shaping regularization.

Which country has the most Madagascar users?

September 11, 2011 FAQ No comments

During the last four years, there have been nearly 170,000 visits to the Madagascar website (including 126 visits from the island of Madagascar). The top ten countries, as counted by Google Analytics, are: USA, China, Canada, UK, Brazil, Germany, Italy, Saudi Arabia, France, and India.

If the top ten are normalized by population (to compute visits per capita), they become: Canada, Saudi Arabia, USA, UK, Italy, France, Germany, Brazil, China, and India.

Program of the month: sfclip

September 3, 2011 Programs No comments

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.

Reversible transform

August 29, 2011 Documentation No comments

A new paper is added to the collection of reproducible documents:
A reversible transform for seismic data processing

Open-source governance

August 17, 2011 Links 1 comment

In a recent report, VisionMobile points out that Open Source is not only about licensing but also about the governance model adopted by open-source projects.

The governance model used by an open source project encapsulates all the hard questions about a project. Who decides on the project roadmap? How transparent are the decision-making processes? Can anyone follow the discussions and meetings taking place in the community? […] Governance determines who has influence and control over the project or platform – beyond what is legally required in the open source license.

The governance model adopted by Madagascar is exceptionally flat and open. So far, 50 people have been given write access to the Subversion repository. Nobody who asked for an access has been denied it so far. Everyone of the 50 developers has equal rights to add, remove, or modify code. We coordinate our efforts through the developer mailing list and annual meetings. This open governance model is a distinctive feature of the Madagascar project, which should be emphasized when comparing it with other projects. VisionMobile states in its report: “Our research suggests that platforms that are most open will be most successful in the long-term.