
##########################
#
# flat reflector
plane.crec:
	Wavelet n1=501 d1=0.004 wavelet=ricker2 phase=0 fund=15 order=0.2 tdelay=1 domain=time > j2.H;echo o1=-1 >> j2.H
	<j2.H Transf f_min=0 f_min1=4 f_max1=30 f_max=34 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs > j2.H
	Math file1=j2.H exp="file1*0">j1.H;Math file1=j2.H exp="file1*-1">j3.H;Cmplx j3.H j1.H| Transp plane=13 > csou.H
	Spike n1=401 o1=0 d1=5 n2=601 o2=-3000 d2=10 n3=1 o3=0 d3=1 nsp=1 k1=1 | Pad beg2=700 end2=700 > j.H
	Math file1=j.H exp="file1*0+2000" > vel.H
	Math file1=vel.H exp="file1*0+0.2" | Mute vmute=0 tramp=0 tmute=500 > j.H
	Math file1=j.H exp="file1+1" |Transp plane=23 > reflect.H
	${Prst_ExpRefl}/ShtPSPI/bin/OWmod2d_par.x sou=csou.H vel=twin.vel.tr.H nrefvel=4 lloyd=1 vsal=4000 \
	vreflect=reflect.H shots=s.H extrapolator=pspi \
	traces_in_taper=50 padtraces=150 xmin=-9000 xmax=9000 \
	nrec=151 orec=-750 drec=10 nsht=1 osht=-2000 dsht=20 zmin=0 zmax=1300 node=14 > /dev/null
	Cat axis=4 s.H s.H s.H s.H s.H s.H s.H s.H s.H s.H s.H s.H s.H s.H s.H s.H s.H s.H s.H s.H> s1.H
	Cat axis=4 s1.H s1.H s1.H s1.H s1.H s1.H s1.H s1.H s1.H s1.H s.H > plane.crec.H

plane.mig1:
	echo o6=0 >> plane.crec.H
	echo o6=0 >> csou.H
	Spike n1=401 o1=0 d1=5 n2=601 o2=-3000 d2=10 n3=1 o3=0 d3=1 nsp=1 k1=1 | Pad beg2=700 end2=700 > j.H
	Math file1=j.H exp="file1*0+2000" > vel.H
	Scale dscale=1 0.9 < vel.H | Gpow gpow=-1 | Transp plane=12 reshape=1,3 > slow.H
	${Prst_ExpRefl}/Tese/src/areal/wemvaop/OWmig2d_areal.x sou=csou.H rec=plane.crec.H \
	vel=slow.H bkgimg=plane.tkim.H \
	zmin=0 zmax=800 nh=81 oh=-400 migration=1 areal=0 \
	padtraces=100 traces_in_taper=25 node=14 extrapolator=pspi nrefvel=1 vsal=4000

plane.mig2:
	echo o6=0 >> plane.crec.H
	Spike n1=401 o1=0 d1=5 n2=601 o2=-3000 d2=10 n3=1 o3=0 d3=1 nsp=1 k1=1 | Pad beg2=700 end2=700 > j.H
	Math file1=j.H exp="file1*0+2000" > vel.H
	Scale dscale=0.9 < vel.H | Gpow gpow=-1 | Transp plane=12 reshape=1,3 > slow.H
	${Prst_ExpRefl}/Tese/src/areal/wemvaop/OWmig2d_areal.x sou=csou.H rec=plane.crec.H \
	vel=slow.H bkgimg=plane.bkim.slo.H \
	zmin=0 zmax=1400 nh=81 oh=-400 migration=1 areal=0 \
	padtraces=100 traces_in_taper=25 node=14 extrapolator=pspi nrefvel=1 vsal=4000 &

plane.mig3:
	echo o6=0 >> plane.crec.H
	Spike n1=401 o1=0 d1=5 n2=601 o2=-3000 d2=10 n3=1 o3=0 d3=1 nsp=1 k1=1 | Pad beg2=700 end2=700 > j.H
	Math file1=j.H exp="file1*0+2000" > vel.H
	Scale dscale=1.1 < vel.H | Gpow gpow=-1 | Transp plane=12 reshape=1,3 > slow.H
	${Prst_ExpRefl}/Tese//src/areal/wemvaop/OWmig2d_areal.x sou=csou.H rec=plane.crec.H \
	vel=slow.H bkgimg=plane.bkim.fast.H \
	zmin=0 zmax=1400 nh=81 oh=-400 migration=1 areal=0 \
	padtraces=100 traces_in_taper=25 node=14 extrapolator=pspi nrefvel=1 vsal=4000 &

plane.grad1:
	< plane.tkim.H ${Prst_ExpRefl}/Tese/src/areal/wemvaop/OW_dso.x mdso=0 > plane.tkim.dso.H
	Spike n1=401 o1=0 d1=5 n2=601 o2=-3000 d2=10 n3=1 o3=0 d3=1 nsp=1 k1=1 | Pad beg2=700 end2=700 > j.H
	Math file1=j.H exp="file1*0+2000" > vel.H
	Scale dscale=1 < vel.H | Gpow gpow=-1 | Transp plane=12 reshape=1,3 > slow.H
	${Prst_ExpRefl}/Tese/src/areal/wemvaop/OWwemva_opers.x sou=csou.H rec=plane.crec.H vel=slow.H deltaI=plane.tkim.dso.H \
	zmin=0 zmax=800 nh=81 oh=-400 jh=1 adj=1 areal=0 extrapolator=pspi nrefvel=1 vsal=6000 \
	padtraces=100 traces_in_taper=25 node=14 > $@.H

plane.grad2:
	< plane.bkim.slo.H ${Prst_ExpRefl}/Tese/src/areal/wemvaop/OW_dso.x mdso=0 > plane.bslo.dso.H
	Spike n1=401 o1=0 d1=5 n2=601 o2=-3000 d2=10 n3=1 o3=0 d3=1 nsp=1 k1=1 | Pad beg2=700 end2=700 > j.H
	Math file1=j.H exp="file1*0+2000" > vel.H
	Scale dscale=0.9 < vel.H | Gpow gpow=-1 | Transp plane=12 reshape=1,3 > slow.H
	${Prst_ExpRefl}/Tese/src/areal/wemvaop/OWwemva_opers.x sou=csou.H rec=plane.crec.H vel=slow.H deltaI=plane.bslo.dso.H \
	zmin=0 zmax=800 nh=81 oh=-400 jh=1 adj=1 areal=0 extrapolator=pspi nrefvel=1 vsal=6000 \
	padtraces=100 traces_in_taper=25 node=14 > $@.H

plane.grad3:
	< plane.bkim.fast.H ${Prst_ExpRefl}/Tese/src/areal/wemvaop/OW_dso.x mdso=0 > plane.bfast.dso.H
	Spike n1=401 o1=0 d1=5 n2=601 o2=-3000 d2=10 n3=1 o3=0 d3=1 nsp=1 k1=1 | Pad beg2=700 end2=700 > j.H
	Math file1=j.H exp="file1*0+2000" > vel.H
	Scale dscale=1.1 < vel.H | Gpow gpow=-1 | Transp plane=12 reshape=1,3 > slow.H
	${Prst_ExpRefl}/Tese/src/areal/wemvaop/OWwemva_opers.x sou=csou.H rec=plane.crec.H vel=slow.H deltaI=plane.bfast.dso.H \
	zmin=0 zmax=800 nh=81 oh=-400 jh=1 adj=1 areal=0 extrapolator=pspi nrefvel=1 vsal=6000 \
	padtraces=100 traces_in_taper=25 node=14 > $@.H

