Difference between revisions of "Package overview"

From Madagascar
Jump to navigation Jump to search
(combined with previous "components" page which was delinked from navigation table)
Line 1: Line 1:
Madagascar (formerly known as RSF) is an open-source software package for geophysical data analysis and  
+
Madagascar is an open-source software package for multidimensional data analysis and  
reproducible numerical experiments. Its mission is to provide
+
reproducible computational experiments. Its mission is to provide
 
 
 
* a convenient and powerful environment
 
* a convenient and powerful environment
 
* a convenient technology transfer tool  
 
* a convenient technology transfer tool  
 
+
for researchers working with digital image and data processing in geophysics and related fields. Technology developed using the  
for researchers working with digital image and data processing. The technology developed using the  
 
 
Madagascar project management system is transferred in the form of recorded processing histories, which  
 
Madagascar project management system is transferred in the form of recorded processing histories, which  
 
become "computational recipes" to be verified, exchanged, and modified by users of the system.  
 
become "computational recipes" to be verified, exchanged, and modified by users of the system.  
Line 14: Line 12:
 
##Write programs to work together.   
 
##Write programs to work together.   
 
##Write programs to handle text streams, because that is a universal interface.  
 
##Write programs to handle text streams, because that is a universal interface.  
#: Running a command (such as <tt>sfwindow</tt>) without parameters or the necessary input and output files shows a brief documentation, explaining the program purpose and parameters.  Alternatively, brief documentation is provided by <tt>sfdoc</tt> program. Main program documentation in HTML format is available on the web at http://www.reproducibility.org/RSF/. Madagascar uses ''Regularly Sampled Format''  (RSF) for data files, which is similar to the format used in the SEPlib library developed at the Stanford Exploration Project (SEP). The file format describes regularly sampled hypercubes. Up to 9 dimensions are supported. In accordance with the Unix philosophy, each RSF file (such as <tt>data.rsf</tt>) is a simple readable text. It contains a pointer (<tt>in=</tt> parameter) to the location of the binary data. Madagascar provides programs for conversion to and from other formats such as SEG-Y and SU. Madagascar currently adopts Vplot file format, also developed at SEP, for generated graphics files.  
+
#: Running a command (such as <tt>sfwindow</tt>) without parameters or the necessary input and output files shows a brief documentation, explaining the program purpose and parameters.  Alternatively, brief documentation is provided by <tt>sfdoc</tt> program. Main program documentation in HTML format is available [http://www.reproducibility.org/RSF/ on the web]. Madagascar uses ''Regularly Sampled Format''  (RSF) for data files, which is similar to the format used in the SEPlib library developed at the Stanford Exploration Project (SEP). The file format describes regularly sampled hypercubes. Up to 9 dimensions are supported. In accordance with the Unix philosophy, each RSF file (such as <tt>data.rsf</tt>) is a simple readable text. It contains a pointer (<tt>in=</tt> parameter) to the location of the binary data. Madagascar provides programs for conversion to and from other formats such as SEG-Y and SU. Madagascar currently adopts Vplot file format, also developed at SEP, for generated graphics files.  
 
#An API (application programmer's interface) for programmers writing their own software to manipulate RSF files. The main software language of the Madagascar package is C. Interfaces to other languages (C++, Fortran-77, Fortran-90, Python, Matlab) are also provided.  
 
#An API (application programmer's interface) for programmers writing their own software to manipulate RSF files. The main software language of the Madagascar package is C. Interfaces to other languages (C++, Fortran-77, Fortran-90, Python, Matlab) are also provided.  
 
#A project management system. The system uses and extends [http://www.scons.org/ SCons], an open-source software construction package, to document and maintain data processing flows. Documented projects become computational recipes that can be easily exchanged among Madagascar users.  
 
#A project management system. The system uses and extends [http://www.scons.org/ SCons], an open-source software construction package, to document and maintain data processing flows. Documented projects become computational recipes that can be easily exchanged among Madagascar users.  
 
