#! /bin/sh
# Making su data for little Endian machines

if
	[ ! -f oz25.F -o ! -f oz25.H ]
then
	echo "See the README file for accessing the required data" 1>&2; exit 1
fi

# Since we are on a "Little Endian" machine (PC), we must swap bytes
# Add header and set header fields for future processing convenience.

# Remark: this way is perhaps easiest to read:
#swapbytes <oz25.F |
#suaddhead ns=2000 |
#sushw key=dt a=2000 |
#sushw key=d1 a=.002 |
#sushw key=delrt a=2 |
#sushw key=f1 a=.002 |
#sushw key=ntr a=97 |
#sushw key=d2 a=.050 |
#sushw key=f2 a=-2.400 |
#sushw key=offset a=-2400 b=50 |
#sushw key=gx a=-2400 b=50 >data.su

# But once you know what you want, this way is more efficient:
swapbytes <oz25.F |
suaddhead ns=2000 |
sushw key=dt,d1,delrt,f1,ntr,d2,f2 a=2000,.002,2,.002,97,.050,-2.400 |
sushw key=offset,gx a=-2400,-2400 b=50,50 >data.su

# for testing on X machines
#suxmovie <data.segy perc=90 &

exit 0
