Programs

Curvelet transform

February 9, 2007 Programs 1 comment

sffdct, the Madagascar wrapper for the Fast Discrete Curvelet Transform (FDCT), is added to the collection of Madagascar programs. See an example in book/slim/rsf/sffdct.

Note that sffdct requires:

vplot2avi

December 15, 2006 Programs 1 comment

vplot2avi is a simple script for creating AVI movies from Vplot.

Requirements:

After creating movies, you can upload them to YouTube, Google Videos, etc. Here are some examples: A movie of fractal tree growth.

A movie of a 3-D data acquisition geometry that depicts one sail line with eight streamers

vplot2eps

July 28, 2006 Programs No comments

By popular demand, vplot2eps is now a separate script.

bash$ vplot2eps 
Usage: $RSFROOT/bin/vplot2eps [options] file.vpl [file.eps] 

Converts vplot to encapsulated postscript. 
[options] are passed to pspen.

Tips:

  • To convert EPS to PDF, use epstopdf.
  • To convert EPS to PNG or GIF, use pstoimg (supplied with latex2html) as follows:
bash$ PAPERSIZE=ledger pstoimg file.eps -out file.png [-type png -interlaced -antialias -crop a ...]
  • You can also try vplot2gif, which is capable of generating animated GIFs (requires additional programs).
  • pstoedit can convert EPS to other vector formats.

New user SLIM

March 19, 2006 Programs No comments

The Seismic Laboratory for Imaging and Modeling (SLIM) from the department of Earth and Ocean Sciences (EOS) at the University of British Columbia (UBC) is happy to announce the creation of its user folder in RSF. Current contributions are:
sfthr Threshold float/complex inputs given a constant/varying threshold level.
Methods available:
– soft
– hard
– non-negative Garrote (nng)

sfsort Sort in ascending/descending order absolute value entries of a float/complex vector.
More functions that come out of our industry-supported research will be released in the near future.

RSF hypercubes acquire physical dimensions

March 17, 2006 Programs No comments

At the suggestion of Gilles Hennenfent, certain RSF programs now recognize unit1=, unit2=, etc keywords in addition to label1=, label2=, etc. This allows for more control on physical dimensionality.
Here is an example of having some fun with physical units:

  1. Create some data.
    bash$ sfspike n1=100 n2=100 > spike.rsf
    bash$ sfin spike.rsf
    spike.rsf:
    in="/var/scratch/spike.rsf@"
    esize=4 type=float form=native
    n1=100         d1=0.004       o1=0          label1="Time" unit1="s"
    n2=100         d2=0.1         o2=0          label2="Distance" unit2="km"
    10000 elements 40000 bytes
    
  2. Convert kilometers to feet:
    bash$ sfunits unit2=ft spike.rsf >> spike.rsf
    Converting "km" to "ft" on axis 2
    bash$ sfin spike.rsf
    spike.rsf:
    in="/var/scratch/spike.rsf@"
    esize=4 type=float form=native
    n1=100         d1=0.004       o1=0          label1="Time" unit1="s"
    n2=100         d2=328.084     o2=0          label2="Distance" unit2="ft"
    10000 elements 40000 bytes
    

    sfunits is a new script for unit conversion. It relies on the Unix units utility.

  3. Apply 2-D FFT transform.
    bash$ < spike.rsf sffft1 | sffft3 axis=2 > fft.rsf
    sffft3: padded to 200
    bash$ sfin fft.rsf
    fft.rsf:
    in="/var/scratch/fft.rsf@"
    esize=8 type=complex form=native
    n1=55          d1=2.31481     o1=0          label1="Frequency" unit1="1/s"
    n2=200         d2=1.524e-05   o2=-0.001524  label2="Wavenumber" unit2="1/ft"
    11000 elements 88000 bytes
    
  4. Transform back.
    bash$ < fft.rsf sffft3 axis=2 inv=y | sffft1 inv=y > back.rsf
    bash$ sfin back.rsf
    back.rsf:
    in="/var/scratch/back.rsf@"
    esize=4 type=float form=native
    n1=100         d1=0.00400001  o1=0          label1="Time" unit1="s"
    n2=100         d2=328.084     o2=0          label2="Distance" unit2="ft"
    10000 elements 40000 bytes
    

Warning: this is a substantial change that affects many programs and examples. Please report any problems.

Generic dot product test and conjugate gradients for complex-valued data

January 4, 2006 Programs No comments

sfcdottest and sfcconjgrad are new programs that are analogous to sfdottest and sfconjgrad but operate with complex data. You can test them, for example, with sfcmatmult, a simple complex matrix multiplication operator.

Conjugate Gradients

December 21, 2005 Programs No comments

sfconjgrad is a new program for a generic conjugate-gradient least-squares inversion. A short description of it has been added to the RSF programs guide.

FFT sizes

December 17, 2005 Programs No comments

Update on FFT sizes: sffft1, sffft3, sfcosft, and some other programs that use FFT, now pad the data to the nearest optimal size.

Keeping processing history in headers

December 7, 2005 Programs 1 comment

Following a suggestion from James Rickett, I have redesigned RSF I/O to keep complete processing histories in RSF files. Please let me know if this causes any troubles or if you get other suggestions.

Zero a portion of a dataset based on a header mask

December 3, 2005 Programs No comments

sfheadercut is a new program for header-based zeroing of traces in RSF files. It is related to sfheaderwindow in the same way sfcut is related to sfwindow . A short description has been added to the RSF programs guide.
This program is based on Gilles Hennenfent’s applymask.