#A collection of reproducible documents, organized in living books. Each reproducible book contains a collection of Madagascar recipes (<tt>SConstruct</tt> files) used to generate book figures. The recipes cover a variety of data processing and imaging tasks described in the books. Figures and recipes serve dual purpose with respect to Madagascar maintenance. They provide demos for introducing new users to the functionality of the package and, at the same time, regression tests for assuring the system stability under change.  
 
#A collection of reproducible documents, organized in living books. Each reproducible book contains a collection of Madagascar recipes (<tt>SConstruct</tt> files) used to generate book figures. The recipes cover a variety of data processing and imaging tasks described in the books. Figures and recipes serve dual purpose with respect to Madagascar maintenance. They provide demos for introducing new users to the functionality of the package and, at the same time, regression tests for assuring the system stability under change.  
  
A fifth component, an interactive interface, is under development.
+
While each of these is potentially useful in its own right, Madagascar is most powerful when the components are used in combination.  
 
 
While each of these is potentially useful in its own right, Madagascar is most powerful when the components are used together.  
 
  
 
Much of the documentation requires a preliminary grasp of all four parts. This tutorial provides the required overview, briefly  
 
Much of the documentation requires a preliminary grasp of all four parts. This tutorial provides the required overview, briefly  
Line 30: Line 26:
  
 
Madagascar computations imply:
 
Madagascar computations imply:
* a data format suitable for very large data sets
+
* a data format suitable for large-scale datasets
* a set of executables (Madagascar components) suitable for composing very large computations
+
* a set of executables (Madagascar components) suitable for composing large-scale computations
 
* an API for developing new components
 
* an API for developing new components
  
Line 38: Line 34:
 
Madagascar computations use RSF formatted data. RSF represents regularly sampled  
 
Madagascar computations use RSF formatted data. RSF represents regularly sampled  
 
arrays, rectangles, ... hyperrectangles. Irregularly sampled data can be handled as a pair of datasets, one  
 
arrays, rectangles, ... hyperrectangles. Irregularly sampled data can be handled as a pair of datasets, one  
containing data and the second containing corresponding  
+
containing data and the second containing corresponding irregular geometry information.
  
 
RSF metadata is treated as "the data"; one of the metadata components is a pointer to the raw binary data,
 
RSF metadata is treated as "the data"; one of the metadata components is a pointer to the raw binary data,
 
normally in machine native format. It is possible to append the data to the metadata. RSF metadata is in ASCII format for human readability.
 
normally in machine native format. It is possible to append the data to the metadata. RSF metadata is in ASCII format for human readability.
 +
 +
For a detailed explanation, see [[Guide to RSF file format]].
  
 
==Madagascar components==
 
==Madagascar components==
  
Madagascar components may be implemented in multiple languages including Fortran, Matlab and Python. However,  
+
Madagascar components may be implemented in multiple languages including Fortran, Matlab, and Python. However,  
majority are implemented in C.
+
the majority of them are implemented in C.
  
Madagascar components take a file name or a list of file namess (along with key-value pairs specific to the program) as command line input. If stdin is piped, it is treated as the input, or as the first of multiple inputs. Madagascar components produce rsf headers as output to stdout.
+
Madagascar components take a file name or a list of file names (along with key-value pairs specific to the program) as command line input. If stdin is piped, it is treated as the input, or as the first of multiple inputs. Madagascar components typically produce RSF headers as output to stdout.
  
 
Madagascar components are self-documenting. When invoked without any command line inputs they output their own
 
Madagascar components are self-documenting. When invoked without any command line inputs they output their own
 
manual page.
 
manual page.
 
Almost all Madagascar components take RSF as input. Most Madagascar components produce RSF as output,
 
redirected to stdout. In the case where the output of a component is piped to another program, the
 
concatenated header/value format of RSF is invoked automatically.
 
  
 
Further information about components can be found in
 
Further information about components can be found in
 +
