# Main Makefile for SEP143
# Title: RTM using wavefield decomposition
# Author: Kittinat Taweesintananon
# Date: May, 2011

SEP_ARCH = LINUX
ARCH     = LINUX

include ${SEPINC}/SEP.top

DATAPATH = /scratch/kittinat/

BINDIR = ./Bin
SRCDIR = ./Src
RESDIR = ./Fig
DATDIR = ./Dat
OBJDIR = ./Obj
PARDIR = ./Par
TXTDIR = ./Txt
SCRIPTDIR = ./Script

B = ${BINDIR}
S = ${SRCDIR}
R = ${RESDIR}
D = ${DATDIR}
O = ${OBJDIR}
P = ${PARDIR}
SH = ${SCRIPTDIR}

#TestModel = $(HOME)/Project/RTM/TestModel
#TestRTM = $(HOME)/Project/RTM/TestRTM
#TestDRTM = $(HOME)/Project/RTM/TestDRTM
TestModel = .
TestRTM = .
TestDRTM = .

########################
# includes other submakefiles
########################
include MODELakefile	# sub-makefile for getting models and some data
include RTMVEL0akefile	# sub-makefile for conventional RTM imaging with vel0
include RTMVEL1akefile	# sub-makefile for conventional RTM imaging with vel1
include SMOOTHDRTMVEL0akefile	# sub-makefile for DRTM imaging with vel0
include SMOOTHDRTMVEL1akefile	# sub-makefile for DRTM imaging with vel1

########################
# useful macros
########################
Movie   = Sep_cube
dn	= >/dev/null
n 	= /dev/null
Setplot	= Tpow tpow=0 | Grey eout=1 pclip=98 gainpanel=a

LABELAXES = title=" " label1="Depth (m)" label2="Distance (m)"
LABELFONT = labelrot=y labelfat=2 labelsz=11 titlesz=12
SCALEBAR = wantscalebar=y barlabel=" "
COLORBAR = newclip=1 bclip=4.9 eclip=14.9 wantscalebar=y barlabel="Velocity (m/s)" color=j
Axis = $(LABELAXES) $(LABELFONT) gainpanel=a
GreyVel = $(LABELAXES) $(LABELFONT) color= bias=2500 wantscalebar=y barlabel="Velocity (m/s)" pclip=100.
GraphVel = $(LABELFONT) title=" " label1="Depth (m)" label2="Velocity (m/s)" transp=1 yreverse=1 wherexlabel=t

## difine screen ratio for each velocity model
vel0graphratio = 1.5
vel1screenratio = 0.7 #0.47  # display ratio for vel1 is 0.47, comment out to get all figures ready for publish

########################
# Libraries
########################
UF90LIBS  = -lsep2df90 -lsepgeef90 -lsep3df90 -lsepfftf90 ${GEELIB} -lsep3d -lsepf90 -lsupersetf90 -lsuperset \
	    -L/opt/FFTW/lib -lfftw3f
UF90FLAGS = -O3 -axP -I./Src -I/opt/FFTW/include

########################
# Figures
########################
RESULTSER = vel0 vel0-mig data0-srm data0-nosrm \
	    rtm-sharpv0-srm rtm-sharpv0-srm-muted rtm-sharpv0-muted-nosrm \
	    rtm-v0-nosrm-muted rtm-v0-nosrm-muted-lowcut \
	    v0-SdRd v0-SuRu v0-SdRu v0-SuRd \
	    v0-SrRr v0-SlRl v0-SrRl v0-SlRr \
	    v0-SdRdPSuRu v0-SdRuPSuRd \
	    v0-SrRrPSlRl v0-SrRlPSlRr \
	    v0-vertPhoriz \
	    vel1 vel1-mig \
	    sout souf \
	    wvfld0-mult1 wvfld0-mult2 wvfld0-nomult1 wvfld0-nomult2 \
	    rtm1-vel1-mult-fullmuted-sousnap1 rtm1-vel1-mult-fullmuted-recsnap1 rtm1-vel1-mult-fullmuted-reflsnap1 \
	    rtm1-vel1-mult-fullmuted-sousnap2 rtm1-vel1-mult-fullmuted-recsnap2 rtm1-vel1-mult-fullmuted-reflsnap2 \
	    rtm1-vel1-mult-fullmuted-sousnap3 rtm1-vel1-mult-fullmuted-recsnap3 rtm1-vel1-mult-fullmuted-reflsnap3

