CWP Software Update: 15 August 1996  (29th edition)

The new compressed tars are available at our anonymous ftp
Internet address: ftp.cwp.mines.edu
or
[138.67.12.4]
The directory path is: pub/cwpcodes

The files are also available on the World Wide Web at:
http://www.cwp.mines.edu/cwpcodes/

The files you will need are (xx stands for the number of
the current release):
README_BEFORE_UNTARRING
untar_me_first.xx.tar.Z    --- contains README and Portability information
cwp.su.all.xx.tar.Z        --- contains the source code for the release
documentation.xx.tar.Z     --- contains the SU Users Manual

For incremental updating, instead take:
README_TO_UPDATE
update.yy.to.xx.tar.Z
update.list

NOTE: gzipped versions (untar_me_first.xx.tar.gz, etc.) are now available.

For detailed information on the free materials currently
available from CWP (Center for Wave Phenomena), send e-mail
to:
cwpinfo@dix.mines.edu
and
samizdat@dix.mines.edu


New Support:
================================================================
The Society of Exploration Geophysicists (SEG) is now partially
supporting SU through an SEG Foundation grant.  We are most
appreciative--our sincere thanks to the SEG Foundation for
recognizing us.

We also thank the Consortium Project on Seismic Inverse Methods
for Complex Structures for its continuing financial support of
the SU project.
================================================================

Mirror Sites:
================================================================
Sang-yong Suh (sysuh@kigam.re.kr) has kindly started an SU mirror
site with address ftp.kigam.re.kr in Korea.  Caution: it may
take a day or two for updates to reach the mirror site depending
on Internet traffic across the Pacific.
================================================================


Referencing Seismic Unix:
================================================================
In publications, please reference SU.

Example:
   Cohen, J. K. and Stockwell, Jr. J. W., (1996), CWP/SU: Seismic
      Unix Release 29: a free package for seismic research and processing,
      Center for Wave Phenomena, Colorado School of Mines.

Of course, 1996  and 29 should be replaced with date and number
of the release you are using.
================================================================


unistd.h include file in par.h
================================================================
In connection with the changes discussed in the next two items,
we used the access() system call (non-ANSI C).  This call is
prototyped in unistd.h and so we have inserted an include for
it in par.h.  We think the existence of unistd.h is nearly
universal, but if it is not, all that needs be is to remove this
entry from par.h.  To make it easy, we've left a suitable
par.h in $CWPROOT/src/Portability
================================================================

Use of temporary directories
================================================================
A long standing problem is SU's use of the tmpfile() call to
create temporary files.  On some systems this actually creates
files -- often in /tmp which may be too small to accommodate
them.  On the other hand, when tmpfile() uses memory, that also
may be too small.  A solution suggested by Alexander Koek and
Eric Verschuur, Delft and Toralf Foerster (see above) is to
honor an environmental variable giving a directory path to
store temporary files in.  We have called this CWP_TMPDIR.
Alternately, some codes will accept a command-line path
given as tmpdir=/the/path.  Not all codes using tmpfile()
have been updated in this release.  The following oneshave been:
suflip, sugain, suxwigb, suximage, suxmovie, supswigb, supswigp.
Also susort looks for CWP_TMPDIR, but doesn't accept command-line
directory paths.
================================================================

Linting:
================================================================
A special thanks to Toralf Foerster, who has also made many other
contributions to SU for (a) running the lint program on SU, and
(b) filtering the output to the more serious transgressions.
Toralf is at the Institut fuer Ostseeforschung Warnemuende in
Rostock, Germany.  It is still an ongoing task here to eliminate
all the lint-like warnings.
================================================================


Third Party Software:
================================================================
Cray Support--
In the Third Party Directory $CWPROOT/src/Third_Party/Cray
is a new and more comprehensive collection donated by Ted Clee of
Cray Research.
----------------------------------------------------------------
SEG2 to SEG-Y--
In the Third Party Directory $CWPROOT/src/Third_Party/seg2segy
by Brett Bennett. 

Thanks to:
Dominique Rousset -  Universite de Pau
for giving us permission to put a copy in our Third_Party directory.
================================================================


New Software:
================================================================
/usr/local/cwp/src/dwpt -- discrete wavelet packet compression,
includes
wpc1comp2.c	- trace by trace compression, using the 1D algorithm
wpc1uncomp2.c	- ... corresponding decompression routine
wpccompress.c	- compression of a data panel, using 2D algorithm
wpcuncompress.c	- ... corresponding decompression routine
The usage of each of these pairs is similar to the standard
compress/uncompress pair except the wavelet compression codes
have a parameter to specify the acceptable error in reconstruction.
	==> Author: Tong Chen, CWP (now at Spectra Logic, Boulder, CO)

xplot/main/xcontour.c -- Similar to pscontour, but for X windows
	==> Author: Morten Pedersen, visiting CWP from
	    Aarhus University, Denmark

su/graphics/xplot/suxcontour.c -- SU wrapper for the new xcontour
	==> Author: Morten Pedersen, visiting CWP from
	    Aarhus University, Denmark

su/main/sumedian.c - performs median filtering, i.e, removes events
on user-defined polygonal curve  
A demo is $CWPROOT/src/demos/Filtering/Sumedian
	==> Author: John W. Stockwell, CWP

su/main/suharlan.c - signal-noise separation by the invertible linear
	transformation method of Harlan
A demo is $CWPROOT/src/demos/Tau_P/Suharlan
	==> Author: Gabriel Alvarez, CWP (now back at Ecopetrol)
================================================================


Changes:
================================================================
cwp/lib/convolution.c -- gave a segmentation violation for very
	special sizes (1024 and 2048 and maybe others).