###################################
planesh.crec:
	Wavelet n1=301 d1=0.004 wavelet=ricker2 phase=0 fund=15 order=0.2 tdelay=.6 domain=time > j2.H;echo o1=-.6 >> j2.H
	<j2.H Transf f_min=0 f_min1=4 f_max1=30 f_max=34 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs > j2.H
	Math file1=j2.H exp="file1*0">j1.H;Math file1=j2.H exp="file1*-1">j3.H;Cmplx j3.H j1.H| Transp plane=13 > planesh.csou.H
	Spike n1=401 o1=0 d1=5 n2=601 o2=-3000 d2=10 n3=1 o3=0 d3=1 nsp=1 k1=1 | Pad beg2=700 end2=700 > j.H
	Math file1=j.H exp="file1*0+1" | Tpow tpow=1 > j1.H
	Math file1=j1.H exp="file1+2000" > vel.H 
	Math file1=vel.H exp="file1*0+0.2" | Mute vmute=0 tramp=0 tmute=500 > j.H
	Math file1=j.H exp="file1+1" |Transp plane=23 > reflect.H
	${Prst_ExpRefl}/ShtPSPI/bin/OWmod2d_par.x sou=planesh.csou.H vel=vel.H nrefvel=1 vsal=4000 \
	vreflect=reflect.H shots=s.H extrapolator=pspi \
	traces_in_taper=50 padtraces=150 xmin=-9000 xmax=9000 \
	nrec=101 orec=-500 drec=10 nsht=1 osht=-2000 dsht=40 zmin=0 zmax=600 node=14 > /dev/null
	Cat axis=4 s.H s.H s.H s.H s.H s.H s.H s.H s.H s.H s.H s.H s.H s.H s.H s.H s.H s.H s.H s.H s.H s.H s.H s.H s.H > s1.H
	Cat axis=4 s1.H s1.H s1.H s1.H s.H > planesh.crec.H

plane.bulk.dslo:
	Spike n1=401 o1=0 d1=5 n2=601 o2=-3000 d2=10 n3=1 o3=0 d3=1 nsp=1 k1=1 | Pad beg2=700 end2=700 > j.H
	Math file1=j.H exp="file1*0+1" | Tpow tpow=1 > j1.H
	Math file1=j1.H exp="file1+2000" | Transp plane=12 reshape=1,3 > vel.H 
	Scale dscale=0.9 < vel.H | Gpow gpow=-1 > slow.H
	Math file1=vel.H file2=slow.H exp=1/file1-file2 > plane.dslo.H
#
	${Prst_ExpRefl}/Tese/src/areal/wemvaop/OWmig2d_areal.x sou=planesh.csou.H rec=planesh.crec.H \
	vel=slow.H bkgimg=plane.bslo.resamp.H \
	zmin=0 zmax=1400 nh=81 oh=-400 migration=1 areal=0 \
	padtraces=100 traces_in_taper=25 node=14 extrapolator=pspi nrefvel=1 vsal=4000
#
	${Prst_ExpRefl}/Tese/src/areal/wemvaop/OWwemva_opers.x sou=planesh.csou.H rec=planesh.crec.H vel=slow.H deltaS=plane.dslo.H \
	zmin=0 zmax=1400 nh=81 oh=-400 jh=1 adj=0 areal=0 extrapolator=pspi nrefvel=1 vsal=6000 \
	padtraces=100 traces_in_taper=25 node=14 > plane.dimg.H
	${Prst_ExpRefl}/Tese/src/areal/wemvaop/OWwemva_opers.x sou=planesh.csou.H rec=planesh.crec.H vel=slow.H deltaI=plane.dimg.H \
	zmin=0 zmax=1400 nh=81 oh=-400 jh=1 adj=1 areal=0 extrapolator=pspi nrefvel=1 vsal=6000 \
	padtraces=100 traces_in_taper=25 node=14 > plane.dslo.adj.H
#
	< plane.bslo.resamp.H ${Prst_ExpRefl}/Tese/src/areal/wemvaop/OW_dso.x mdso=0 > plane.dso.H
	${Prst_ExpRefl}/Tese/src/areal/wemvaop/OWwemva_opers.x sou=planesh.csou.H rec=planesh.crec.H vel=slow.H deltaI=plane.dso.H \
	zmin=0 zmax=1400 nh=81 oh=-400 jh=1 adj=1 areal=0 extrapolator=pspi nrefvel=1 vsal=6000 \
	padtraces=100 traces_in_taper=25 node=14 > plane.dslo.dso.H
#
	< plane.bslo.resamp.H ${Prst_ExpRefl}/Tese/src/areal/wemvaop/OW_dso.x mdso=1 > plane.mdso.H
	${Prst_ExpRefl}/Tese/src/areal/wemvaop/OWwemva_opers.x sou=planesh.csou.H rec=planesh.crec.H vel=slow.H deltaI=plane.mdso.H \
	zmin=0 zmax=1400 nh=81 oh=-400 jh=1 adj=1 areal=0 extrapolator=pspi nrefvel=1 vsal=6000 \
	padtraces=100 traces_in_taper=25 node=14 > plane.dslo.mdso.H
#
	< plane.bslo.resamp.H ${Prst_ExpRefl}/Tese/src/areal/wemvaop/OW_dso.x mdso=2 > plane.mdsodso.H
	${Prst_ExpRefl}/Tese/src/areal/wemvaop/OWwemva_opers.x sou=planesh.csou.H rec=planesh.crec.H vel=slow.H deltaI=plane.mdsodso.H \
	zmin=0 zmax=1400 nh=81 oh=-400 jh=1 adj=1 areal=0 extrapolator=pspi nrefvel=1 vsal=6000 \
	padtraces=100 traces_in_taper=25 node=14 > plane.dslo.mdsodso.H

plane.bulk.dslo.dso.w%:
	< plane.bslo.resamp.H Window3d min2=-$* n2=21 | ${Prst_ExpRefl}/Tese/src/areal/wemvaop/OW_dso.x mdso=0 > plane.dso.w$*.H
	${Prst_ExpRefl}/Tese/src/areal/wemvaop/OWwemva_opers.x sou=planesh.csou.H rec=planesh.crec.H vel=slow.H deltaI=plane.dso.w$*.H \
	zmin=0 zmax=1400 nh=21 oh=-$* jh=1 adj=1 areal=0 extrapolator=pspi nrefvel=1 vsal=6000 \
	padtraces=100 traces_in_taper=25 node=14 > plane.dslo.dsow$*.H