RESULTSCR = crtm0-v1 crtm0-v1-lowcut \
	    v1-SdRd v1-SuRu v1-SdRu v1-SuRd \
	    v1-SrRr v1-SlRl v1-SrRl v1-SlRr \
	    v1-SdRdPSuRu v1-SdRuPSuRd v1-SdRuMSuRd \
	    v1-SrRrPSlRl v1-SrRlPSlRr v1-SrRlMSlRr \
	    v1-vertMhoriz v1-vertPhoriz

RESULTSNR = rtm-artifact1 rtm-artifact2 rtm-artifact1-color rtm-artifact2-color

FIG_pdf   = rtm-artifact1.pdf rtm-artifact2.pdf \
	    vel0.pdf vel0-mig.pdf data0-srm.pdf data0-nosrm.pdf \
	    rtm-sharpv0-srm.pdf rtm-sharpv0-srm-muted.pdf rtm-sharpv0-muted-nosrm.pdf \
	    rtm-v0-nosrm-muted.pdf rtm-v0-nosrm-muted-lowcut.pdf \
	    v0-SdRd.pdf v0-SuRu.pdf v0-SdRu.pdf v0-SuRd.pdf \
	    v0-SrRr.pdf v0-SlRl.pdf v0-SrRl.pdf v0-SlRr.pdf \
	    v0-SdRdPSuRu.pdf v0-SdRuPSuRd.pdf \
	    v0-SrRrPSlRl.pdf v0-SrRlPSlRr.pdf \
	    v0-vertPhoriz.pdf \
	    vel1.pdf vel1-mig.pdf \
	    crtm0-v1.pdf crtm0-v1-lowcut.pdf \
	    sout.pdf souf.pdf \
	    wvfld0-mult1.pdf wvfld0-mult2.pdf wvfld0-nomult1.pdf wvfld0-nomult2.pdf \
	    rtm1-vel1-mult-fullmuted-sousnap1.pdf rtm1-vel1-mult-fullmuted-recsnap1.pdf rtm1-vel1-mult-fullmuted-reflsnap1.pdf \
	    rtm1-vel1-mult-fullmuted-sousnap2.pdf rtm1-vel1-mult-fullmuted-recsnap2.pdf rtm1-vel1-mult-fullmuted-reflsnap2.pdf \
	    rtm1-vel1-mult-fullmuted-sousnap3.pdf rtm1-vel1-mult-fullmuted-recsnap3.pdf rtm1-vel1-mult-fullmuted-reflsnap3.pdf \
	    v1-SdRd.pdf v1-SuRu.pdf v1-SdRu.pdf v1-SuRd.pdf \
	    v1-SrRr.pdf v1-SlRl.pdf v1-SrRl.pdf v1-SlRr.pdf \
	    v1-SdRdPSuRu.pdf v1-SdRuPSuRd.pdf v1-SdRuMSuRd.pdf \
	    v1-SrRrPSlRl.pdf v1-SrRlPSlRr.pdf v1-SrRlMSlRr.pdf \
	    v1-vertMhoriz.pdf v1-vertPhoriz.pdf

fig_pdf: ${FIG_pdf}
%.view: %.v
	tube ${R}/$<
%.pdf: %.v
	pstexpen ${R}/$*.v ${R}/$*.ps color=n fat=1 fatmult=1.5 invras=y force=
	epstopdf ${R}/$*.ps

