Editing
Revisiting SEP tour with Madagascar and SCons
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Getting started== Madagascar programs can be piped and executed from the command line, for example: <pre> bash$ sfspike n1=1000 k1=300 title="\s200 Welcome to \c2 RSF" | \ sfbandpass fhi=2 phase=1 | sfwiggle | sfpen </pre> If you are already familiar with SEPlib, you can find most of the familiar programs with the names prepended by "sf". Typing a command without arguments, should produce a concise self-documentation. <pre> bash$ sfbandpass </pre> The recommended way of using RSF, however, is not with the command line but with SCons and "SConstruct" files. ===Setting up=== Open a file named "SConstruct" in your favorite editor, start it with a line <syntaxhighlight lang="python"> from rsf.proj import * </syntaxhighlight> and end it with a line <syntaxhighlight lang="python"> End() </syntaxhighlight> The first line tells Python to load the RSF project module. ===Obtaining the test data=== Add a Fetch command as follows: <syntaxhighlight lang="python"> Fetch('Txx.HH','septour') </syntaxhighlight> Now, by running <pre> bash$ scons Txx.HH </pre> you can instruct SCons to connect to an anonymous data server and extract (fetch) the data file "Txx.HH" from the "septour" directory. ===Displaying the data=== Add the following line to the <tt>SConstruct</tt> file: <syntaxhighlight lang="python"> Result('wiggle0','Txx.HH','wiggle') </syntaxhighlight> Note that it does not matter if this line appears before or after the "Fetch" line. You are simply instructing SCons how to create a result plot from the input. Run <pre> bash$ scons wiggle0.view </pre> If everything is setup correctly in your environment, you should see something like the following output in your terminal: <pre> bash$ scons wiggle0.view scons: Reading SConscript files ... scons: done reading SConscript files. scons: Building targets ... retrieve(["Txx.HH"], []) < Txx.HH /path/to/RSF/bin/sfwiggle > Fig/wiggle0.vpl /path/to/RSF/bin/sfpen Fig/wiggle0.vpl </pre> and the following figure appearing on your screen. [[Image:wiggle0.png|frame|center|To see this figure on your screen, run <tt>scons~wiggle0.view</tt>]]
Summary:
Please note that all contributions to Madagascar are considered to be released under the GNU Free Documentation License 1.3 or later (see
My wiki:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
English
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Getting Madagascar
download
Installation
GitHub repository
SEGTeX
Introduction
Package overview
Tutorial
Hands-on tour
Reproducible documents
Hall of Fame
User Documentation
List of programs
Common programs
Popular programs
The RSF file format
Reproducibility with SCons
Developer documentation
Adding programs
Contributing programs
API demo: clipping data
API demo: explicit finite differences
Community
Conferences
User mailing list
Developer mailing list
GitHub organization
LinkedIn group
Development blog
Twitter
Slack
Tools
What links here
Related changes
Special pages
Page information