##########################################################################################################
planect.crec:
	Wavelet n1=751 d1=0.004 wavelet=ricker2 phase=0 fund=20 order=0.2 tdelay=1.5 domain=time > j2.H;echo o1=-1.5 >> j2.H
	<j2.H Transf f_min=0 f_min1=4 f_max1=40 f_max=44 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs > j2.H
	Math file1=j2.H exp="file1*0">j1.H;Math file1=j2.H exp="file1*-1">j3.H;Cmplx j3.H j1.H| Transp plane=13 > planect.csou.H
	Spike n1=401 o1=0 d1=5 n2=601 o2=-3000 d2=10 n3=1 o3=0 d3=1 nsp=1 k1=1 | Pad beg2=700 end2=700 > j.H
	Math file1=j.H exp="file1*0+2500" > vel.H 
	Math file1=vel.H exp="file1*0+0.2" | Mute vmute=0 tramp=0 tmute=1000 > j.H
	Math file1=j.H exp="file1+1" |Transp plane=23 > reflect.H
	${Prst_ExpRefl}/ShtPSPI/bin/OWmod2d_par.x sou=planect.csou.H vel=vel.H nrefvel=1 vsal=4000 \
	vreflect=reflect.H shots=s.H extrapolator=pspi \
	traces_in_taper=100 padtraces=50 xmin=-9000 xmax=9000 \
	nrec=601 orec=-3000 drec=10 nsht=1 osht=-2000 dsht=40 zmin=0 zmax=1100 node=14 > /dev/null
	Cat axis=4 s.H s.H s.H s.H s.H s.H s.H s.H s.H s.H s.H s.H s.H s.H s.H s.H s.H s.H s.H s.H s.H s.H s.H s.H s.H > s1.H
	Cat axis=4 s1.H s1.H s1.H s1.H s.H > planect.crec.H

planect.bulk.dslo%:
	Spike n1=401 o1=0 d1=5 n2=601 o2=-3000 d2=10 n3=1 o3=0 d3=1 nsp=1 k1=1 | Pad beg2=700 end2=700 > j.H
	Math file1=j.H exp="file1*0+2500" | Transp plane=12 reshape=1,3 > vel.H 
	Scale dscale=$* < vel.H | Gpow gpow=-1 > slow.H
	Math file1=vel.H file2=slow.H exp="1/file1-file2" > planect.dslo.$*.H

	echo o6=0 >> planect.crec.H
	echo o6=0 >> planect.csou.H
	${Prst_ExpRefl}/Tese/src/areal/wemvaop/OWmig2d_areal.x sou=planect.csou.H rec=planect.crec.H \
	vel=slow.H bkgimg=planect.bimg.$*.H zmin=0 zmax=1600 nh=81 oh=-400 migration=1 areal=0 \
	padtraces=100 traces_in_taper=25 node=14 extrapolator=pspi nrefvel=1 vsal=4000
#
	${Prst_ExpRefl}/Tese/src/areal/wemvaop/OWwemva_opers.x sou=planect.csou.H rec=planect.crec.H vel=slow.H \
	deltaS=planect.dslo.$*.H zmin=0 zmax=1600 nh=81 oh=-400 jh=1 adj=0 areal=0 extrapolator=pspi nrefvel=1 vsal=6000 \
	padtraces=100 traces_in_taper=25 node=14 > planect.dimg.$*.H
	${Prst_ExpRefl}/Tese/src/areal/wemvaop/OWwemva_opers.x sou=planect.csou.H rec=planect.crec.H vel=slow.H \
	deltaI=planect.dimg.$*.H zmin=0 zmax=1600 nh=81 oh=-400 jh=1 adj=1 areal=0 extrapolator=pspi nrefvel=1 vsal=6000 \
	padtraces=100 traces_in_taper=25 node=14 > planect.dslo.adj.$*.H
#
	< planect.bimg.$*.H ${Prst_ExpRefl}/Tese/src/areal/wemvaop/OW_dso.x mdso=0 > planect.dso.$*.H
	${Prst_ExpRefl}/Tese/src/areal/wemvaop/OWwemva_opers.x sou=planect.csou.H rec=planect.crec.H vel=slow.H \
	deltaI=planect.dso.$*.H zmin=0 zmax=1600 nh=81 oh=-400 jh=1 adj=1 areal=0 extrapolator=pspi nrefvel=1 vsal=6000 \
	padtraces=100 traces_in_taper=25 node=14 > planect.dslo.dso.$*.H
#
	< planect.bimg.$*.H ${Prst_ExpRefl}/Tese/src/areal/wemvaop/OW_dso.x mdso=1 > planect.mdso.$*.H
	${Prst_ExpRefl}/Tese/src/areal/wemvaop/OWwemva_opers.x sou=planect.csou.H rec=planect.crec.H vel=slow.H \
	deltaI=planect.mdso.$*.H zmin=0 zmax=1600 nh=81 oh=-400 jh=1 adj=1 areal=0 extrapolator=pspi nrefvel=1 vsal=6000 \
	padtraces=100 traces_in_taper=25 node=14 > planect.dslo.mdso.$*.H
#
	< planect.bimg.$*.H ${Prst_ExpRefl}/Tese/src/areal/wemvaop/OW_dso.x mdso=2 > planect.mdsodso.$*.H
	${Prst_ExpRefl}/Tese/src/areal/wemvaop/OWwemva_opers.x sou=planect.csou.H rec=planect.crec.H vel=slow.H \
	deltaI=planect.mdsodso.$*.H zmin=0 zmax=1600 nh=81 oh=-400 jh=1 adj=1 areal=0 extrapolator=pspi nrefvel=1 vsal=6000 \
	padtraces=100 traces_in_taper=25 node=14 > planect.dslo.mdsodso.$*.H

planect.1shot.dslo%:
	Spike n1=401 o1=0 d1=5 n2=601 o2=-3000 d2=10 n3=1 o3=0 d3=1 nsp=1 k1=1 | Pad beg2=700 end2=700 > j.H
	Math file1=j.H exp="file1*0+2500" | Transp plane=12 reshape=1,3 > vel.H 
	Scale dscale=$* < vel.H | Gpow gpow=-1 > slow.H
	Math file1=vel.H file2=slow.H exp="1/file1-file2" > planect.dslo.$*.H

	echo o6=0 >> planect.crec.H
	echo o6=0 >> planect.csou.H
	Window3d squeeze=n min4=0 n4=1 min1=-3000 n1=1 <planect.crec.H|Pad beg1=100 end1=700 squeeze=n >rr1.H
	${Prst_ExpRefl}/Tese/src/areal/wemvaop/OWmig2d_areal.x sou=planect.csou.H rec=rr1.H planect.crec.H \
	vel=slow.H bkgimg=planect.bimg.1shot.$*.H zmin=0 zmax=1600 nh=41 oh=-200 migration=1 areal=0 \
	padtraces=25 traces_in_taper=100 node=14 extrapolator=pspi nrefvel=1 vsal=4000