default: fig_pdf

##########################
### WORK HERE
##########################

###########
## intro using vel0 data
###########
## vel0 model
vel0.v: ${TestRTM}/vel0.H
	<$< Window n2=1 | Graph $(GraphVel) screenratio=2 | Vppen vpstyle=n scale= align=lu $(dn) out=$R/$@
vel0-mig.v: ${TestRTM}/vel0.mig.H
	<$< Window n2=1 | Graph $(GraphVel) screenratio=2 | Vppen vpstyle=n scale= align=lu $(dn) out=$R/$@

#show one-shot 2-D data from one simple horizontal reflector
data0-srm.v: ${TestRTM}/data1.vel0.mult.H
	<$< Transp plane=13 | Transp plane=34 | Grey title='data1 with SRM' $(Axis) label1="Time (s)" label2="Distance (m)" screenratio= | Vppen vpstyle=n scale= $(dn) out=$R/$@
data0-nosrm.v: ${TestRTM}/data1.vel0.nomult.fullmuted.H
	<$< Transp plane=13 | Transp plane=34 | Grey title='data1 without SRM' $(Axis) label1="Time (s)" label2="Distance (m)" screenratio= | Vppen vpstyle=n scale= $(dn) out=$R/$@

#compare preprocessing steps: muting can reduce head waves and diving waves, multiples attenuation is needed
rtm-sharpv0-srm.v: ${TestRTM}/rtm1.truevel0.mult.H
	<$< Grey title="A sharp-vel RTM image from unmuted data with SRM" $(Axis) screenratio=$(vel0screenratio) | Vppen vpstyle=n scale=$(vel0screenratio) $(dn) out=$R/$@

rtm-sharpv0-srm-muted.v: ${TestRTM}/rtm1.truevel0.mult.fullmuted.H
	<$< Grey title="A sharp-vel RTM image from muted data with SRM" $(Axis) screenratio=$(vel0screenratio) | Vppen vpstyle=n scale=$(vel0screenratio) $(dn) out=$R/$@

rtm-sharpv0-muted-nosrm.v: ${TestRTM}/rtm1.truevel0.nomult.fullmuted.H
	<$< Grey title="A sharp-vel RTM image from muted data without SRM" $(Axis) screenratio=$(vel0screenratio) | Vppen vpstyle=n scale=$(vel0screenratio) $(dn) out=$R/$@

#using non/-reflecting top boundary in RTM
#rtm-sharpv0-srm-refltop,rtm-sharpv0-srm-abstop

#compare more subtle techniques (smooth vel0, locut filtered)
rtm-v0-nosrm-muted.v: ${TestRTM}/rtm1.vel0.nomult.fullmuted.H
	<$< Grey title="A smooth-vel RTM image from muted data without SRM" $(Axis) screenratio=$(vel0screenratio) | Vppen vpstyle=n scale=$(vel0screenratio) $(dn) out=$R/$@

rtm-v0-nosrm-muted-lowcut.v: ${TestRTM}/rtm1.vel0.nomult.fullmuted.lowcut.H
	<$< Window n3=1 f3=6 | Grey title="A lowcut-filtered smooth-vel RTM image from muted data without SRM" $(Axis) screenratio=$(vel0screenratio) | Vppen vpstyle=n scale=$(vel0screenratio) $(dn) out=$R/$@


############
## origin of backscattered artifacts
rtm-artifact1.pdf: $R/rtm-artifact1.tiff
	tiff2pdf $< > $R/$@
rtm-artifact2.pdf: $R/rtm-artifact2.tiff
	tiff2pdf $< > $R/$@


#############################################
########### vel0 for DRTM
#############################################
## vertical smoothdrtm images from data without SRM & vel0
v0-SdRd.v: ${TestDRTM}/smoothdrtm1-vel0-nomult-SdownRdown.H
	<$< Real | Grey title="A real SMOOTHDRTM image from SdownRdown without SRM" $(Axis) screenratio=$(vel0screenratio) | Vppen vpstyle=n scale=$(vel0screenratio) $(dn) out=$R/$@
