A hardcore Madagascar user does not need anything more than a friendly editor (to edit SConstruct files) and the good old command line (to run scons commands). However, sometimes it is necessary to provide simplified GUIs (Graphical User Interfaces) for inexperienced users. Creating GUIs in Python is quite simple. An example is provided in rsf/rsf/gui. In this example, we obtain a compressed approximation of a piecewise-regular signal with by a wavelet transform. The figure using default parameters is shown below:
There are two main parameters in this experiment: the type of the wavelet transform (type= parameter in sfdwt) and the thresholding percentile (pclip= parameter in sfthreshold). The first step is to expose these parameters to CLI (Command Line Interface) by using ARGUMENTS.get construct in SConstruct:
# Wavelet transform type
type = ARGUMENTS.get('type','b')
# Thresholding percentile
pclip = int(ARGUMENTS.get('pclip',50))
Now one can select parameters on the command line by launching something like
scons type=b pclip=50 view
Next, we build the GUI by using one of the Python interfaces. The gui.py script provides an interface using Tkinter, the most standard Python GUI package. It allows the user to select the parameter values graphically. Clicking the Run button would then launch scons with the selected parameters in the background.
An alternative, both simple and powerful GUI package is Traits from Enthought Inc. An example Traits-based interface interface is provided by gui-traits.py.
For full-featured GUIs exposing all program parameters, one can use the Madagascar interface to TKSU or OpendTect.