#
	${Prst_ExpRefl}/Tese/src/areal/wemvaop/OWwemva_opers.x sou=planect.csou.H rec=rr1.H planect.crec.H vel=slow.H \
	deltaS=planect.dslo.$*.H zmin=0 zmax=1600 nh=41 oh=-200 jh=1 adj=0 areal=0 extrapolator=pspi nrefvel=1 vsal=6000 \
	padtraces=25 traces_in_taper=100 node=14 > planect.dimg.1shot.$*.H
	${Prst_ExpRefl}/Tese/src/areal/wemvaop/OWwemva_opers.x sou=planect.csou.H rec=rr1.H planect.crec.H vel=slow.H \
	deltaI=planect.dimg.1shot.$*.H zmin=0 zmax=1600 nh=41 oh=-200 jh=1 adj=1 areal=0 extrapolator=pspi nrefvel=1 vsal=6000 \
	padtraces=25 traces_in_taper=100 node=14 > planect.dslo.adj.1shot.$*.H
#
	< planect.bimg.1shot.$*.H ${Prst_ExpRefl}/Tese/src/areal/wemvaop/OW_dso.x mdso=0 > planect.dso.1shot.$*.H
	${Prst_ExpRefl}/Tese/src/areal/wemvaop/OWwemva_opers.x sou=planect.csou.H rec=rr1.H planect.crec.H vel=slow.H \
	deltaI=planect.dso.1shot.$*.H zmin=0 zmax=1600 nh=41 oh=-200 jh=1 adj=1 areal=0 extrapolator=pspi nrefvel=1 vsal=6000 \
	padtraces=25 traces_in_taper=100 node=14 > planect.dslo.dso.1shot.$*.H
#
	< planect.bimg.1shot.$*.H ${Prst_ExpRefl}/Tese/src/areal/wemvaop/OW_dso.x mdso=1 > planect.mdso.1shot.$*.H
	${Prst_ExpRefl}/Tese/src/areal/wemvaop/OWwemva_opers.x sou=planect.csou.H rec=rr1.H planect.crec.H vel=slow.H \
	deltaI=planect.mdso.1shot.$*.H zmin=0 zmax=1600 nh=41 oh=-200 jh=1 adj=1 areal=0 extrapolator=pspi nrefvel=1 vsal=6000 \
	padtraces=25 traces_in_taper=100 node=14 > planect.dslo.mdso.1shot.$*.H
#
	< planect.bimg.1shot.$*.H ${Prst_ExpRefl}/Tese/src/areal/wemvaop/OW_dso.x mdso=2 > planect.mdsodso.1shot.$*.H
	${Prst_ExpRefl}/Tese/src/areal/wemvaop/OWwemva_opers.x sou=planect.csou.H rec=rr1.H planect.crec.H vel=slow.H \
	deltaI=planect.mdsodso.1shot.$*.H zmin=0 zmax=1600 nh=41 oh=-200 jh=1 adj=1 areal=0 extrapolator=pspi nrefvel=1 vsal=6000 \
	padtraces=25 traces_in_taper=100 node=14 > planect.dslo.mdsodso.1shot.$*.H


plane_perm.single:
	Spike n1=401 o1=0 d1=5 n2=601 o2=-3000 d2=10 n3=1 o3=0 d3=1 nsp=1 k1=1 | Pad beg2=700 end2=700 > j.H
	Math file1=j.H exp="file1*0+1000" > vel.H
	Scale dscale=0.9 < vel.H | Gpow gpow=-1 | Transp plane=12 reshape=1,3 > slow.H
	Window3d < plane.bslo.H n1=1 min1=0 squeeze=n | Pad beg1=600 end1=600 > s1.H
	${Prst_ExpRefl}/Tese/bin/OW_arealsht.x rec_cig=s1.H sou_cig=s1.H sou=csou.H vel=slow.H \
	rec_out=plane.crec.single.perm.H sou_out=plane.csou.single.perm.H extrapolator=pspi nrefvel=1 vsal=4000 \
	padtraces=25 traces_in_taper=50 encode=1 encz=1 eps=0 random=1 injection=1 nreal=1 ngap=1 zmin=0 zmax=1400 node=14 \
	> /dev/null 

plane11_perm.single:
	Spike n1=401 o1=0 d1=5 n2=601 o2=-3000 d2=10 n3=1 o3=0 d3=1 nsp=1 k1=1 | Pad beg2=700 end2=700 > j.H
	Math file1=j.H exp="file1*0+1000" > vel.H
	Scale dscale=0.9 < vel.H | Gpow gpow=-1 | Transp plane=12 reshape=1,3 > slow.H
	Window3d < plane.bslo.H min1=-2000 max1=2010 squeeze=n > s1.H
	${Prst_ExpRefl}/Tese/bin/OW_arealsht.x rec_cig=s1.H sou_cig=s1.H sou=csou.H vel=slow.H \
	rec_out=plane11.crec.single.perm.H sou_out=plane11.csou.single.perm.H extrapolator=pspi nrefvel=1 vsal=4000 \
	padtraces=25 traces_in_taper=50 encode=1 encz=1 eps=0 random=1 injection=1 nreal=1 ngap=10 zmin=0 zmax=1400 node=14 \
	> /dev/null 

plane_mig.perm.single:
	echo o6=0 n5=1 >> plane.crec.single.perm.H
	echo o6=0 n5=1 >> plane.csou.single.perm.H
	Scale dscale=0.9 < vel.H | Gpow gpow=-1 | Transp plane=12 reshape=1,3 > slow.H
	${Prst_ExpRefl}/Tese/bin/OWmig2d_areal.x sou=plane.csou.single.perm.H rec=plane.crec.single.perm.H \
	vel=slow.H bkgimg=plane.bslo.single.perm.H \
	zmin=0 zmax=1400 nh=81 oh=-400 migration=1 areal=1 \
	padtraces=25 traces_in_taper=50 node=14 extrapolator=ffd

plane.perm.163:
	Wavelet n1=1001 d1=0.004 wavelet=ricker2 phase=0 fund=15 order=0.2 tdelay=2 domain=time > j2.H;echo o1=-2 >> j2.H
	<j2.H Transf f_min=0 f_min1=4 f_max1=30 f_max=34 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs > j2.H
	Math file1=j2.H exp="file1*0">j1.H;Math file1=j2.H exp="file1*-1">j3.H;Cmplx j3.H j1.H| Transp plane=13 > csou.H
	Spike n1=401 o1=0 d1=5 n2=601 o2=-3000 d2=10 n3=1 o3=0 d3=1 nsp=1 k1=1 | Pad beg2=700 end2=700 > j.H
	Math file1=j.H exp="file1*0+1000" > vel.H
	Scale dscale=0.9 < vel.H | Gpow gpow=-1 | Transp plane=12 reshape=1,3 > slow.H
	Window3d < plane.bslo.H n1=163 min1=-810 squeeze=n | Pad beg1=519 end1=519 > s1.H
	${Prst_ExpRefl}/Tese/bin/OW_arealsht.x rec_cig=s1.H sou_cig=s1.H sou=csou.H vel=slow.H \
	rec_out=plane.crec.perm.163.H sou_out=plane.csou.perm.163.H extrapolator=pspi nrefvel=1 vsal=4000 \
	padtraces=25 traces_in_taper=50 encode=1 encz=1 eps=0 random=1 injection=1 nreal=1 ngap=163 zmin=0 zmax=1400 node=14 \
	> /dev/null 