* [http://www.reproducibility.org/RSF List of Madagascar componets], also in $RSFROOT/doc/
 
* [[Guide to madagascar programs]] describes the most commonly used components in detail
 
* [[Guide to madagascar programs]] describes the most commonly used components in detail
 
* [[Task-centric program list]] categorizes and briefly describes all components
 
* [[Task-centric program list]] categorizes and briefly describes all components
* on disk html documentation (automatically generated) in <path to Madagascar>/doc/
 
  
 
==Madagascar API==
 
==Madagascar API==
  
This introductory document does not cover extending Madagascar. Developers wishing to add Madagascar components are referred to [[Adding_new_programs_to_madagascar]] .
+
This introductory document does not cover extending Madagascar. Developers wishing to add Madagascar components are referred to  
 +
* [[Guide to madagascar API]]
 +
* [[Guide to programming with madagascar]]
 +
* [[Adding new programs to madagascar]]
  
 
==Madagascar Documents==
 
==Madagascar Documents==
Line 72: Line 69:
 
This is the key to the reproducibility aspect of Madagascar. An introduction to reproducible Madagascar documents is at [[Reproducible_computational_experiments_using_SCons]] .
 
This is the key to the reproducibility aspect of Madagascar. An introduction to reproducible Madagascar documents is at [[Reproducible_computational_experiments_using_SCons]] .
  
=Madagascar Display: VPlot=
+
=Madagascar Display: Vplot=
 
 
In contrast to most other Madagascar Components, graphics Components produce vplot data as output.
 
  
VPlot is a program which implements a device independent graphics format that allows both vector
+
In contrast to most other Madagascar Components, graphics components produce Vplot data as output.
and raster components (as such,
 
it is comparable to Postscript). VPlot also implements a number of output devices. In typical usage an XTerm
 
window is available. The user gets immediate feedback from relatively small calc
 
  
Unfortunately, vplot documentation is out of date. The closest thing to a manual is
+
Vplot is a device independent graphics format that allows both vector and raster elements (as such,  
[http://sepwww.stanford.edu/theses/sep60/60_25.pdf here] ; it describes a slightly different form of vplot.  
+
it is comparable to Postscript). Vplot files are interpreted by a number of output devices. In typical usage is for a visual display in X-window.  
Updating of vplot documentation is in progress.
 
  
Fortunately, the beginning user does not need to know vplot. A wide range of Madagascar graphics components
+
Unfortunately, Vplot documentation is partially out of date. The closest thing to a manual is
are available. These are typically at the output of a chain of pipes.  
+
[http://sepwww.stanford.edu/theses/sep60/60_25.pdf here]; it describes an older version.  
  
See [[Guide to madagascar programs#Plotting programs | Guide to madagascar programs]] for a list of these modules.
+
Fortunately, the beginning user does not need to know the details of Vplot. A wide range of Madagascar graphics components
 +
are available. These are typically used at the output of a chain of pipes. See [[Guide to madagascar programs#Plotting programs | Guide to madagascar programs]] for a list of these modules.
  
 
==Example==
 
==Example==
  
Here is an example of a Madagascar pipe. In this case it takes a subsection of a file, low pass  
+
Here is an example of a Madagascar pipe. In this case it takes a subsection of a file, low-pass  
 
filters it, and saves the result
 
filters it, and saves the result
  
Line 114: Line 106:
 
computational recipes that can be easily exchanged among Madagascar users.  
 
computational recipes that can be easily exchanged among Madagascar users.  
  
SCons is a rule-based package in Python typically used a a build system. Familiarity with any build system will
+
SCons is a rule-based package in Python typically used as a build system analogous to <tt>make</tt>. Familiarity with any build system will
 
be helpful in understanding SCons. SCons statements, as python statements, are invoked in the sequence they are  
 
be helpful in understanding SCons. SCons statements, as python statements, are invoked in the sequence they are  
 
written, but as such they only define rules. The rules are invoked in accordance with a dependency graph which
 
written, but as such they only define rules. The rules are invoked in accordance with a dependency graph which
Line 123: Line 115:
 
software package based on a software tool chain. The calculation is seen simply as a build with dependencies.  
 
software package based on a software tool chain. The calculation is seen simply as a build with dependencies.  
 
This is a considerable benefit in developing alternative workflows using a given dataset. The system  
 
This is a considerable benefit in developing alternative workflows using a given dataset. The system  
maintains an awareness of already completed calculations. Without user inetrvention, redundant calculations  
+
maintains an awareness of already completed calculations. Without user intervention, redundant calculations  
 
are avoided.
 
are avoided.
  
Madagascar calculations are thus expressed as SCons scripts. SCons extensions follow SCons conventions in beginning  
+
Madagascar calculations are thus expressed as SCons scripts (<tt>SConstruct</tt> files). SCons extensions follow SCons conventions in beginning  
with an uppercase letter. The most common Madagascar extensions are Flow(), Result() and End(). A Flow() invocation
+
with an uppercase letter. The most common Madagascar extensions are <tt>Flow()</tt>, <tt>Result()</tt>, and <tt>End()</tt>. A <tt>Flow()</tt> invocation wraps Madagascar computational components. <tt>Result()</tt> is a version of <tt>Flow()</tt> with a graphical output. Finally an
wraps a Madagascar computational components, while a Result() usually encapsulates a graphical output. Finally an
+
End() actually invokes the default rules for multiple results.  
End() actually invokes the rules defined in the file.  
 
  
Finally Madagascar enables a collection of reproducible documents, organized in living books. Each  
+
Finally, Madagascar enables a collection of reproducible documents, organized in living books. Each  
reproducible book contains a  
+
reproducible book contains a collection of Madagascar recipes (<tt>SConstruct</tt> files) used to generate book figures. The recipes  
collection of Madagascar recipes (<tt>SConstruct</tt> files) used to generate book figures. The recipes  
 
 
cover a variety of data processing and imaging tasks described in the books. Figures and recipes serve  
 
cover a variety of data processing and imaging tasks described in the books. Figures and recipes serve  
 
dual purpose with respect to Madagascar maintenance. They provide demos for introducing new users to the  
 
dual purpose with respect to Madagascar maintenance. They provide demos for introducing new users to the  
Line 170: Line 160:
 
=Getting Madagascar=
 
=Getting Madagascar=
  
Madagascar runs on Unix/Linux platforms as well as on Miscrosoft Windows. It depends on Python, C, SCons, and  
+
Madagascar runs on Unix/Linux platforms, including MacOS X and Unix emulations under Miscrosoft Windows. Its installation requires, at a minimum, a working C compiler and Python. Most users will also want an X-Window system on their desktop. See [[Download|download]] and  
vplot. In practice the user will also want an X Windowing system on their desktop. See [[Download|download]] and  
 
 
[[Installation | installation instructions]].
 
[[Installation | installation instructions]].
  
Line 186: Line 175:
 
==Why the Name "Madagascar"?==
 
==Why the Name "Madagascar"?==
  
Whimsy, really. It seems easier to remember than the previous name "RSF", and it provides us lots of interesting [http://en.wikipedia.org/wiki/Lemur mascots].
+
[http://www.reproducibility.org/rsflog/index.php?/archives/67-Madagascar.html Whimsy, really]. It seems easier to remember than the previous name "RSF", and it provides us lots of interesting [http://www.reproducibility.org/rsflog/index.php?/archives/178-Ahay!.html mascots].
  
 
==Madagascar Community==
 
==Madagascar Community==
  
Madagascar seeks to become an active and widely supported open source platform. Active mailing lists are maintained and annual meetings take place. See [https://lists.sourceforge.net/lists/listinfo/rsf-user RSF-user mailing list] and [https://lists.sourceforge.net/lists/listinfo/rsf-devel RSF-devel mailing list] . Your participation is welcome.
+
Madagascar seeks to become an open and active open source community. Active mailing lists are maintained and annual meetings take place. See  
 +
* [[Conferences]]
 +
* [http://www.ahay.org/rsflog Development blog]
 +
* [https://lists.sourceforge.net/lists/listinfo/rsf-user RSF-user mailing list]  
 +
* [https://lists.sourceforge.net/lists/listinfo/rsf-devel RSF-devel mailing list]  
 +
Your participation is welcome.
  
 
==Alternatives==  
 
==Alternatives==  
Line 198: Line 192:
 
Madagascar also borrows ideas from [http://timna.mines.edu/cwpcodes/ Seismic Unix] (SU), a package maintained by John Stockwell at the Center for Wave Phenomenon at the Colorado School of Mines (Stockwell, 1997<ref>Stockwell, J. W.,  1997, Free software in education: A case study of CWP/SU: Seismic Unix: The Leading Edge, '''16''', 1045--1049.</ref>;Stockwell, 1999<ref>--------, 1999, The CWP/SU: Seismic Un*x package: Computers and  Geosciences, '''25''', 415--419.</ref>). Main contributors to SU included Einar Kjartansson, Shuki Ronen, Jack Cohen, Chris Liner, Dave Hale, and John Stockwell. SU is open-source software (distributed with BSD-style license) starting with release 40 (April 10, 2007).
 
Madagascar also borrows ideas from [http://timna.mines.edu/cwpcodes/ Seismic Unix] (SU), a package maintained by John Stockwell at the Center for Wave Phenomenon at the Colorado School of Mines (Stockwell, 1997<ref>Stockwell, J. W.,  1997, Free software in education: A case study of CWP/SU: Seismic Unix: The Leading Edge, '''16''', 1045--1049.</ref>;Stockwell, 1999<ref>--------, 1999, The CWP/SU: Seismic Un*x package: Computers and  Geosciences, '''25''', 415--419.</ref>). Main contributors to SU included Einar Kjartansson, Shuki Ronen, Jack Cohen, Chris Liner, Dave Hale, and John Stockwell. SU is open-source software (distributed with BSD-style license) starting with release 40 (April 10, 2007).
  
==Related documents==
+
For a comprehensive list, see [[other open-source geophysical packages]].
 
 
* [[Why Madagascar]] 
 
* [[Installation|Installation instructions]]
 
* [http://reproducibility.org/RSF/ Self-documentation reference for Madagascar programs]
 
* [[Guide to madagascar programs]]
 
* [[Guide to RSF file format]]
 
* [[Guide to madagascar API|Guide to the Madagascar programming interface]]
 
* [[Guide to programming with madagascar]]
 
* [[Revisiting SEP tour with Madagascar and SCons]]
 
* [[Reproducible computational experiments using SCons]]
 
  
 
==References==
 
==References==
 
<references/>
 
<references/>

Revision as of 21:12, 18 December 2008

Madagascar is an open-source software package for multidimensional data analysis and reproducible computational experiments. Its mission is to provide

  • a convenient and powerful environment
  • a convenient technology transfer tool

for researchers working with digital image and data processing in geophysics and related fields. Technology developed using the Madagascar project management system is transferred in the form of recorded processing histories, which become "computational recipes" to be verified, exchanged, and modified by users of the system.

Specifically, Madagascar includes four parts

  1. A collection of main programs. Most programs act as filters on input data and can be chained in a Unix pipeline. For example:
     < data.rsf sfwindow n1=100 | sfbandpass fhi=60 > data2.rsf 
    This approach follows the Unix philosophy, as formulated by Doug McIlroy, the inventor of Unix pipes (Salus, 1994[1]):
    1. Write programs that do one thing and do it well.
    2. Write programs to work together.
    3. Write programs to handle text streams, because that is a universal interface.
    Running a command (such as sfwindow) without parameters or the necessary input and output files shows a brief documentation, explaining the program purpose and parameters. Alternatively, brief documentation is provided by sfdoc program. Main program documentation in HTML format is available on the web. Madagascar uses Regularly Sampled Format (RSF) for data files, which is similar to the format used in the SEPlib library developed at the Stanford Exploration Project (SEP). The file format describes regularly sampled hypercubes. Up to 9 dimensions are supported. In accordance with the Unix philosophy, each RSF file (such as data.rsf) is a simple readable text. It contains a pointer (in= parameter) to the location of the binary data. Madagascar provides programs for conversion to and from other formats such as SEG-Y and SU. Madagascar currently adopts Vplot file format, also developed at SEP, for generated graphics files.
  2. An API (application programmer's interface) for programmers writing their own software to manipulate RSF files. The main software language of the Madagascar package is C. Interfaces to other languages (C++, Fortran-77, Fortran-90, Python, Matlab) are also provided.
  3. A project management system. The system uses and extends SCons, an open-source software construction package, to document and maintain data processing flows. Documented projects become computational recipes that can be easily exchanged among Madagascar users.
  4. A collection of reproducible documents, organized in living books. Each reproducible book contains a collection of Madagascar recipes (SConstruct files) used to generate book figures. The recipes cover a variety of data processing and imaging tasks described in the books. Figures and recipes serve dual purpose with respect to Madagascar maintenance. They provide demos for introducing new users to the functionality of the package and, at the same time, regression tests for assuring the system stability under change.

While each of these is potentially useful in its own right, Madagascar is most powerful when the components are used in combination.

Much of the documentation requires a preliminary grasp of all four parts. This tutorial provides the required overview, briefly introducing the four parts, with links to more complex descriptions. The reader new to Madagascar is encouraged to read through this entire document before following the links.

Madagascar Computation

Madagascar computations imply:

  • a data format suitable for large-scale datasets
  • a set of executables (Madagascar components) suitable for composing large-scale computations
  • an API for developing new components

Madagascar data format

Madagascar computations use RSF formatted data. RSF represents regularly sampled arrays, rectangles, ... hyperrectangles. Irregularly sampled data can be handled as a pair of datasets, one containing data and the second containing corresponding irregular geometry information.

RSF metadata is treated as "the data"; one of the metadata components is a pointer to the raw binary data, normally in machine native format. It is possible to append the data to the metadata. RSF metadata is in ASCII format for human readability.

For a detailed explanation, see Guide to RSF file format.

Madagascar components

Madagascar components may be implemented in multiple languages including Fortran, Matlab, and Python. However, the majority of them are implemented in C.

Madagascar components take a file name or a list of file names (along with key-value pairs specific to the program) as command line input. If stdin is piped, it is treated as the input, or as the first of multiple inputs. Madagascar components typically produce RSF headers as output to stdout.

Madagascar components are self-documenting. When invoked without any command line inputs they output their own manual page.

Further information about components can be found in

Madagascar API

This introductory document does not cover extending Madagascar. Developers wishing to add Madagascar components are referred to

Madagascar Documents

Madagascar Documents consist of LaTeX source combined with SCons rules required to fully build the documents. These rules are expressed in terms of SCons extensions that are provided as part of Madagascar.

This is the key to the reproducibility aspect of Madagascar. An introduction to reproducible Madagascar documents is at Reproducible_computational_experiments_using_SCons .

Madagascar Display: Vplot

In contrast to most other Madagascar Components, graphics components produce Vplot data as output.

Vplot is a device independent graphics format that allows both vector and raster elements (as such, it is comparable to Postscript). Vplot files are interpreted by a number of output devices. In typical usage is for a visual display in X-window.

Unfortunately, Vplot documentation is partially out of date. The closest thing to a manual is here; it describes an older version.

Fortunately, the beginning user does not need to know the details of Vplot. A wide range of Madagascar graphics components are available. These are typically used at the output of a chain of pipes. See Guide to madagascar programs for a list of these modules.

Example

Here is an example of a Madagascar pipe. In this case it takes a subsection of a file, low-pass filters it, and saves the result

<bash> < data.rsf sfwindow n1=100 | sfbandpass fhi=60 > data2.rsf </bash>

In this more elaborate case, the final output is passed to a graphics program and plotted.

<bash> < data.rsf sfwindow n1=100 | sfbandpass fhi=60 | sfcontour | xtpen </bash>

More extensive examples are seen at Guide to madagascar programs . The novice reader should probably read the material below before proceeding to that page.

Madagascar Reproducibility and Project Management

Madagascar uses and extends SCons, an open-source software construction package, to document and maintain data processing flows. Documented projects become computational recipes that can be easily exchanged among Madagascar users.

SCons is a rule-based package in Python typically used as a build system analogous to make. Familiarity with any build system will be helpful in understanding SCons. SCons statements, as python statements, are invoked in the sequence they are written, but as such they only define rules. The rules are invoked in accordance with a dependency graph which SCons builds based on those rules. Components regarded as "up-to-date" are not rebuilt.

SCons allows user-contributed Builders (meta-rule categories) and Madagascar uses this capability extensively. The idea is that building an output file based on a workflow chain is very much analogous to building a software package based on a software tool chain. The calculation is seen simply as a build with dependencies. This is a considerable benefit in developing alternative workflows using a given dataset. The system maintains an awareness of already completed calculations. Without user intervention, redundant calculations are avoided.

Madagascar calculations are thus expressed as SCons scripts (SConstruct files). SCons extensions follow SCons conventions in beginning with an uppercase letter. The most common Madagascar extensions are Flow(), Result(), and End(). A Flow() invocation wraps Madagascar computational components. Result() is a version of Flow() with a graphical output. Finally an End() actually invokes the default rules for multiple results.

Finally, Madagascar enables a collection of reproducible documents, organized in living books. Each reproducible book contains a collection of Madagascar recipes (SConstruct files) used to generate book figures. The recipes cover a variety of data processing and imaging tasks described in the books. Figures and recipes serve dual purpose with respect to Madagascar maintenance. They provide demos for introducing new users to the functionality of the package and, at the same time, regression tests for assuring the system stability under change.

How it All Comes Together

Here is an example code, described in detail on the SCons page.

<python> from rsfproj import *

  1. Download the input data file

Fetch('lena.img','imgs')

  1. Create RSF header

Flow('lena.hdr','lena.img',

    'echo n1=512 n2=513 in=$SOURCE data_format=native_uchar',
    stdin=0)

  1. Convert to floating point and window out first trace

Flow('lena','lena.hdr','dd type=float | window f2=1')

  1. Display

Result('lena',

      
      sfgrey title="Hello, World!" transp=n color=b bias=128
      clip=100 screenratio=1 
      )

  1. Wrap up

End() </python>

Getting Madagascar

Madagascar runs on Unix/Linux platforms, including MacOS X and Unix emulations under Miscrosoft Windows. Its installation requires, at a minimum, a working C compiler and Python. Most users will also want an X-Window system on their desktop. See download and installation instructions.

License

The Madagascar package is released in an open-source form under the standard GNU GPL license. In simple words, there are no restrictions on the use of the software (including copying, modifying, selling, etc.) However, there are restrictions on the software redistribution intended to prevent the package from losing its open-source status. Users are encourages to submit their modifications back to the original distribution to the benefit of the whole user community.

About Madagascar

Why the Name "Madagascar"?

Whimsy, really. It seems easier to remember than the previous name "RSF", and it provides us lots of interesting mascots.

Madagascar Community

Madagascar seeks to become an open and active open source community. Active mailing lists are maintained and annual meetings take place. See

Your participation is welcome.

Alternatives

In the present form, the Madagascar package, while being completely written from scratch, borrows ideas from the design of SEPlib, a publicly available software package, maintained by Bob Clapp at the Stanford Exploration Project. Generations of SEP students and researchers contributed to SEPlib. Most important contributions came from Rob Clayton, Jon Claerbout, Dave Hale, Stew Levin, Rick Ottolini, Joe Dellinger, Steve Cole, Dave Nichols, Martin Karrenbach, Biondo Biondi, and Bob Clapp.

Madagascar also borrows ideas from Seismic Unix (SU), a package maintained by John Stockwell at the Center for Wave Phenomenon at the Colorado School of Mines (Stockwell, 1997[2];Stockwell, 1999[3]). Main contributors to SU included Einar Kjartansson, Shuki Ronen, Jack Cohen, Chris Liner, Dave Hale, and John Stockwell. SU is open-source software (distributed with BSD-style license) starting with release 40 (April 10, 2007).

For a comprehensive list, see other open-source geophysical packages.

References

  1. Salus, P. H., 1994, A quarter-century of Unix: Addison-Wesley.
  2. Stockwell, J. W., 1997, Free software in education: A case study of CWP/SU: Seismic Unix: The Leading Edge, 16, 1045--1049.
  3. --------, 1999, The CWP/SU: Seismic Un*x package: Computers and Geosciences, 25, 415--419.