create_BPF_panel.sh
From here
#!/bin/sh
# Course: Geophysical Exploration
#
# Sample script : Bandpass filter
# Apply Bandpass filter with increasing pass-band
#
# by W.T.
# Edit the name of the input and oudput data
indata=cdp1100.su
outdata=bpfpanel_$indata
# Paramteres
fmin=0 # Minimum frequency (Hz)
fmax=100 # Maximum frequency (Hz)
df=10 # Increment of freqeuncy band (Hz)
perc=98
#--
nt=`surange < $indata | grep ns | awk '{print $2}'`
dt=`surange < $indata | grep dt | awk '{print $2}'`
# Original traces
cat $indata > $outdata
sunull nt=$nt dt=$dt ntr=20 >>$outdata
# BPF'ed traces
f=$fmin
while [ $f -le $fmax ]; do
f1=$f
a=`expr $f1 - 1`
if [ $a -lt 0 ] ; then
a=0
fi
b=`expr $f1 + 1`
f2=`expr $f1 + $df`
c=`expr $f2 - 1`
d=`expr $f2 + 1`
sufilter < $indata f=$a,$b,$c,$d amps=0,1,1,0 >> $outdata
sunull nt=$nt dt=$dt ntr=5 >>$outdata
f=`expr $f + $df`
done
# Plot
suximage < $outdata perc=$perc \
label1='Time (s)' label2='' &
suspecfx < $outdata | \
suximage perc=$perc \
label1='Frequency (Hz)' label2='' &
exit
Till here