plane_mig.perm.163:
	echo o6=0 n5=1 >> plane.crec.perm.163.H
	echo o6=0 n5=1 >> plane.csou.perm.163.H
	Scale dscale=0.9 < vel.H | Gpow gpow=-1 | Transp plane=12 reshape=1,3 > slow.H
	${Prst_ExpRefl}/Tese/bin/OWmig2d_areal.x sou=plane.csou.perm.163.H rec=plane.crec.perm.163.H \
	vel=slow.H bkgimg=plane.bslo.perm.163.H \
	zmin=0 zmax=1400 nh=81 oh=-400 migration=1 areal=1 \
	padtraces=25 traces_in_taper=50 node=14 extrapolator=ffd

plane_mig.perm.163.vtrue:
	echo o6=0 n5=1 >> plane.crec.perm.163.H
	echo o6=0 n5=1 >> plane.csou.perm.163.H
	< vel.H Gpow gpow=-1 | Transp plane=12 reshape=1,3 > tslow.H
	${Prst_ExpRefl}/Tese/bin/OWmig2d_areal.x sou=plane.csou.perm.163.H rec=plane.crec.perm.163.H \
	vel=tslow.H bkgimg=plane.tslo.perm.163.H \
	zmin=0 zmax=1400 nh=81 oh=-400 migration=1 areal=1 \
	padtraces=25 traces_in_taper=50 node=14 extrapolator=ffd

plane.perm.single%:
	Scale dscale=0.9 < vel.H | Gpow gpow=-1 | Transp plane=12 reshape=1,3 > slow.H
	${Prst_ExpRefl}/Tese/bin/OW_arealsht.x rec_cig=plane.bslo.H sou_cig=plane.bslo.H sou=csou.H vel=slow.H \
	rec_out=plane.crec.single.perm$*.H sou_out=plane.csou.single.perm$*.H extrapolator=pspi nrefvel=1 vsal=4000 \
	padtraces=25 traces_in_taper=50 encode=1 encz=1 eps=0 random=1 injection=1 nreal=1 ngap=$* zmin=0 zmax=1400 node=14 \
	> /dev/null 

plane.mig.perm.single%:
	echo o6=0 n5=1 >> plane.crec.single.perm$*.H
	echo o6=0 n5=1 >> plane.csou.single.perm$*.H
	Scale dscale=0.9 < vel.H | Gpow gpow=-1 | Transp plane=12 reshape=1,3 > slow.H
	${Prst_ExpRefl}/Tese/bin/OWmig2d_areal.x sou=plane.csou.single.perm$*.H rec=plane.crec.single.perm$*.H \
	vel=slow.H bkgimg=plane.bslo.single.perm$*.H \
	zmin=0 zmax=1400 nh=81 oh=-400 migration=1 areal=1 \
	padtraces=25 traces_in_taper=50 node=14 extrapolator=ffd

plane.ang:
	< plane.bslo.H Window3d min1=0 n1=1 | Transp | Pad beg2=100 end2=100 | OFF2ANG amax=40 eps=10 > j.H
	< j.H Window3d > plane.ang.H

plane_ang.perm:
	< plane.bslo.single.perm.H Window3d min1=0 n1=1 | Transp | Pad beg2=100 end2=100 | OFF2ANG amax=40 eps=10 > j.H
	< j.H Window3d > plane.ang.single.perm.H

plane.ang.perm%:
	< plane.bslo.perm.$*.H Window3d min1=0 n1=1 | Transp | Pad beg2=100 end2=100 | OFF2ANG amax=40 eps=10 > j.H
	< j.H Window3d > plane.ang.single.perm$*.H


#######################################
dip.crec:
	Wavelet n1=1001 d1=0.008 wavelet=ricker2 phase=0 fund=10 order=0.2 tdelay=4 domain=time > j2.H;echo o1=-4 >> j2.H
	<j2.H Transf f_min=0 f_min1=4 f_max1=20 f_max=24 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs > j2.H
	Math file1=j2.H exp="file1*0">j1.H;Math file1=j2.H exp="file1*-1">j3.H;Cmplx j3.H j1.H| Transp plane=13 > csou.H
	Spike n1=401 o1=0 d1=10 n2=601 o2=-3000 d2=10 n3=1 o3=0 d3=1 nsp=1 k1=1 | Pad beg2=700 end2=700 > j.H
	Math file1=j.H exp="file1*0+1000" > vel.H
	Vel n1=401 o1=0 d1=10 n2=601 o2=-3000 d2=10 n3=1 o3=0 d3=1 vc=1000 z1=50 alfa1=20 vr1=1200 const1=1 z2=2500 alfa2=0 vr2=1400 const2=1 | \
	Pad beg2=700 end2=700 extend=1 | Transp plane=23 > dip_reflect.H
	${Prst_ExpRefl}/ShtPSPI/bin/OWmod2d_par.x sou=csou.H vel=vel.H nrefvel=1 vsal=4000 \
	vreflect=dip_reflect.H shots=dip.crec.H extrapolator=pspi \
	traces_in_taper=50 padtraces=250 xmin=-10000 xmax=10000 \
	nrec=151 orec=-750 drec=10 nsht=801 osht=-4000 dsht=10 zmin=0 zmax=2700 node=14 > /dev/null

dip.mig:
	echo o6=0 >> dip.crec.H
	Scale dscale=0.9 < vel.H | Gpow gpow=-1 | Transp plane=12 reshape=1,3 > slow.H
	${Prst_ExpRefl}/Tese/bin/OWmig2d_areal.x sou=csou.H rec=dip.crec.H \
	vel=slow.H bkgimg=dip.bslo.H \
	zmin=0 zmax=2700 nh=81 oh=-400 migration=1 areal=0 \
	padtraces=100 traces_in_taper=25 node=14 extrapolator=pspi nrefvel=1 vsal=4000

dip_perm.single:
	Scale dscale=0.9 < vel.H | Gpow gpow=-1 | Transp plane=12 reshape=1,3 > slow.H
	Window3d < dip.bslo.H n1=1 min1=0 squeeze=n | Pad beg1=600 end1=600> j0.H
	< j0.H Transp plane=13 | Mute vmute=0 tmute=2010 tramp=200 | Transp plane=13 > j1.H
	Math file1=j0.H file2=j1.H exp=file1-file2 > j2.H
	${Prst_ExpRefl}/Tese/bin/OW_arealsht.x rec_cig=j1.H sou_cig=j1.H sou=csou.H vel=slow.H \
	rec_out=j0r.single.perm.H sou_out=j0s.single.perm.H extrapolator=pspi nrefvel=1 vsal=4000 \
	padtraces=25 traces_in_taper=50 encode=1 encz=1 eps=0 random=1 injection=1 nreal=1 ngap=1 zmin=0 zmax=2700 node=14 \
	> /dev/null 
	${Prst_ExpRefl}/Tese/bin/OW_arealsht.x rec_cig=j2.H sou_cig=j2.H sou=csou.H vel=slow.H \
	rec_out=j2r.single.perm.H sou_out=j2s.single.perm.H extrapolator=pspi nrefvel=1 vsal=4000 \
	padtraces=25 traces_in_taper=50 encode=1 encz=1 eps=0 random=1 injection=1 nreal=1 ngap=1 zmin=0 zmax=2700 node=14 \
	> /dev/null 
	Cat j0r.single.perm.H j2r.single.perm.H axis=4 > dip.crec.single.perm.H
	Cat j0s.single.perm.H j2s.single.perm.H axis=4 > dip.csou.single.perm.H