v0-SuRu.v: ${TestDRTM}/smoothdrtm1-vel0-nomult-SupRup.H
	<$< Real | Grey title="A real SMOOTHDRTM image from SupRup without SRM" $(Axis) screenratio=$(vel0screenratio) | Vppen vpstyle=n scale=$(vel0screenratio) $(dn) out=$R/$@
v0-SdRu.v: ${TestDRTM}/smoothdrtm1-vel0-nomult-SdownRup.H
	<$< Real | Grey title="A real SMOOTHDRTM image from SdownRup without SRM" $(Axis) screenratio=$(vel0screenratio) | Vppen vpstyle=n scale=$(vel0screenratio) $(dn) out=$R/$@
v0-SuRd.v: ${TestDRTM}/smoothdrtm1-vel0-nomult-SupRdown.H
	<$< Real | Grey title="A real SMOOTHDRTM image from SupRdown without SRM" $(Axis) screenratio=$(vel0screenratio) | Vppen vpstyle=n scale=$(vel0screenratio) $(dn) out=$R/$@
# combination
v0-SdRdPSuRu.v: ${TestDRTM}/real-smoothdrtm1-vel0-nomult-SdownRdown-plus-SupRup.H
	<$< Grey title="A real SMOOTHDRTM image from SdownRdown + SupRup without SRM" $(Axis) screenratio=$(vel0screenratio) | Vppen vpstyle=n scale=$(vel0screenratio) $(dn) out=$R/$@
v0-SdRuPSuRd.v: ${TestDRTM}/real-smoothdrtm1-vel0-nomult-SdownRup-plus-SupRdown.H
	<$< Grey $(Axis) screenratio=$(vel0screenratio) | Vppen vpstyle=n scale=$(vel0screenratio) $(dn) out=$R/$@


##########################
## horizontal smoothdrtm images from data without SRM & vel0
v0-SrRr.v: ${TestDRTM}/smoothdrtm1-vel0-nomult-SrightRright.H
	<$< Real | Grey title="A real SMOOTHDRTM image from SrightRright without SRM" $(Axis) screenratio=$(vel0screenratio) | Vppen vpstyle=n scale=$(vel0screenratio) $(dn) out=$R/$@
v0-SlRl.v: ${TestDRTM}/smoothdrtm1-vel0-nomult-SleftRleft.H
	<$< Real | Grey title="A real SMOOTHDRTM image from SleftRleft without SRM" $(Axis) screenratio=$(vel0screenratio) | Vppen vpstyle=n scale=$(vel0screenratio) $(dn) out=$R/$@
v0-SrRl.v: ${TestDRTM}/smoothdrtm1-vel0-nomult-SrightRleft.H
	<$< Real | Grey title="A real SMOOTHDRTM image from SrightRleft without SRM" $(Axis) screenratio=$(vel0screenratio) | Vppen vpstyle=n scale=$(vel0screenratio) $(dn) out=$R/$@
v0-SlRr.v: ${TestDRTM}/smoothdrtm1-vel0-nomult-SleftRright.H
	<$< Real | Grey title="A real SMOOTHDRTM image from SleftRright without SRM" $(Axis) screenratio=$(vel0screenratio) | Vppen vpstyle=n scale=$(vel0screenratio) $(dn) out=$R/$@
# combination
v0-SrRrPSlRl.v: ${TestDRTM}/real-smoothdrtm1-vel0-nomult-SrightRright-plus-SleftRleft.H
	<$< Grey title="A real SMOOTHDRTM image from SrightRright + SleftRleft without SRM" $(Axis) screenratio=$(vel0screenratio) | Vppen vpstyle=n scale=$(vel0screenratio) $(dn) out=$R/$@
