BCU task-centric program list

From Madagascar
Revision as of 03:35, 12 October 2008 by Nick (talk | contribs) (→‎SEG-Y file)
Jump to navigation Jump to search

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:

  1. What is the function to read such type of input data file ?
  2. Is there a function to perform a Fourier transform, a causal integration ?
  3. 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

  • Convert the binary file of a RSF dataset between different formats (binary, ASCII): dd guide, dd

SEG-Y file

SU file

File operations

This section contains physics-agnostic methods for slicing, dicing, adding together files, etc:

Basic operations

Operation on file content

Header operations

Statistical operations on files


  • 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


  • 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


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


  • 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


  • Setting up frames for a generic plot: stdplot

Plot format

  • Vplot filter for postscript: pspen
  • Vplot filter for the virtual vplot device: vppen