dip_mig.perm.single:
	echo o6=0 n5=1 >> dip.crec.single.perm.H
	echo o6=0 n5=1 >> dip.csou.single.perm.H
	Scale dscale=0.9 < vel.H | Gpow gpow=-1 | Transp plane=12 reshape=1,3 > slow.H
	${Prst_ExpRefl}/Tese/bin/OWmig2d_areal.x sou=dip.csou.single.perm.H rec=dip.crec.single.perm.H \
	vel=slow.H bkgimg=dip.bslo.single.perm.H \
	zmin=0 zmax=2700 nh=81 oh=-400 migration=1 areal=1 \
	padtraces=25 traces_in_taper=50 node=14 extrapolator=ffd

dip_mig.perm.single.vtrue:
	echo o6=0 n5=1 >> dip.crec.single.perm.H
	echo o6=0 n5=1 >> dip.csou.single.perm.H
	< vel.H Gpow gpow=-1 | Transp plane=12 reshape=1,3 > tslow.H
	${Prst_ExpRefl}/Tese/bin/OWmig2d_areal.x sou=dip.csou.single.perm.H rec=dip.crec.single.perm.H \
	vel=tslow.H bkgimg=dip.tslo.single.perm.H \
	zmin=0 zmax=2700 nh=81 oh=-400 migration=1 areal=1 \
	padtraces=25 traces_in_taper=50 node=14 extrapolator=ffd

dip.perm.163:
	Scale dscale=0.9 < vel.H | Gpow gpow=-1 | Transp plane=12 reshape=1,3 > slow.H
	Window3d < dip.bslo.H n1=163 min1=-810 squeeze=n | Pad beg1=250 end1=250 > j0.H
	< j0.H Transp plane=13 | Mute vmute=0 tmute=1600 tramp=400 | Transp plane=13 > j1.H
	Math file1=j0.H file2=j1.H exp=file1-file2 > j2.H
	${Prst_ExpRefl}/Tese/bin/OW_arealsht.x rec_cig=j1.H sou_cig=j1.H sou=csou.H vel=slow.H \
	rec_out=j0r.single.perm.H sou_out=j0s.single.perm.H extrapolator=pspi nrefvel=1 vsal=4000 \
	padtraces=0 traces_in_taper=25 encode=1 encz=1 eps=0 random=1 injection=1 nreal=1 ngap=163 zmin=0 zmax=2700 node=14 \
	> /dev/null 
	${Prst_ExpRefl}/Tese/bin/OW_arealsht.x rec_cig=j2.H sou_cig=j2.H sou=csou.H vel=slow.H \
	rec_out=j2r.single.perm.H sou_out=j2s.single.perm.H extrapolator=pspi nrefvel=1 vsal=4000 \
	padtraces=0 traces_in_taper=25 encode=1 encz=1 eps=0 random=1 injection=1 nreal=1 ngap=163 zmin=0 zmax=2700 node=14 \
	> /dev/null 
	Cat j0r.single.perm.H j2r.single.perm.H axis=4 > dip.crec.perm.163.H
	Cat j0s.single.perm.H j2s.single.perm.H axis=4 > dip.csou.perm.163.H

dip_mig.perm.163:
	echo o6=0 n5=1 >> dip.crec.perm.163.H
	echo o6=0 n5=1 >> dip.csou.perm.163.H
	Scale dscale=0.9 < vel.H | Gpow gpow=-1 | Transp plane=12 reshape=1,3 > slow.H
	${Prst_ExpRefl}/Tese/bin/OWmig2d_areal.x sou=dip.csou.perm.163.H rec=dip.crec.perm.163.H \
	vel=slow.H bkgimg=dip.bslo.perm.163.H \
	zmin=0 zmax=2700 nh=81 oh=-400 migration=1 areal=1 \
	padtraces=25 traces_in_taper=50 node=14 extrapolator=ffd

dip_mig.perm.163.vtrue:
	echo o6=0 n5=1 >> dip.crec.perm.163.H
	echo o6=0 n5=1 >> dip.csou.perm.163.H
	< vel.H Gpow gpow=-1 | Transp plane=12 reshape=1,3 > tslow.H
	${Prst_ExpRefl}/Tese/bin/OWmig2d_areal.x sou=dip.csou.perm.163.H rec=dip.crec.perm.163.H \
	vel=tslow.H bkgimg=dip.tslo.perm.163.H \
	zmin=0 zmax=2700 nh=81 oh=-400 migration=1 areal=1 \
	padtraces=25 traces_in_taper=50 node=14 extrapolator=ffd

dip.perm.single.rot:
	Spike n1=401 o1=0 d1=10 n2=601 o2=-3000 d2=10 n3=1 o3=0 d3=1 nsp=1 k1=1 | Pad beg2=700 end2=700 > j.H
	Math file1=j.H exp="file1*0+1000" > vel.H
	Scale dscale=0.9 < vel.H | Gpow gpow=-1 | Transp plane=12 reshape=1,3 > slow.H
#	< dip.bslo.H Window3d min1=-1000 max1=1010 | Transp plane=13 | ${Prst_ExpRefl}/Tese/bin/OW_3dslant.x nax=61 nah=81 oax=-30 oah=-40 dax=1 dah=1 nxw=41 rot=1 upshft=0 nodes=14 nxchunk=1 > j2.sou.H
#	< j2.sou.H Reverse which=2 opt=ignore > j2.rec.H
	< j2.sou.H Transp plane=13 | Window3d n1=1 min1=0 squeeze=n | Pad beg1=250 end1=250 > j0s.H
	< j0s.H Transp plane=13 | Mute vmute=0 tmute=1700 tramp=100 | Transp plane=13 > j1s.H
	Math file1=j0s.H file2=j1s.H exp=file1-file2 > j2s.H
	< j2.rec.H Transp plane=13 | Window3d n1=1 min1=0 squeeze=n | Pad beg1=250 end1=250 > j0r.H
	< j0r.H Transp plane=13 | Mute vmute=0 tmute=1700 tramp=100 | Transp plane=13 > j1r.H
	Math file1=j0r.H file2=j1r.H exp=file1-file2 > j2r.H
#
	${Prst_ExpRefl}/Tese/bin/OW_arealsht.x rec_cig=j1r.H sou_cig=j1s.H sou=csou.H vel=slow.H \
	rec_out=j0r.single.perm.rot.H sou_out=j0s.single.perm.rot.H extrapolator=pspi nrefvel=1 vsal=4000 lloyd=0 \
	padtraces=0 traces_in_taper=25 encode=1 encz=1 eps=0 random=1 injection=1 nreal=1 ngap=1 zmin=0 zmax=2700 node=14 > /dev/null 
