#!/bin/sh #set -x #CWPROOT=/prog1/SeismicUnix; export CWPROOT # on pandora CWPROOT=/usr/local/SU; export CWPROOT PATH=$CWPROOT/bin:$PATH; export PATH # This script will read the tape image files (*.tif) from disk and write # data in SEG-Y format to a tape. # The files are supposed to be named: 1.tif, 2.tif, 3.tif ... # # A file named ascii.header, which is used as the ebcdic header on the # segy tape, must exist in the current directory. It may be edited # according to your needs (the lines cannot be more than 80 characters # long and the number of lines must be exactly 40). dir=p12 # set directory where tif files are stored #first=127 # set first file number #last=139 # set last file number ##first=140 ##last=151 first=140 last=147 tape=/dev/nst0 # set tape device to use ns=6144 # set number of samples per trace dt=2000 # set sample inverval (microseconds) ######################################################################## # Generate header files used by segywrite segyhdrs ns=$ns dt=$dt bfile=binary hfile=/dev/null /bin/cp ascii.header header mt -f $tape setblk 0 mt -f $tape rewind # Generate a temporary file /bin/rm -f tmp.segd touch tmp.segd # Read tif-files and store data in a temporary file filenr=$first while [ $filenr -le $last ]; do echo "Reading $dir/$filenr.tif" ./tifread $dir/$filenr.tif >> tmp.segd /bin/ls -l tmp.segd filenr=`expr $filenr + 1` done # Read SEG-D from temporary file, and write SEG-Y to tape echo Start writing tape... segdread tape=tmp.segd use_stdio=1 ns=$ns | \ segywrite tape=$tape verbose=1 vblock=240 endian=0 mt -f $tape eof 3 echo Rewinding tape... mt -f $tape rewind #/bin/rm -f tmp.segd echo "Done!" exit