v0-SrRlPSlRr.v: ${TestDRTM}/real-smoothdrtm1-vel0-nomult-SrightRleft-plus-SleftRright.H
	<$< Grey $(Axis) screenratio=$(vel0screenratio) | Vppen vpstyle=n scale=$(vel0screenratio) $(dn) out=$R/$@

###########################
## combination of horizontal and vertical decomposed RTM images 
v0-vertPhoriz.v: ${TestDRTM}/real-smoothdrtm1-vel0-nomult-vert-plus-horiz.H
	<$< Grey $(Axis) screenratio=$(vel0screenratio) | Vppen vpstyle=n scale=$(vel0screenratio) $(dn) out=$R/$@



#############################################
#############################################





###########
## using vel1 data
###########

## velocity model 1
vel1.v: ${TestDRTM}/vel1.H
	<$< Grey $(GreyVel) screenratio=$(vel1screenratio) | Vppen vpstyle=n scale=$(vel1screenratio) $(dn) out=$R/$@
vel1-mig.v: ${TestDRTM}/vel1.mig.H
	<$< Grey $(GreyVel) screenratio=$(vel1screenratio) | Vppen vpstyle=n scale=$(vel1screenratio) $(dn) out=$R/$@

## an example of CRTM images
crtm0-v1.v: ${TestRTM}/rtm0.vel1.mult.fullmuted.H
	<$< Grey title="An RTM image from fullmuted data with SRM" $(Axis) screenratio=$(vel1screenratio) | Vppen vpstyle=n scale=$(vel1screenratio) $(dn) out=$R/$@

crtm0-v1-lowcut.v: ${TestRTM}/rtm0.vel1.mult.fullmuted.lowcut.H
	<$< Window n3=1 f3=0 | Grey title="An lowcut-filtered RTM image from muted data with SRM" $(Axis) screenratio=$(vel1screenratio) | Vppen vpstyle=n scale=$(vel1screenratio) $(dn) out=$R/$@

########################
## source wavelets
sout.v: ${TestModel}/sou.HH
	<$< Graph $(Axis) title='Source wavelet' label1="Time (s)" label2="Amplitude" $(dn) out=$R/$@
souf.v: ${TestModel}/souspectra.H
	<$< Graph $(Axis) title='Spectrum of source wavelet' label1="Frequency (Hz)" label2="Amplitude" $(dn) out=$R/$@

########################
## wavefield modeling in free space
wvfld0-mult1.v: ${TestModel}/wvfld0.mult.H
	<$< Window n3=1 f3=5 | Grey $(Axis) $(dn) out=$R/$@
wvfld0-mult2.v: ${TestModel}/wvfld0.mult.H
	<$< Window n3=1 f3=11 | Grey $(Axis) $(dn) out=$R/$@
wvfld0-nomult1.v: ${TestModel}/wvfld0.nomult.H
	<$< Window n3=1 f3=5 | Grey $(Axis) $(dn) out=$R/$@
wvfld0-nomult2.v: ${TestModel}/wvfld0.nomult.H
	<$< Window n3=1 f3=11 | Grey $(Axis) $(dn) out=$R/$@

########################
## snapshots of the formation process of RTM images
## This set of figures can be used to examine the formation of RTM artifacts
## % must be sou, rec or refl
rtm1-vel1-mult-fullmuted-%snap1.v: ${TestRTM}/rtm1.vel1.mult.fullmuted.H ${TXTDIR}/text-imagingsnap1-vel1-mult
	< ${TestRTM}/rtm1.vel1.mult.fullmuted.$*snap.H Window n3=1 f3=12 | Grey $(Axis) screenratio=$(vel1screenratio) $(dn) out=$R/tmp1x.rtm1.vel1.mult.fullmuted.$*snap1.v
	vp_annotate <$R/tmp1x.rtm1.vel1.mult.fullmuted.$*snap1.v batch=y vpstyle=n scale=$(vel1screenratio) text=${TXTDIR}/text-imagingsnap1-vel1-mult >$R/$@
	rm -f $R/tmp1x.rtm1.vel1.mult.fullmuted.$*snap1.v