#
	${Prst_ExpRefl}/Tese/bin/OW_arealsht.x rec_cig=j2r.H sou_cig=j2s.H sou=csou.H vel=slow.H \
	rec_out=j2r.single.perm.rot.H sou_out=j2s.single.perm.rot.H extrapolator=pspi nrefvel=1 vsal=4000 lloyd=0 \
	padtraces=0 traces_in_taper=25 encode=1 encz=1 eps=0 random=1 injection=1 nreal=1 ngap=1 zmin=0 zmax=2700 node=14 \
	> /dev/null 
	Cat j0r.single.perm.rot.H j2r.single.perm.rot.H axis=4 > dip.crec.single.perm.rot.H
	Cat j0s.single.perm.rot.H j2s.single.perm.rot.H axis=4 > dip.csou.single.perm.rot.H

dip_mig.single.perm.vtrue.rot:
	echo o6=0 n5=1 >> dip.crec.single.perm.rot.H
	echo o6=0 n5=1 >> dip.csou.single.perm.rot.H
	< vel.H Gpow gpow=-1 | Transp plane=12 reshape=1,3 > tslow.H
	${Prst_ExpRefl}/Tese/bin/OWmig2d_areal.x sou=dip.csou.single.perm.rot.H rec=dip.crec.single.perm.rot.H \
	vel=tslow.H bkgimg=dip.tslo.single.perm.rot.H \
	zmin=0 zmax=2700 nh=81 oh=-400 migration=1 areal=1 \
	padtraces=25 traces_in_taper=50 node=14 extrapolator=ffd

dip.perm.163.rot:
	< j2.sou.H Transp plane=13 | Window3d n1=163 min1=-810 squeeze=n | Pad beg1=250 end1=250 > j0s.H
	< j0s.H Transp plane=13 | Mute vmute=0 tmute=1700 tramp=100 | Transp plane=13 > j1s.H
	Math file1=j0s.H file2=j1s.H exp=file1-file2 > j2s.H
	< j2.rec.H Transp plane=13 | Window3d n1=163 min1=-810 squeeze=n | Pad beg1=250 end1=250 > j0r.H
	< j0r.H Transp plane=13 | Mute vmute=0 tmute=1700 tramp=100 | Transp plane=13 > j1r.H
	Math file1=j0r.H file2=j1r.H exp=file1-file2 > j2r.H
#
	${Prst_ExpRefl}/Tese/bin/OW_arealsht.x rec_cig=j1r.H sou_cig=j1s.H sou=csou.H vel=slow.H \
	rec_out=j0r.perm.163.rot.H sou_out=j0s.perm.163.rot.H extrapolator=pspi nrefvel=1 vsal=4000 lloyd=0 \
	padtraces=0 traces_in_taper=25 encode=1 encz=1 eps=0 random=1 injection=1 nreal=1 ngap=163 zmin=0 zmax=2700 \
	node=14 > /dev/null 
#
	${Prst_ExpRefl}/Tese/bin/OW_arealsht.x rec_cig=j2r.H sou_cig=j2s.H sou=csou.H vel=slow.H \
	rec_out=j2r.perm.163.rot.H sou_out=j2s.perm.163.rot.H extrapolator=pspi nrefvel=1 vsal=4000 lloyd=0 \
	padtraces=0 traces_in_taper=25 encode=1 encz=1 eps=0 random=1 injection=1 nreal=1 ngap=163 zmin=0 zmax=2700 \
	node=14 > /dev/null 
	Cat j0r.perm.163.rot.H j2r.perm.163.rot.H axis=4 > dip.crec.perm.163.rot.H
	Cat j0s.perm.163.rot.H j2s.perm.163.rot.H axis=4 > dip.csou.perm.163.rot.H

dip_mig.perm.163.vtrue.rot:
	echo o6=0 n5=1 >> dip.crec.perm.163.rot.H
	echo o6=0 n5=1 >> dip.csou.perm.163.rot.H
	< vel.H Gpow gpow=-1 | Transp plane=12 reshape=1,3 > tslow.H
	${Prst_ExpRefl}/Tese/bin/OWmig2d_areal.x sou=dip.csou.perm.163.rot.H rec=dip.crec.perm.163.rot.H \
	vel=tslow.H bkgimg=dip.tslo.perm.163.rot.H \
	zmin=0 zmax=2700 nh=81 oh=-400 migration=1 areal=1 \
	padtraces=25 traces_in_taper=50 node=14 extrapolator=ffd

dip.perm.single%:
	Scale dscale=0.9 < vel.H | Gpow gpow=-1 | Transp plane=12 reshape=1,3 > slow.H
	${Prst_ExpRefl}/Tese/bin/OW_arealsht.x rec_cig=dip.bslo.H sou_cig=dip.bslo.H sou=csou.H vel=slow.H \
	rec_out=dip.crec.single.perm$*.H sou_out=dip.csou.single.perm$*.H extrapolator=pspi nrefvel=1 vsal=4000 \
	padtraces=25 traces_in_taper=50 encode=1 encz=1 eps=0 random=1 injection=1 nreal=1 ngap=$* zmin=0 zmax=1400 node=14 \
	> /dev/null 

dip.mig.perm.single%:
	echo o6=0 n5=1 >> dip.crec.single.perm$*.H
	echo o6=0 n5=1 >> dip.csou.single.perm$*.H
	Scale dscale=0.9 < vel.H | Gpow gpow=-1 | Transp plane=12 reshape=1,3 > slow.H
	${Prst_ExpRefl}/Tese/bin/OWmig2d_areal.x sou=dip.csou.single.perm$*.H rec=dip.crec.single.perm$*.H \
	vel=slow.H bkgimg=dip.bslo.single.perm$*.H \
	zmin=0 zmax=1400 nh=81 oh=-400 migration=1 areal=1 \
	padtraces=25 traces_in_taper=50 node=14 extrapolator=ffd
##########################
#
# Combination of modeling experiments
RotK=/net/koko/claudio/Research/Others/Biondo/rotation/v3/RotCig_v3.x

rot.xhzspace:
	< dip.bslo.H Window3d min1=-4000 max1=4010|Transp plane=13| ${Prst_ExpRefl}/Tese/bin/OW_3dslant.x nax=41 oax=-10 dax=1 \
	nah=81 oah=-40 dah=1 nxw=41 rot=1 upshft=0 nodes=14 nxchunk=1 > rot.sou.H
	< rot.sou.H Reverse which=2 opt=ignore > rot.rec.H

rot.kspace:
	< dip.bslo.H Window3d min1=-4000 max1=4010 | Transp plane=12 reshape=2,3 > cig.H
	${RotK} Cig_hx=cig.H Cig_tilt=comb.sou.rot.H par=comb-rot.P positive_rot=0
	< comb.sou.rot.H Reverse which=4 opt=ignore > comb.rec.rot.H

