Difference between revisions of "BCU task-centric program list"

From Madagascar
Jump to navigation Jump to search
(→‎Mathematics algorithms: moved heat flow, fractals to NSAM)
 
(7 intermediate revisions by one other user not shown)
Line 1: Line 1:
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:
+
[[Image:Fotolia_11174449_XS.jpg|right|]]
# What is the function to read such type of input data file ?
+
List of '''Basic Cube Utilities''' (BCU) in Madagascar. Operations listed here can throw away data or fill in with zeros, but should not create new values or alter existing ones -- those belong to the [[NM task-centric program program_list | Numerical Methods program list]].
# Is there a function to perform a Fourier transform, a causal integration ?
+
 
# How can I display 2-D data ?
+
An overview of all task-centric pages can be found in the main [[Task-centric program list]].
  
 
'''All program names below should be prefixed with "sf".'''
 
'''All program names below should be prefixed with "sf".'''
Line 9: Line 9:
  
 
== ASCII, binary file ==
 
== ASCII, binary file ==
* Convert the binary file of a RSF dataset between different formats (binary, ASCII): [[Guide_to_madagascar_programs#sfdd | dd guide]], [http://reproducibility.org/RSF/sfdd.html dd]
+
* Convert the binary file of a RSF dataset between different formats (binary, ASCII): [http://reproducibility.org/RSF/sfdd.html dd]
  
 
==SEG-Y file==
 
==SEG-Y file==
* Convert SEG-Y files to RSF: [[Guide_to_madagascar_programs#sfsegyread | segyread guide]], [http://reproducibility.org/RSF/sfsegyread.html segyread]
+
* Convert SEG-Y files to RSF: [http://reproducibility.org/RSF/sfsegyread.html segyread]
* Convert RSF to SEG-Y or SU: [[Guide_to_madagascar_programs#sfsegywrite | segywrite guide]], [http://reproducibility.org/RSF/sfsegywrite.html segywrite]
+
* Convert RSF to SEG-Y or SU: [http://reproducibility.org/RSF/sfsegywrite.html segywrite]
* Make a trace header file for segywrite: [[Guide_to_madagascar_programs#sfsegyheader | segyheader guide]], [http://reproducibility.org/RSF/segyheader.html segyheader]
+
* Make a trace header file for segywrite: [http://reproducibility.org/RSF/segyheader.html segyheader]
  
 
==SU file==
 
==SU file==
 
* Convert SU files to RSF: [http://reproducibility.org/RSF/sfsegyread.html suread]
 
* Convert SU files to RSF: [http://reproducibility.org/RSF/sfsegyread.html suread]
* Convert RSF to SU: [[Guide_to_madagascar_programs#sfsegywrite | segywrite guide]], [http://reproducibility.org/RSF/sfsegywrite.html segywrite]
+
* Convert RSF to SU: [http://reproducibility.org/RSF/sfsegywrite.html segywrite]
  
 
=File operations=
 
=File operations=
Line 24: Line 24:
  
 
== Basic operations ==
 
== Basic operations ==
* Display basic information about RSF files: [[Guide_to_madagascar_programs#sfin in guide]], [http://reproducibility.org/RSF/sfin.html in]
+
* Display basic information about RSF files: [http://reproducibility.org/RSF/sfin.html in]
* Copy a dataset: [[Guide_to_madagascar_programs#sfcp | cp guide]], [http://reproducibility.org/RSF/sfcp.html cp]
+
* Display the size of RSF data forks: [http://reproducibility.org/RSF/sfsizes.html sizes]
* Move a dataset: [[Guide_to_madagascar_programs#sfmv | mv guide]], [http://reproducibility.org/RSF/sfcp.html mv]
+
* Copy a dataset: [http://reproducibility.org/RSF/sfcp.html cp]
* Remove RSF files together with their data: [[Guide_to_madagascar_programs#sfrm | rm guide]], [http://reproducibility.org/RSF/sfrm.html rm]
+
* Move a dataset: [http://reproducibility.org/RSF/sfcp.html mv]
* Print out data values: [[Guide_to_madagascar_programs#sfdisfil | disfil guide]], [http://reproducibility.org/RSF/sfdisfil.html disfil]
+
* Remove RSF files together with their data: [http://reproducibility.org/RSF/sfrm.html rm]
 +
* Print out data values: [http://reproducibility.org/RSF/sfdisfil.html disfil]
  
 
== Operation on file content ==
 
== Operation on file content ==
  
*  Generate simple data (spikes, boxes, planes, constants): [[Guide_to_madagascar_programs#sfspike | spike guide]], [http://reproducibility.org/RSF/sfspike.html spike]
+
* Window a portion of the dataset: [http://reproducibility.org/RSF/sfwindow.html window]
* Mathematical operations on data files: [[Guide_to_madagascar_programs#sfmath | math guide]], [http://reproducibility.org/RSF/sfmath.html math]
+
* Transpose two axes in a dataset: [http://reproducibility.org/RSF/sftransp.html transp]
* Add, multiply, or divide  RSF datasets: [[Guide_to_madagascar_programs#sfadd | add guide]], [http://reproducibility.org/RSF/sfadd.html add]
+
* Concatenate datasets: [http://reproducibility.org/RSF/sfcat.html cat] or [http://reproducibility.org/RSF/sfcat.html merge]
* Add, multiply, or divide  RSF datasets (fast, OMP-enabled): [http://reproducibility.org/RSF/sfparadd.html paradd]
+
* Convert real data to complex (by adding zero imaginary part): [http://reproducibility.org/RSF/sfrtoc.html rtoc]
* Window a portion of the dataset: [[Guide_to_madagascar_programs#sfwindow | window guide]], [http://reproducibility.org/RSF/sfwindow.html window]
+
* Extract real part of a complex dataset: [http://reproducibility.org/RSF/sfreal.html real]
* Create a mask: [[Guide_to_madagascar_programs#sfmask | mask guide]], [http://reproducibility.org/RSF/sfmask.html mask]
 
* Stack a dataset over one of the dimensions: [[Guide_to_madagascar_programs#sfstack | stack guide]], [http://reproducibility.org/RSF/sfstack.html stack]
 
* Transpose two axes in a dataset: [[Guide_to_madagascar_programs#sftransp | transp guide]], [http://reproducibility.org/RSF/sftransp.html transp]
 
* Concatenate datasets: [[Guide_to_madagascar_programs#sfcat | cat guide]], [http://reproducibility.org/RSF/sfcat.html cat] or [[Guide_to_madagascar_programs#sfmerge | merge guide]], [http://reproducibility.org/RSF/sfcat.html merge]
 
* Convert real data to complex (by adding zero imaginary part): [[Guide_to_madagascar_programs#sfrtoc | rtoc guide]], [http://reproducibility.org/RSF/sfrtoc.html rtoc]
 
* Extract real part of a complex dataset: [[Guide_to_madagascar_programs#sfreal | real guide]], [http://reproducibility.org/RSF/sfreal.html real]
 
 
* Extract imaginary part of a complex dataset: [http://reproducibility.org/RSF/sfreal.html imag]
 
* Extract imaginary part of a complex dataset: [http://reproducibility.org/RSF/sfreal.html imag]
* Create a complex dataset from its real and imaginary parts: [[Guide_to_madagascar_programs#sfcomplex | complex guide]], [http://reproducibility.org/RSF/sfcmplx.html cmplx]
+
* Create a complex dataset from its real and imaginary parts: [http://reproducibility.org/RSF/sfcmplx.html cmplx]
* Scale data: [[Guide_to_madagascar_programs#sfscale | scale guide]], [http://reproducibility.org/RSF/sfscale.html scale]
+
* Rotate a portion of one or more axes in the data hypercube: [http://reproducibility.org/RSF/sfrotate.html rotate]
* Rotate a portion of one or more axes in the data hypercube: [[Guide_to_madagascar_programs#sfrotate | rotate guide]], [http://reproducibility.org/RSF/sfrotate.html rotate]
+
* Zero a portion of the dataset: [http://reproducibility.org/RSF/sfcut.html cut]
* Zero a portion of the dataset: [[Guide_to_madagascar_programs#sfcut | cut guide]], [http://reproducibility.org/RSF/sfcut.html cut]
+
* Pad a dataset with zeros: [http://reproducibility.org/RSF/sfpad.html pad]
* Pad a dataset with zeros: [[Guide_to_madagascar_programs#sfpad | pad guide]], [http://reproducibility.org/RSF/sfpad.html pad]
+
* Combine several datasets by interleaving: [http://reproducibility.org/RSF/sfinterleave.html interleave]
* Combine several datasets by interleaving: [[Guide_to_madagascar_programs#sfinterleave | interleave guide]], [http://reproducibility.org/RSF/sfinterleave.html interleave]
 
 
* Pad and interleave traces: [http://reproducibility.org/RSF/sflpad.html lpad]
 
* Pad and interleave traces: [http://reproducibility.org/RSF/sflpad.html lpad]
* Computes Ni+1 x Ni+2 x ...: [http://reproducibility.org/RSF/sfleftsize.html leftsize]
+
* Compute Ni+1 x Ni+2 x ...: [http://reproducibility.org/RSF/sfleftsize.html leftsize]
* Reverse one or more axes in the data hypercube: [[Guide_to_madagascar_programs#sfreverse | reverse guide]], [http://reproducibility.org/RSF/sfreverse.html reverse]
+
* Reverse one or more axes in the data hypercube: [http://reproducibility.org/RSF/sfreverse.html reverse]
* Extend a dataset by duplicating in the specified axis dimension: [[Guide_to_madagascar_programs#sfspray | spray guide]], [http://reproducibility.org/RSF/sfspray.html spray]
 
  
 
==Header operations==
 
==Header operations==
  
* Input parameters into a header: [[Guide_to_madagascar_programs#sfput | put guide]], [http://reproducibility.org/RSF/sfput.html put]
+
* Input parameters into a header: [http://reproducibility.org/RSF/sfput.html put]
* Output parameters from the header: [[Guide_to_madagascar_programs#sfget | get guide]], [http://reproducibility.org/RSF/sfget.html get]
+
* Output parameters from the header: [http://reproducibility.org/RSF/sfget.html get]
* Display the content of a header file: [[Guide_to_madagascar_programs#sfheaderattr | headerattr guide]], [http://reproducibility.org/RSF/sfheaderattr.html headerattr]
+
* Display the content of a header file: [http://reproducibility.org/RSF/sfheaderattr.html headerattr]
* Zero a portion of a dataset based on a header mask: [[Guide_to_madagascar_programs#sfheadercut | headercut guide]], [http://reproducibility.org/RSF/sfheadercut.html headercut]
+
* Zero a portion of a dataset based on a header mask: [http://reproducibility.org/RSF/sfheadercut.html headercut]
* Mathematical operations, possibly on header keys: [[Guide_to_madagascar_programs#sfheadermath | headermath guide]], [http://reproducibility.org/RSF/sfheadermath.html headermath]
+
* Mathematical operations, possibly on header keys: [http://reproducibility.org/RSF/sfheadermath.html headermath]
* Sort a dataset according to a header key: [[Guide_to_madagascar_programs#sfheadersort | headersort guide]], [http://reproducibility.org/RSF/sfheadersort.html headersort]
+
* Sort a dataset according to a header key: [http://reproducibility.org/RSF/sfheadersort.html headersort]
* Window a dataset based on a header mask: [[Guide_to_madagascar_programs#sfheaderwindow | headerwindow guide]],  [http://reproducibility.org/RSF/sfheaderwindow.html headerwindow]
+
* Window a dataset based on a header mask: [http://reproducibility.org/RSF/sfheaderwindow.html headerwindow]
 
 
=Statistical operations on files=
 
==Single-file==
 
* Display dataset attributes: [[Guide_to_madagascar_programs#sfattr | attr guide]], [http://reproducibility.org/RSF/sfattr.html attr]
 
* Compute a histogram of data values: [http://reproducibility.org/RSF/sfhistogram.html histogram]
 
* Computes what clip value corresponds to a given pclip: [http://reproducibility.org/RSF/sfquantile.html quantile]
 
* Clip the data: [http://reproducibility.org/RSF/sfclip.html clip]
 
* One- or two-sided data clipping: [http://reproducibility.org/RSF/sfclip2.html clip2]
 
* Percentile clip: [http://reproducibility.org/RSF/sfpclip.html pclip]
 
* Threshold float/complex inputs given a constant/varying threshold level: [http://reproducibility.org/RSF/sfthr.html thr]
 
* Soft thresholding: [http://reproducibility.org/RSF/sfthreshold.html threshold]
 
* Construct incremental minimum or maximum lists from an RSF file: [http://reproducibility.org/RSF/sflistminmax.html listminmax]
 
* Sort a float/complex vector by absolute values: [http://reproducibility.org/RSF/sfsort.html sort]
 
 
 
==Multi-file==
 
* Element by element minimum or maximum of two RSF files: [http://reproducibility.org/RSF/sfminmax.html minmax]
 
* Similarity measure between two datasets: [http://reproducibility.org/RSF/sfsimilarity.html similarity]
 
 
 
= Mathematics algorithms =
 
 
 
==Basic mathematic processes==
 
 
 
* Causal integration on the first axis: [http://reproducibility.org/RSF/sfcausint.html causint]
 
* Fast Fourier Transform along the first axis (from real to complex): [http://reproducibility.org/RSF/sffft1.html fft1]
 
* FFT transform on extra axis (from complex to complex): [http://reproducibility.org/RSF/sffft1.html fft3]
 
* 3D FFT with centering and Hermitian scaling: [http://reproducibility.org/RSF/sffft1.html fft3d]
 
* Frequency spectra: [http://reproducibility.org/RSF/sfspectra.html spectra]
 
* Frequency spectra in 2-D: [http://reproducibility.org/RSF/sfspectra2.html spectra2]
 
* 1-D Digital Wavelet Transform: [http://reproducibility.org/RSF/sfdwt.html dwt]
 
* Multi-dimensional cosine transform: [http://reproducibility.org/RSF/sfcosft.html cosft]
 
 
 
==Linear Algebra==
 
 
 
* Simple matrix multiplication: [http://reproducibility.org/RSF/sfmatmult.html matmult]
 
* Simple matrix multiplication for complex matrices: [http://reproducibility.org/RSF/sfcmatmult.html cmatmult]
 
* Find eigenvalues and eigenvectors of a symmetric positive definite matrix: [http://reproducibility.org/RSF/sfdmeig.html dmeig]
 
* Kroneker product with square matrices: [http://reproducibility.org/RSF/sfkron.html kron]
 
* Generic conjugate-gradient solver for linear inversion: [[Guide_to_madagascar_programs#sfconjgrad | conjgrad guide]], [http://reproducibility.org/RSF/sfconjgrad.html conjgrad]
 
* Generic dot-product test for linear operators with adjoints: [[Guide_to_madagascar_programs#sfdottest | dottest guide]], [http://reproducibility.org/RSF/sfdottest.html dottest]
 
* Generic conjugate-gradient solver for linear inversion with complex data: [http://reproducibility.org/RSF/sfcconjgrad.html cconjgrad]
 
* Generic dot-product test for complex linear operators with adjoints: [http://reproducibility.org/RSF/sfcdottest.html cdottest]
 
 
 
== Interpolation ==
 
* 1-D ENO (Essentiallly Non Oscillatory) interpolation:  [[Guide_to_madagascar_programs#sfremap1 | remap1 guide]], [http://reproducibility.org/RSF/sfemap1.html remap1]
 
* 1-D sinc interpolation: [http://reproducibility.org/RSF/sfsinc.html sinc]
 
 
 
=Illustrations/wrappers of librsf functions=
 
{| class="wikitable" align="center" cellspacing="0" border="1"
 
!Library function || Program
 
|-
 
| sf_filedims || [http://reproducibility.org/RSF/sffiledims.html filedims]
 
|-
 
| sf_leftsize || [http://reproducibility.org/RSF/sfleftsize.html leftsize]
 
|-
 
| sf_quantile || [http://reproducibility.org/RSF/sfquantile.html quantile]
 
|}
 
  
 
= Graph, plots, displays =
 
= Graph, plots, displays =
Line 125: Line 62:
 
== Display ==
 
== Display ==
  
 +
* Generate raster plot: [http://reproducibility.org/RSF/sfgrey.html grey] (sfbyte is the same)
  
* Generate raster plot: [[Guide_to_madagascar_programs#sfgrey | grey guide]], [http://reproducibility.org/RSF/sfgrey.html grey] (sfbyte is the same)
+
* Draw a balloon-style label: [http://reproducibility.org/RSF/sfbox.html box]
  
* Draw a balloon-style label: [[Guide_to_madagascar_programs#sfbox | box guide]], [http://reproducibility.org/RSF/sfbox.html box]
+
* Contour plot: [http://reproducibility.org/RSF/sfcontour.html contour]
 
 
* Contour plot: [[Guide_to_madagascar_programs#sfcontour | contour guide]], [http://reproducibility.org/RSF/sfcontour.html contour]
 
  
 
* Generate 3-D contour plot: [http://reproducibility.org/RSF/sfcontour3.html contour3]
 
* Generate 3-D contour plot: [http://reproducibility.org/RSF/sfcontour3.html contour3]
  
* Plot signal with lollipops: [[Guide_to_madagascar_programs#sfdots | dots guide]], [http://reproducibility.org/RSF/sfdots.html dots]
+
* Plot signal with lollipops: [http://reproducibility.org/RSF/sfdots.html dots]
  
* Generate 3-D cube plot for surfaces: [[Guide_to_madagascar_programs#sfgraph3 | graph3 guide]], [http://reproducibility.org/RSF/sfgraph3.html graph3]
+
* Generate 3-D cube plot for surfaces: [http://reproducibility.org/RSF/sfgraph3.html graph3]
  
* Graph plot: [[Guide_to_madagascar_programs#sfgraph | graph guide]], [http://reproducibility.org/RSF/sfgraph.html graph]
+
* Graph plot: [http://reproducibility.org/RSF/sfgraph.html graph]
  
* Generate 3-D cube plot: [[Guide_to_madagascar_programs#sfgrey3 | grey3 guide]], [http://reproducibility.org/RSF/sfgrey3.html grey3] (sfcubeplot is the same)
+
* Generate 3-D cube plot: [http://reproducibility.org/RSF/sfgrey3.html grey3] (sfcubeplot is the same)
  
* Plot rays: [[Guide_to_madagascar_programs#sfplotrays | plotrays guide]], [http://reproducibility.org/RSF/sfplotrays.html plotrays]
+
* Plot rays: [http://reproducibility.org/RSF/sfplotrays.html plotrays]
  
* Hidden-line surface plot: [[Guide_to_madagascar_programs#sfthplot | thplot guide]], [http://reproducibility.org/RSF/sfthplot.html thplot]
+
* Hidden-line surface plot: [http://reproducibility.org/RSF/sfthplot.html thplot]
  
* Plot data with wiggly traces: [[Guide_to_madagascar_programs#sfwiggle | wiggle guide]], [http://reproducibility.org/RSF/sfwiggle.html wiggle]
+
* Plot data with wiggly traces: [http://reproducibility.org/RSF/sfwiggle.html wiggle]
  
* Resamples a 2-D dataset to the desired picture resolution, with antialias: [[Guide_to_madagascar_programs#sfprep4plot | prep4plot guide]], [http://reproducibility.org/RSF/sfprep4plot.html prep4plot]
+
* Resamples a 2-D dataset to the desired picture resolution, with antialias: [http://reproducibility.org/RSF/sfprep4plot.html prep4plot]
  
 
* Setting up frames for a generic plot: [http://reproducibility.org/RSF/sfstdplot.html stdplot]
 
* Setting up frames for a generic plot: [http://reproducibility.org/RSF/sfstdplot.html stdplot]
Line 154: Line 90:
 
== Plot format ==
 
== Plot format ==
  
* Plot Assembler - convert ascii to vplot: [[Guide_to_madagascar_programs#sfplas | plas guide]], [http://reproducibility.org/RSF/sfplas.html plas]
+
* Plot Assembler - convert ascii to vplot: [http://reproducibility.org/RSF/sfplas.html plas]
  
* Plot Debugger - convert vplot to ascii: [[Guide_to_madagascar_programs#sfpldb | pldb guide]], [http://reproducibility.org/RSF/sfpldb.html pldb]
+
* Plot Debugger - convert vplot to ascii: [http://reproducibility.org/RSF/sfpldb.html pldb]
  
 
* Vplot filter for postscript: [http://reproducibility.org/RSF/sfpspen.html pspen]
 
* Vplot filter for postscript: [http://reproducibility.org/RSF/sfpspen.html pspen]
  
 
* Vplot filter for the virtual vplot device: [http://reproducibility.org/RSF/sfvppen.html vppen]
 
* Vplot filter for the virtual vplot device: [http://reproducibility.org/RSF/sfvppen.html vppen]
 
=References=
 
<references/>
 

Latest revision as of 05:59, 12 March 2009

Fotolia 11174449 XS.jpg

List of Basic Cube Utilities (BCU) in Madagascar. Operations listed here can throw away data or fill in with zeros, but should not create new values or alter existing ones -- those belong to the Numerical Methods program list.

An overview of all task-centric pages can be found in the main Task-centric program list.

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

SEG-Y file

SU file

File operations

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

Basic operations

  • Display basic information about RSF files: in
  • Display the size of RSF data forks: sizes
  • Copy a dataset: cp
  • Move a dataset: mv
  • Remove RSF files together with their data: rm
  • Print out data values: disfil

Operation on file content

  • Window a portion of the dataset: window
  • Transpose two axes in a dataset: transp
  • Concatenate datasets: cat or merge
  • Convert real data to complex (by adding zero imaginary part): rtoc
  • Extract real part of a complex dataset: real
  • Extract imaginary part of a complex dataset: imag
  • Create a complex dataset from its real and imaginary parts: cmplx
  • Rotate a portion of one or more axes in the data hypercube: rotate
  • Zero a portion of the dataset: cut
  • Pad a dataset with zeros: pad
  • Combine several datasets by interleaving: interleave
  • Pad and interleave traces: lpad
  • Compute Ni+1 x Ni+2 x ...: leftsize
  • Reverse one or more axes in the data hypercube: reverse

Header operations

  • Input parameters into a header: put
  • Output parameters from the header: get
  • Display the content of a header file: headerattr
  • Zero a portion of a dataset based on a header mask: headercut
  • Mathematical operations, possibly on header keys: headermath
  • Sort a dataset according to a header key: headersort
  • Window a dataset based on a header mask: headerwindow

Graph, plots, displays

Display

  • Generate raster plot: grey (sfbyte is the same)
  • Draw a balloon-style label: box
  • Plot signal with lollipops: dots
  • Generate 3-D cube plot for surfaces: graph3
  • Generate 3-D cube plot: grey3 (sfcubeplot is the same)
  • Hidden-line surface plot: thplot
  • Plot data with wiggly traces: wiggle
  • Resamples a 2-D dataset to the desired picture resolution, with antialias: prep4plot
  • Setting up frames for a generic plot: stdplot

Plot format

  • Plot Assembler - convert ascii to vplot: plas
  • Plot Debugger - convert vplot to ascii: pldb
  • Vplot filter for postscript: pspen
  • Vplot filter for the virtual vplot device: vppen