BCU task-centric program list
The most frequent question encountered from a new user is: "Does Madagascar do [some needed process]?" The first level of classification is therefore by types of procedures. The classifications below try to follow the user's workflow:
- What is the function to read such type of input data file ?
- Is there a function to perform a Fourier transform, a causal integration ?
- How can I display 2-D data ?
All program names below should be prefixed with "sf".
I/O and file format conversions
ASCII, binary file
SEG-Y file
- Convert SEG-Y files to RSF: segyread guide, segyread
- Convert RSF to SEG-Y or SU: segywrite guide, segywrite
- Make a trace header file for segywrite: segyheader guide, segyheader
SU file
- Convert SU files to RSF: suread
- Convert RSF to SU: segywrite guide, segywrite
File operations
This section contains physics-agnostic methods for slicing, dicing, adding together files, etc:
Basic operations
- Display basic information about RSF files: Guide_to_madagascar_programs#sfin in guide, in
- Copy a dataset: cp guide, cp
- Move a dataset: mv guide, mv
- Remove RSF files together with their data: rm guide, rm
- Print out data values: disfil guide, disfil
Operation on file content
- Generate simple data (spikes, boxes, planes, constants): spike guide, spike
- Mathematical operations on data files: math guide, math
- Add, multiply, or divide RSF datasets: add guide, add
- Add, multiply, or divide RSF datasets (fast, OMP-enabled): paradd
- Window a portion of the dataset: window guide, window
- Create a mask: mask guide, mask
- Stack a dataset over one of the dimensions: stack guide, stack
- Transpose two axes in a dataset: transp guide, transp
- Concatenate datasets: cat guide, cat or merge guide, merge
- Convert real data to complex (by adding zero imaginary part): rtoc guide, rtoc
- Extract real part of a complex dataset: real guide, real
- Extract imaginary part of a complex dataset: imag
- Create a complex dataset from its real and imaginary parts: complex guide, cmplx
- Scale data: scale guide, scale
- Rotate a portion of one or more axes in the data hypercube: rotate guide, rotate
- Zero a portion of the dataset: cut guide, cut
- Pad a dataset with zeros: pad guide, pad
- Combine several datasets by interleaving: interleave guide, interleave
- Pad and interleave traces: lpad
- Computes Ni+1 x Ni+2 x ...: leftsize
- Reverse one or more axes in the data hypercube: reverse guide, reverse
- Extend a dataset by duplicating in the specified axis dimension: spray guide, spray
Header operations
- Input parameters into a header: put guide, put
- Output parameters from the header: get guide, get
- Display the content of a header file: headerattr guide, headerattr
- Zero a portion of a dataset based on a header mask: headercut guide, headercut
- Mathematical operations, possibly on header keys: headermath guide, headermath
- Sort a dataset according to a header key: headersort guide, headersort
- Window a dataset based on a header mask: headerwindow guide, headerwindow
Statistical operations on files
Single-file
- Display dataset attributes: attr guide, attr
- Compute a histogram of data values: histogram
- Computes what clip value corresponds to a given pclip: quantile
- Clip the data: clip
- One- or two-sided data clipping: clip2
- Percentile clip: pclip
- Threshold float/complex inputs given a constant/varying threshold level: thr
- Soft thresholding: threshold
- Construct incremental minimum or maximum lists from an RSF file: listminmax
- Sort a float/complex vector by absolute values: sort
Multi-file
- Element by element minimum or maximum of two RSF files: minmax
- Similarity measure between two datasets: similarity
Mathematics algorithms
Basic mathematic processes
- Causal integration on the first axis: causint
- Fast Fourier Transform along the first axis (from real to complex): fft1
- FFT transform on extra axis (from complex to complex): fft3
- 3D FFT with centering and Hermitian scaling: fft3d
- Frequency spectra: spectra
- Frequency spectra in 2-D: spectra2
- 1-D Digital Wavelet Transform: dwt
- Multi-dimensional cosine transform: cosft
Linear Algebra
- Simple matrix multiplication: matmult
- Simple matrix multiplication for complex matrices: cmatmult
- Find eigenvalues and eigenvectors of a symmetric positive definite matrix: dmeig
- Kroneker product with square matrices: kron
- Generic conjugate-gradient solver for linear inversion: conjgrad guide, conjgrad
- Generic dot-product test for linear operators with adjoints: dottest guide, dottest
- Generic conjugate-gradient solver for linear inversion with complex data: cconjgrad
- Generic dot-product test for complex linear operators with adjoints: cdottest
Interpolation
- 1-D ENO (Essentiallly Non Oscillatory) interpolation: remap1 guide, remap1
- 1-D sinc interpolation: sinc
Diffusion equation
- Heat diffusion equation FD modeling: hdefd
- Finite-difference solution of 2-D heat-flow equation: heat
- Finite-difference 3-D heat-flow equation using helix: heat3
Fractals
- Fractal fern generator: fern
- Mandelbrot set generator: mandelbrot
- 1-D von Karman's spectrum parameter estimation: karman
Illustrations/wrappers of librsf functions
Library function | Program |
---|---|
sf_filedims | filedims |
sf_leftsize | leftsize |
sf_quantile | quantile |
Graph, plots, displays
Display
- Generate raster plot: grey guide, grey (sfbyte is the same)
- Contour plot: contour guide, contour
- Generate 3-D contour plot: contour3
- Plot signal with lollipops: dots guide, dots
- Generate 3-D cube plot for surfaces: graph3 guide, graph3
- Graph plot: graph guide, graph
- Generate 3-D cube plot: grey3 guide, grey3 (sfcubeplot is the same)
- Plot rays: plotrays guide, plotrays
- Hidden-line surface plot: thplot guide, thplot
- Plot data with wiggly traces: wiggle guide, wiggle
- Resamples a 2-D dataset to the desired picture resolution, with antialias: prep4plot guide, prep4plot
- Setting up frames for a generic plot: stdplot
Plot format
- Plot Assembler - convert ascii to vplot: plas guide, plas
- Plot Debugger - convert vplot to ascii: pldb guide, pldb
- Vplot filter for postscript: pspen
- Vplot filter for the virtual vplot device: vppen