comb.perm.%.rot:
#	Spike n1=401 o1=0 d1=10 n2=601 o2=-3000 d2=10 n3=1 o3=0 d3=1 nsp=1 k1=1 | Pad beg2=700 end2=700 > j.H
#	Math file1=j.H exp="file1*0+1000" > vel.H
#	Scale dscale=0.9 < vel.H | Gpow gpow=-1 | Transp plane=12 reshape=1,3 > slow.H
#	Wavelet n1=1001 d1=0.008 wavelet=ricker2 phase=0 fund=10 order=0.2 tdelay=4 domain=time > j2.H;echo o1=-4 >> j2.H
#	<j2.H Transf f_min=0 f_min1=4 f_max1=20 f_max=24 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs > j2.H
#	Math file1=j2.H exp="file1*0">j1.H;Math file1=j2.H exp="file1*-1">j3.H;Cmplx j3.H j1.H| Transp plane=13 > csou.H
##
#	< rot.sou.H Transp plane=13 > j0s.H
#	< j0s.H ${Prst_ExpRefl}/Tese/bin/OW_windowing.x wavz=16 dip=0 hor1=flat1 nhorz=1 taperon=0> j1s.H
#	Math file1=j0s.H file2=j1s.H exp=file1-file2 > j2s.H
#	< j1s.H Transp plane=13 | Mute vmute=0 tmute=2200 tramp=0 | Transp plane=13 > j0s.H
#	< rot.rec.H Transp plane=13 > j0r.H
#	< j0r.H ${Prst_ExpRefl}/Tese/bin/OW_windowing.x wavz=21 dip=0 hor1=flat1 nhorz=1 taperon=0 > j1r.H
#	Math file1=j0r.H file2=j1r.H exp=file1-file2 > j2r.H
#	< j1r.H Transp plane=13 | Mute vmute=0 tmute=2200 tramp=0 | Transp plane=13 > j0r.H
#
	${Prst_ExpRefl}/Tese/bin/OW_arealsht.x rec_cig=j0r.H sou_cig=j0s.H sou=csou.H vel=slow.H \
	rec_out=j0r.perm.$*.rot.H sou_out=j0s.perm.$*.rot.H extrapolator=pspi nrefvel=1 vsal=4000 lloyd=0 \
	padtraces=0 traces_in_taper=25 encode=1 encz=1 eps=0 random=1 injection=1 nreal=1 ngap=$* zmin=0 zmax=2700 \
	node=14 > /dev/null 
#
	${Prst_ExpRefl}/Tese/bin/OW_arealsht.x rec_cig=j2r.H sou_cig=j2s.H sou=csou.H vel=slow.H \
	rec_out=j2r.perm.$*.rot.H sou_out=j2s.perm.$*.rot.H extrapolator=pspi nrefvel=1 vsal=4000 lloyd=0 \
	padtraces=0 traces_in_taper=25 encode=1 encz=1 eps=0 random=1 injection=1 nreal=1 ngap=$* zmin=0 zmax=2700 \
	node=14 > /dev/null 
	Cat j0r.perm.$*.rot.H j2r.perm.$*.rot.H axis=4 > comb.crec.perm.$*.rot.H
	Cat j0s.perm.$*.rot.H j2s.perm.$*.rot.H axis=4 > comb.csou.perm.$*.rot.H

comb_mig.perm.%.vslow:
	echo o6=0 n5=1 >> comb.crec.perm.$*.rot.H
	echo o6=0 n5=1 >> comb.csou.perm.$*.rot.H
	${Prst_ExpRefl}/Tese/bin/OWmig2d_areal.x sou=comb.csou.perm.$*.rot.H rec=comb.crec.perm.$*.rot.H \
	vel=slow.H bkgimg=comb.bslo.perm.$*.rot.H \
	zmin=0 zmax=2700 nh=81 oh=-400 migration=1 areal=1 \
	padtraces=25 traces_in_taper=50 node=14 extrapolator=ffd

comb_green.perm.icwind%:
	echo o6=0 n5=2 n4=163 >> comb.crec.perm.163.rot.H
	echo o6=0 n5=2 n4=163 >> comb.csou.perm.163.rot.H
	Scale dscale=0.9 < vel.H | Gpow gpow=-1 | Transp plane=12 reshape=1,3 > slow.H
	< comb.csou.perm.163.rot.H Window3d n4=1 f4=81 squeeze=n | Transp plane=25|Stack3d|Transp plane=23 > s.H
	< comb.crec.perm.163.rot.H Window3d n4=1 f4=81 squeeze=n | Transp plane=25|Stack3d|Transp plane=23 > r.H
	${Prst_ExpRefl}/Tese/src/areal/wemvaop/OWmig2d_areal.x sou=s.H rec=r.H \
	vel=slow.H bkgimg=comb_mig.perm.icwind.$*.H \
	zmin=0 zmax=2700 nh=81 oh=-400 migration=1 areal=1 \
	padtraces=25 traces_in_taper=50 node=14 extrapolator=ffd icwind=1 deltat=$* dt=0.008 \
	green_S= green_S.H green_R= green_R.H 

green_SR.H:
	Math file1=green_S.H file2=green_R.H exp=file1+file2| Transf maxsize=1000 | Transp plane=13 > $@

comb_mig.perm.icwind%:
	echo o6=0 n5=2 n4=163 >> comb.crec.perm.163.rot.H
	echo o6=0 n5=2 n4=163 >> comb.csou.perm.163.rot.H
	Scale dscale=0.9 < vel.H | Gpow gpow=-1 | Transp plane=12 reshape=1,3 > slow.H
	< comb.csou.perm.163.rot.H Transp plane=25|Stack3d|Transp plane=23 reshape=1,3,4 > s.H
	< comb.crec.perm.163.rot.H Transp plane=25|Stack3d|Transp plane=23 reshape=1,3,4 > r.H
	${Prst_ExpRefl}/Tese/src/areal/wemvaop/OWmig2d_areal.x sou=s.H rec=r.H \
	vel=slow.H bkgimg=comb_migfull.perm.icwind.$*.H \
	zmin=0 zmax=2700 nh=81 oh=-400 migration=1 areal=1 \
	padtraces=25 traces_in_taper=50 node=14 extrapolator=ffd icwind=1 deltat=$* dt=0.008 \
	green_S= green_S.H green_R= green_R.H 

comb.mig:
	echo o6=0 >> dip.crec.H
	Scale dscale=0.98 < vel.H | Gpow gpow=-1 | Transp plane=12 reshape=1,3 > slow.H
	${Prst_ExpRefl}/Tese/src/areal/wemvaop/OWmig2d_areal.x sou=csou.H rec=dip.crec.H \
	vel=slow.H bkgimg=comb.bslo.98.H \
	zmin=0 zmax=2700 nh=81 oh=-400 migration=1 areal=0 \
	padtraces=100 traces_in_taper=25 node=14 extrapolator=pspi nrefvel=1 vsal=4000

#####################################
#
# Using bkim
#
usebkm%:
	Spike n1=401 o1=0 d1=5 n2=601 o2=-3000 d2=10 n3=1 o3=0 d3=1 nsp=1 k1=1 | Pad beg2=700 end2=700 > j.H
	Math file1=j.H exp="file1*0+2500" | Transp plane=12 reshape=1,3 > vel.H 
	Scale dscale=$* < vel.H | Gpow gpow=-1 > slow.H
	${Prst_ExpRefl}/Tese/src/areal/wemvaop/OWwemva_opers.x sou=planect.csou.H rec=planect.crec.H vel=slow.H \
	deltaI=planect.bimg.$*.H zmin=0 zmax=800 nh=81 oh=-400 jh=1 adj=1 areal=0 extrapolator=pspi nrefvel=1 vsal=6000 \
	padtraces=100 traces_in_taper=25 node=14 > planect.dslo.bkim.$*.H