rtm1-vel1-mult-fullmuted-%snap2.v: ${TestRTM}/rtm1.vel1.mult.fullmuted.H ${TXTDIR}/text-imagingsnap2-vel1-mult
	< ${TestRTM}/rtm1.vel1.mult.fullmuted.$*snap.H Window n3=1 f3=8 | Grey $(Axis) screenratio=$(vel1screenratio) $(dn) out=$R/tmp1x.rtm1.vel1.mult.fullmuted.$*snap2.v
	vp_annotate <$R/tmp1x.rtm1.vel1.mult.fullmuted.$*snap2.v batch=y vpstyle=n scale=$(vel1screenratio) text=${TXTDIR}/text-imagingsnap2-vel1-mult >$R/$@
	rm -f $R/tmp1x.rtm1.vel1.mult.fullmuted.$*snap2.v
rtm1-vel1-mult-fullmuted-%snap3.v: ${TestRTM}/rtm1.vel1.mult.fullmuted.H ${TXTDIR}/text-imagingsnap3-vel1-mult
	< ${TestRTM}/rtm1.vel1.mult.fullmuted.$*snap.H Window n3=1 f3=4 | Grey $(Axis) screenratio=$(vel1screenratio) $(dn) out=$R/tmp1x.rtm1.vel1.mult.fullmuted.$*snap3.v
	vp_annotate <$R/tmp1x.rtm1.vel1.mult.fullmuted.$*snap3.v batch=y vpstyle=n scale=$(vel1screenratio) text=${TXTDIR}/text-imagingsnap3-vel1-mult >$R/$@
	rm -f $R/tmp1x.rtm1.vel1.mult.fullmuted.$*snap3.v

##########################
## vertical smoothdrtm images from data with SRM & vel1
v1-SdRd.v: ${TestDRTM}/smoothdrtm0.vel1.mult.SdownRdown.H
	<$< Real | Grey title="A real SMOOTHDRTM image from SdownRdown with SRM" $(Axis) screenratio=$(vel1screenratio) | Vppen vpstyle=n scale=$(vel1screenratio) $(dn) out=$R/$@
v1-SuRu.v: ${TestDRTM}/smoothdrtm0.vel1.mult.SupRup.H
	<$< Real | Grey title="A real SMOOTHDRTM image from SupRup with SRM" $(Axis) screenratio=$(vel1screenratio) | Vppen vpstyle=n scale=$(vel1screenratio) $(dn) out=$R/$@
v1-SdRu.v: ${TestDRTM}/smoothdrtm0.vel1.mult.SdownRup.H
	<$< Real | Grey title="A real SMOOTHDRTM image from SdownRup with SRM" $(Axis) screenratio=$(vel1screenratio) | Vppen vpstyle=n scale=$(vel1screenratio) $(dn) out=$R/$@
v1-SuRd.v: ${TestDRTM}/smoothdrtm0.vel1.mult.SupRdown.H
	<$< Real | Grey title="A real SMOOTHDRTM image from SupRdown with SRM" $(Axis) screenratio=$(vel1screenratio) | Vppen vpstyle=n scale=$(vel1screenratio) $(dn) out=$R/$@
# combination
v1-SdRdPSuRu.v: ${TestDRTM}/real.smoothdrtm0.vel1.mult.SdownRdown-plus-SupRup.H
	<$< Grey title="A real SMOOTHDRTM image from SdownRdown + SupRup with SRM" $(Axis) screenratio=$(vel1screenratio) | Vppen vpstyle=n scale=$(vel1screenratio) $(dn) out=$R/$@
