Editing
Guide to madagascar programs
(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!
==sfpad== {| class="wikitable" align="center" cellspacing="0" border="1" ! colspan="4" style="background:#ffdead;" | Pad a dataset with zeros. |- ! colspan="4" | sfpad < in.rsf > out.rsf beg#=0 end#=0 n#= |- | colspan="4" | <br>n#out is equivalent to n#, both of them overwrite end#.<br><br>Other parameters from the command line are passed to the output (similar to sfput). |- | ''int '' || '''beg#=0''' || || the number of zeros to add before the beginning of #-th axis |- | ''int '' || '''end#=0''' || || the number of zeros to add after the end of #-th axis |- | ''int '' || '''n#=''' || || the output length of #-th axis - padding at the end |} <tt>sfpad</tt> increases the dimensions of the input dataset by padding the data with zeroes. Here are some simple examples. <pre> bash$ sfspike n1=5 n2=3 > one.rsf bash$ sfdisfil < one.rsf 0: 1 1 1 1 1 5: 1 1 1 1 1 10: 1 1 1 1 1 bash$ < one.rsf sfpad n2=5 | sfdisfil 0: 1 1 1 1 1 5: 1 1 1 1 1 10: 1 1 1 1 1 15: 0 0 0 0 0 20: 0 0 0 0 0 bash$ < one.rsf sfpad beg2=2 | sfdisfil 0: 0 0 0 0 0 5: 0 0 0 0 0 10: 1 1 1 1 1 15: 1 1 1 1 1 20: 1 1 1 1 1 bash$ < one.rsf sfpad beg2=1 end2=1 | sfdisfil 0: 0 0 0 0 0 5: 1 1 1 1 1 10: 1 1 1 1 1 15: 1 1 1 1 1 20: 0 0 0 0 0 bash$ < one.rsf sfwindow n1=3 | sfpad n1=5 n2=5 beg1=1 beg2=1 | sfdisfil 0: 0 0 0 0 0 5: 0 1 1 1 0 10: 0 1 1 1 0 15: 0 1 1 1 0 20: 0 0 0 0 0 </pre> You can use <tt>sfcat</tt> to pad data with values other than zeroes.
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