#! /bin/sh

# convert ASCII to binary
a2b n1=1 < marmhard.dat > marmhard.bin

# view Marmousi
ximage n1=122 n2=384 < marmhard.bin  \
xbox=10 ybox=20 wbox=768 hbox=244 \
legend=1 title="Marmousi model" &

# smooth
smooth2 n1=122 n2=384 r1=5 r2=5 < marmhard.bin > marmsmooth.bin

# view smoothed Marmousi
ximage n1=122 n2=384 < marmsmooth.bin \
xbox=10 ybox=350 wbox=768 hbox=244 \
legend=1 title="smoothed Marmousi" &

exit 0
