Month: July 2015

Hello Github!

July 28, 2015 Links No comments

In a major administrative change, the code repository of the Madagascar project, which has been hosted by SourceForge for more than 9 years and more than 12,000 revisions, is being moved to GitHub. The location of the Madagascar project on GitHub is The move has been discussed several times previously. The former major hub of open-source projects, SourceForge has been loosing popularity among open-source software developers and went through some bad publicity recently because of their practice of injecting malware into open-source projects. The final straw, which prompted our move, was the whole cite going down in July 2015 and taking more than a week to restore access to repositories. DHI Group, Inc. announced today its plans to sell the Slashdot Media business, which includes Slashdot and SourceForge.

GitHub brings a social-networking aspect to open-source software development, as well as many other useful tools and enhancements. Its success story was desribed in the recent article in Wired How GitHub Conquered Google, Microsoft, and Everyone Else.

The repository has been converted to Git, but if you prefer to use Subversion, you can continue to do so thanks to the svn bridge. See for instructions. If you need a developer access to commit changes directly to the master branch of the repository, please register at GitHub and send your GitHub login name to the project administrator. Everyone else should be able to participate in the project development by using Git’s preferred way of “pull requests”.

More colormaps

July 12, 2015 Systems No comments

The most popular colormap in Madagascar, other than the default greyscale, is color=j, modeled after “jet“, which used to be the default colormap in MATLAB. More than 1,000 Madagascar examples use color=j. In October 2014, with release R2014b (Version 8.4), MATLAB switched the default colormap to a different one, called “parula“. The “parula” colormap is copyrighted by MathWorks as a result of a creative process (solving an optimization problem). No open-source license is given to use it outside of MATLAB. According to Steve Eddins, “this colormap is MathWorks intellectual property, and it would not be appropriate or acceptable to copy or re-use it in non-MathWorks plotting tools.” Stéfan van der Walt and Nathaniel Smith from the Berkeley Institute for Data Science have developed several new open-source colormaps with good perceptual properties. One of them (named “viridis“) is proposed as a good replacement for “jet” and as the default colormap in matplotlib 2.0. Is it a good colormap? We can find out by using tools from Matteo Niccoli’s tutorial on colormaps. This analysis shows the intensity and lightness distributions of “viridis” are nicely linear. In his presentation at SciPy-2015, Nathaniel Smith explains the rational for this choice.

Program of the month: sfmutter

July 10, 2015 Celebration No comments

sfmutter performs a mute operation, common in prestack seismic data processing.

The following example from bei/wvs/vscan shows a seismic CMP gather before and after a mute.

sfmutter multiples the input by a weight, which follows the equation

$$W(t,x) = \left\{\begin{array}{rl} 0 & \quad \mbox{for} \quad t – t_0 < p_0\,(x-x_0) \\ 1 & \quad \mbox{for} \quad t – t_0 > \Delta t + p_1\,(x-x_0) \end{array}\right.$$

The weight is smoothly interpolated in between the two regions. Different parameters appearing in this equation can be specified as inputs for sfmutter: t0= and x0= correspond to $t_0$ and $x_0$; tp= corresponds to $\Delta t$; slope0= and slopep= correspond to $p_0$ and $p_1$, respectively. The slope can be specified by velocity v0= such that $p_0=1/v_0$. By default, $p_1=p_0$.

The parameter half= indicates whether the horizontal axis corresponds to half-offset instead of the full offset (true by default). In case of irregular offsets, they can be provides in a file specified by offset=. The parameter abs= controls whether to use the absolute value of the offset in the calculation of the mute (true by default).

To make a hyperbolic mute, instead of the default linear mute, use hyper=y. In this case, the equation changes to

$$W(t,x) = \left\{\begin{array}{rl} 0 & \quad \mbox{for} \quad (t-t_0)^2 < p_0^2\,(x-x_0)^2 \\ 1 & \quad \mbox{for} \quad (t-t_0)^2 > (\Delta t)^2 + p_1^2\,(x-x_0)^2 \end{array}\right.$$

The following example from xjtu/mcaseislet/sep2 applies a hyperbolic mute for an SRME prediction of surface-related multiple reflections:

For inner mute, specified by inner=y, the signs in the equation are reversed. The following example from milano/taupvel/cmp applies an inner mute to a Radon-transformed CMP gather:

10 previous programs of the month:

Tutorial on seismic petrophysics, Part 1

July 8, 2015 Examples No comments

The example in rsf/tutorials/petro1 reproduces the tutorial from Alessandro Amato del Monte on seismic petrophysics (Part 1). The tutorial was published in the April 2015 issue of The Leading Edge.

Madagascar users are encouraged to try improving the results.