par/lib/fgettr.c -- fgettr returned wrong number of bytes on first
	entry.
	==> Thanks to Alexander Koek, Delft

par/main/a2b.c -- enlarged buffer size
	==> Thanks to Toralf Foerster, Germany

par/main/recast.c -- corrected declaration of xc that caused failure if
	converting from or to chars. Rewrote using macros.  Filled
	in missing cases, including nearest short, etc.

su/include/segy.h -- changed hdt, dto, hns, hso to unsigned short
	in the binary header header structure (bhed) to agree with ns
	and dt in the trace header structure (segy).  This also
	fixes a side-effect problem in segyread when hns=32768.
	==> Thanks to Toralf Foerster, Germany

su/include/su.h -- Added macro CHECK_NT(label,value) to check that
	value is <= SU_NFLTS.  Typical usage:
	if (!getparint("nt",&nt)) nt = 101; CHECK_NT("nt",nt);
	Added macros to support scaling factors

su/lib/fgettr.c,fputtr.c -- the args in the internal subroutines
	dataread, datawrite were swapped to have the same order
	as fread, fwrite.

su/main/*.c -- a number of programs set or modified the number of
	samples on a trace without checking that the new sample
	number was <= the max allowed on a trace (SU__NFLTS,
	currently 32,768).  We hope we found them all.  The
	fixes were implemented with the CHECK_NT macro described
	above.  Affected programs:
	suflip.c, sugazmig.c, sunull.c, suplane.c, surelan.c,
	suresamp.c, suspike.c, susyncz.c, susynlv.c, susynlvcw.c,
	susynvxz.c, susynvxzcs.c, sutsq.c suttoz.c, suvelan.c

su/main/segyhdrs.c -- changed declarations of binary header fields
	to agree with those in segy.h.

su/main/segyread.c -- only issue some warns when verbose=1 is set
	==> Thanks to Toralf Foerster, Germany

su/main/suflip.c -- avoid superfluous conversions of dt that can cause
	rounding errors.
	==> Thanks to Toralf Foerster, Germany

su/main/sufrac.c -- changed handling of negative powers to effectively
	remove the DC component.

su/main/sulog.c -- added alternative parameter names to output par file

su/main/suplane.c -- changed declaration of msps to float, enabling
	dt= option to work with e.g. dt=0.0035
	==> Thanks to Craig Artley, Golden Geophysical

su/main/sustrip.c -- added alternative parameter names to output par file

su/main/sutaup.c -- now works as advertised, we hope

su/main/suxcor.c -- added getpar for ntrc
	==> Thanks to Toralf Foerster, Germany

su/main/suvibro.c -- fixed bug when t1+t2>tv (even for default t1,t2)
	==> Thanks to Toralf Foerster, Germany

su/graphics/psplot/supswigb.c,supswigp.c,
su/graphics/xplot/suxwigb.c -- honor the SEG-Y scale factors and added
	vsp-style plotting with style=vsp option
	==> Thanks to Brian J. Zook, Southwest Research Institute
	
xplot/main/psimage -- Changed the parameter names wbox,hbox to
	width,height (measured in inches) to distinguish them from
	ximage's use of pixels.  Still silently accept wbox,hbox
        for benefit of old scripts.
	==> Thanks to Alexander Koek and Eric Verschuur, Delft

xplot/lib/axesbox.c -- increased precision of tic labels
	==> Thanks to Toralf Foerster, Germany

xplot/main/xwigb - Added style=normal and wigclip flag that avoids
	white space at margins when xcur>1
	==> Thanks to Brian J. Zook, Southwest Research Institute

xplot/main/xwigb - Fix in postscript plotting option to really get
	300 dpi
	==> Thanks to Morten Pedersen, visiting CWP from
	    Aarhus University, Denmark

xplot/main/ximage - Added blank= option to specify what portion of the
	lower range to blank out (make the background color).  The
	value should range from 0 to 1.	
	==> Thanks to Brian J. Zook, Southwest Research Institute

xplot/main/ximage -- hbox option wasn't honored in the pswig option
	==> Thanks to Stewart A. Levin, Mobil	

xplot/main/ximage,xwigb,xpicker -- increased precision of mouse location
	print and pick location print.  Made precisions the same.
	==> Thanks to Toralf Foerster, Germany

psplot/main/psgraph -- the documentation didn't make clear how to
	use the color options (and it's different than xgraph)
	==> Thanks to ??? (I apologize for losing the mail message
	    that alerted us to this problem.  Jack)
================================================================


Unresolved Issues
================================================================
CWP X graphics codes don't work on DEC Alpha under DEC OS.

-xplot/xwigb
Under linux/XFree86 use of xwigb (or suxwigb) with pipe input,
attempting to zoom often causes the window to close.  The
fix in the next paragraph doesn't help with this.

Under older versions of linux/XFree86 use of the X functionality
occasionally locks up the machine necessitating a reset.  Amazingly,
using the parameters wbox=1000 hbox=1000 seems to avoid this problem.

-Xtcwp/main/xmovie,xgraph
These windows will not accept focus under linux/XFree86.  We know
a kludge to correct this, but since it makes no sense, we refuse
to put it in the distribution.

-Xtcwp/main/xmovie
The grid1=, grid2= options cause an abort under linux/XFree86 and
possibly other platforms.  Message is:
	Error: Cannot perform malloc
This seems like a compiler error since innocuous changes in the code
or compiling without optimization makes the problem go away.  We
distributed the current version with such an innocuous change
to accomodate this: we changed the dimension of args[] from 100 to 98.
================================================================