v1-SdRuPSuRd.v: ${TestDRTM}/real.smoothdrtm0.vel1.mult.SdownRup-plus-SupRdown.H
	<$< Grey $(Axis) screenratio=$(vel1screenratio) | Vppen vpstyle=n scale=$(vel1screenratio) $(dn) out=$R/$@
v1-SdRuMSuRd.v: ${TestDRTM}/real.smoothdrtm0.vel1.mult.SdownRup-minus-SupRdown.H
	<$< Grey $(Axis) screenratio=$(vel1screenratio) | Vppen vpstyle=n scale=$(vel1screenratio) $(dn) out=$R/$@


##########################
## horizontal smoothdrtm images from data with SRM & vel1
v1-SrRr.v: ${TestDRTM}/smoothdrtm0.vel1.mult.SrightRright.H
	<$< Real | Grey title="A real SMOOTHDRTM image from SrightRright with SRM" $(Axis) screenratio=$(vel1screenratio) | Vppen vpstyle=n scale=$(vel1screenratio) $(dn) out=$R/$@
v1-SlRl.v: ${TestDRTM}/smoothdrtm0.vel1.mult.SleftRleft.H
	<$< Real | Grey title="A real SMOOTHDRTM image from SleftRleft with SRM" $(Axis) screenratio=$(vel1screenratio) | Vppen vpstyle=n scale=$(vel1screenratio) $(dn) out=$R/$@
v1-SrRl.v: ${TestDRTM}/smoothdrtm0.vel1.mult.SrightRleft.H
	<$< Real | Grey title="A real SMOOTHDRTM image from SrightRleft with SRM" $(Axis) screenratio=$(vel1screenratio) | Vppen vpstyle=n scale=$(vel1screenratio) $(dn) out=$R/$@
v1-SlRr.v: ${TestDRTM}/smoothdrtm0.vel1.mult.SleftRright.H
	<$< Real | Grey title="A real SMOOTHDRTM image from SleftRright with SRM" $(Axis) screenratio=$(vel1screenratio) | Vppen vpstyle=n scale=$(vel1screenratio) $(dn) out=$R/$@
# combination
v1-SrRrPSlRl.v: ${TestDRTM}/real.smoothdrtm0.vel1.mult.SrightRright-plus-SleftRleft.H
	<$< Grey title="A real SMOOTHDRTM image from SrightRright + SleftRleft with SRM" $(Axis) screenratio=$(vel1screenratio) | Vppen vpstyle=n scale=$(vel1screenratio) $(dn) out=$R/$@
v1-SrRlPSlRr.v: ${TestDRTM}/real.smoothdrtm0.vel1.mult.SrightRleft-plus-SleftRright.H
	<$< Grey $(Axis) screenratio=$(vel1screenratio) | Vppen vpstyle=n scale=$(vel1screenratio) $(dn) out=$R/$@
v1-SrRlMSlRr.v: ${TestDRTM}/real.smoothdrtm0.vel1.mult.SrightRleft-minus-SleftRright.H
	<$< Grey $(Axis) screenratio=$(vel1screenratio) | Vppen vpstyle=n scale=$(vel1screenratio) $(dn) out=$R/$@

###########################
## combination of horizontal and vertical decomposed RTM images 
v1-vertMhoriz.v: ${TestDRTM}/real.smoothdrtm0.vel1.mult.vert-minus-horiz.H
	<$< Grey $(Axis) screenratio=$(vel1screenratio) | Vppen vpstyle=n scale=$(vel1screenratio) $(dn) out=$R/$@
v1-vertPhoriz.v: ${TestDRTM}/real.smoothdrtm0.vel1.mult.vert-plus-horiz.H
	<$< Grey $(Axis) screenratio=$(vel1screenratio) | Vppen vpstyle=n scale=$(vel1screenratio) $(dn) out=$R/$@



##########################
### Cleaning stuff
##########################
clean: 
	rm -f *.mod *.fix.f90 $O/*.o $B/*.x
	Rm *.H


include ${SEPINC}/SEP.bottom