include Term09file
#############################
0011inv_tst_slow%.H: #
	< InvVel/9001areal_rec_encz_$*.H Window3d n4= n1= 32 squeeze=n | Transp plane=13 > 9001areal_rec_tempz$*.H
	< InvVel/9001areal_sou_encz_$*.H Window3d n4= n1= 32 squeeze=n | Transp plane=13 > 9001areal_sou_tempz$*.H
	Math file1=InvVel/9000vel2.H exp="file1*0+2.2" > 1.H
	< 9001areal_rec_tempz$*.H ../Tese/bin/OW_lbfgsc_areal.x sou=9001areal_sou_tempz$*.H \
	vel=1.H InvVel/9000vel2.H grad=0011inv_grad_slow$*.H \
	Dimage=0011inv_dso_slow$*.H bkgimg=0011inv_bkim_slow$*.H Velout=0011inv_vout_slow$*.H\
	xmin=-1.22 xmax=6.2 zmin=0 zmax=1.5 nh=17 oh=-.16 jh=1 wbott=0 niter=1 dso=1 inversion=1 \
	traces_in_taper=0 node=10 bounds=1 vmin=1.7 vmax=2.3 vsal=5 nrefvel=3 horv0= hor0.5 > /dev/null
	Rm 9001*tempz$*.H

0012inv_tst_slow.H: #
	< 44413areal_rec_enc0_velow1.H Window3d n1= 100 min1= 12 squeeze=n | Transp plane=13 > r1.H
	< 44413areal_sou_enc0_velow1.H Window3d n1= 100 min1= 12 squeeze=n | Transp plane=13 > s1.H
	Math file1=InvVel/9000vel2.H exp="file1*0+1.9" > 1.H
	< r1.H ../Tese/bin/OW_lbfgsc_areal.x sou=s1.H \
	vel=1.H InvVel/9000vel2.H grad=0012inv_grad_slow.H \
	Dimage=0012inv_dso_slow.H bkgimg=0012inv_bkim_slow.H Velout=0012inv_vout_slow.H\
	xmin=-1.22 xmax=5.2 zmin=0 zmax=0.8 nh=21 oh=-.2 jh=1 wbott=0 niter=1 dso=1 inversion=1 \
	traces_in_taper=0 node=16 bounds=1 vmin=1.7 vmax=2.3 vsal=5 nrefvel=3 horv0= hor0.5 > /dev/null

0012inv_tst_fast.H: #
	< 44413areal_rec_enc0_velow1.H Window3d n1= 100 min1= 12 squeeze=n | Transp plane=13 > r1.H
	< 44413areal_sou_enc0_velow1.H Window3d n1= 100 min1= 12 squeeze=n | Transp plane=13 > s1.H
	Math file1=InvVel/9000vel2.H exp="file1*0+2.2" > 1.H
	< r1.H ../Tese/bin/OW_lbfgsc_areal.x sou=s1.H \
	vel=1.H InvVel/9000vel2.H grad=0012inv_grad_fast.H \
	Dimage=0012inv_dso_fast.H bkgimg=0012inv_bkim_fast.H Velout=0012inv_vout_fast.H\
	xmin=-1.22 xmax=5.2 zmin=0 zmax=0.8 nh=21 oh=-.2 jh=1 wbott=0 niter=1 dso=1 inversion=1 \
	traces_in_taper=0 node=16 bounds=1 vmin=1.7 vmax=2.3 vsal=5 nrefvel=3 horv0= hor0.5 > /dev/null

0012migvlow:
	Math file1=InvVel/9000vel2.H exp="file1*0+2.7" > 1.H
	Spike n1=201 d1=0.008 o1=-0.8 nsp=1 k1=101 | Bandpass flo=4 fhi=40 \
	| Transf f_min=2 f_min1=6 f_max1=40 f_max=50 wei=y is2d=y | Transp plane=35 > 11111.H
	< 9000data_prep1.H Window3d j4=2 squeeze=n > 22222.H
	< 22222.H ../ShtPSPI/bin/OWmig2d_par.x sou=11111.H vel=1.H image=0012amig_vlow.H \
	vsal=5 nrefvel=1 xmin=-6. xmax=14. encode=0 zmin=0 zmax=1.5 node=15 \
	nh=41 oh=-.4 dh=.02 > /dev/null

0012migvhi:
	Math file1=InvVel/9000vel2.H exp="file1*0+3.3" > 1.H
	Spike n1=201 d1=0.008 o1=-0.8 nsp=1 k1=101 | Bandpass flo=4 fhi=40 \
	| Transf f_min=2 f_min1=6 f_max1=40 f_max=50 wei=y is2d=y | Transp plane=35 > 11111.H
	< 9000data_prep1.H ../ShtPSPI/bin/OWmig2d_par.x sou=11111.H vel=1.H image=0012amig_vhi.H \
	vsal=5 nrefvel=1 xmin=-6. xmax=14. encode=0 zmin=0 zmax=1. node=14 \
	nh=31 oh=-.3 dh=.02 > /dev/null

0012enc0: # correct velocity areal shot random encode in w
	Spike n1=201 d1=0.008 o1=-0.8 nsp=1 k1=101 | Bandpass flo=4 fhi=52 \
	| Transf f_min=2 f_min1=6 f_max1=56 f_max=66 wei=y is2d=y | Transp plane=35 > 1source.H
	Math file1=InvVel/9000vel2.H exp="file1*0+2.7" > 1.H
	< 0012amig_vlow.H Window3d min1=0 max1=8 max3=1.| Transp plane=13 > junk.H #|./bin/OW_hgain.x w=1. > junk.H
	./bin/OW_arealsht.x rec_cig=junk.H sou_cig=junk.H sou=1source.H \
	vel=1.H rec_out=0012areal_rec_enc0_velow.H sou_out=0012areal_sou_enc0_velow.H \
	ngap=32 nrefvel=1 eps=1 vsal=6 padtraces=81 encode=0 injection=1 node=16 nreal=1 > /dev/null 
#	Rm junkvel.H    

tst.H: # correct velocity areal shot random encode in w
	Window3d < 0012inv_vout_fastw_dso+zwght+smoo100100.H n4=1 f4=3 > v.H
	< 0012areal_rec_enc0_velow.H Transp plane=13 > temp1.H
	< 0012areal_sou_enc0_velow.H Transp plane=13 > temp2.H
	< temp1.H ~claudio/research.ln/Prst_ExpRefl/Tese/bin/OWmig2d_areal.x sou=temp2.H \
	vel=v.H vsal=8 nrefvel=3 nh=15 oh=-.14 jh=1 zmax=1 \
	traces_in_taper=0 every=0 encode=1 migration=1 make node=16 > $@ 
	Rm temp[1-2].H

0012encw: # correct velocity areal shot random encode in w
	Spike n1=401 d1=0.008 o1=-1.6 nsp=1 k1=201 | Bandpass flo=4 fhi=52 \
	| Transf f_min=2 f_min1=6 f_max1=56 f_max=66 wei=y is2d=y | Transp plane=35 > 1source.H
	Math file1=InvVel/9000vel2.H exp="file1*0+2.7" > 1.H
	< 0012amig_vlow.H Window3d min1=0 max1=8 max3=1.| Transp plane=13 > junk.H #|./bin/OW_hgain.x w=1. > junk.H
	./bin/OW_arealsht.x rec_cig=junk.H sou_cig=junk.H sou=1source.H \
	vel=1.H rec_out=0012areal_rec_encw_velow.H sou_out=0012areal_sou_encw_velow.H \
	ngap=5 nrefvel=1 eps=1 vsal=6 padtraces=81 encode=1 encw=1 random=1  injection=1 node=16 nreal=2 > /dev/null 

0012encw1: # correct velocity areal shot random encode in w
	Spike n1=201 d1=0.008 o1=-0.8 nsp=1 k1=101 | Bandpass flo=4 fhi=52 \
	| Transf f_min=2 f_min1=6 f_max1=56 f_max=66 wei=y is2d=y | Transp plane=35 > 1source.H
	Math file1=InvVel/9000vel2.H exp="file1*0+2.7" > 1.H
	< 0012amig_vlow.H Window3d min1=0 max1=8 max3=1.| Transp plane=13 > junk.H #|./bin/OW_hgain.x w=1. > junk.H
	./bin/OW_arealsht.x rec_cig=junk.H sou_cig=junk.H sou=1source.H \
	vel=1.H rec_out=0012areal_rec_encw_velow1.H sou_out=0012areal_sou_encw_velow1.H \
	ngap=5 nrefvel=1 eps=1 vsal=6 padtraces=81 encode=1 encw=1 random=1  injection=1 node=8 nreal=6 > /dev/null 

#	Spike n1=401 d1=0.008 o1=-1.6 nsp=1 k1=201 | Bandpass flo=4 fhi=52 \
#	| Transf f_min=2 f_min1=6 f_max1=56 f_max=66 wei=y is2d=y | Transp plane=35 > 1source.H

##########################
#
# Gradient by wemop
0012.Dslow.slowa.H:
	Math file1=InvVel/9000vel2.H exp="file1*0-0.3" > $@

0012.Dslow.fasta.H:
	Math file1=InvVel/9000vel2.H exp="file1*0+0.3" > $@

0012.Dimag.slowa.H:
	< 0012areal_rec_enc0_velow.H Transp plane=13 > r1.H
	< 0012areal_sou_enc0_velow.H Transp plane=13 > s1.H
	Math file1=InvVel/9000vel2.H exp="file1*0+2.7" > 1.H
	< r1.H ../Tese/bin/OWwemva_opers.x sou=s1.H \
	vel=1.H vsal=5 nrefvel=1 deltaS=0012.Dslow.slowa.H \
	xmin=0 xmax=9 zmin=0 zmax=1 nh=29 oh=-.28 jh=1 wbott=0 adj=0 \
	traces_in_taper=21 padtraces=21 encode=1 node=16 > $@ 

0012.Dslow1.slowa.H:
	< 0012areal_rec_enc0_velow.H Transp plane=13 > r1.H
	< 0012areal_sou_enc0_velow.H Transp plane=13 > s1.H
	Math file1=InvVel/9000vel2.H exp="file1*0+2.7" > 1.H
	< r1.H ../Tese/bin/OWwemva_opers.x sou=s1.H \
	vel=1.H vsal=5 nrefvel=1 deltaI=0012.Dimag.slowa.H \
	xmin=-1.06 xmax=10.06 zmin=0 zmax=1 nh=29 oh=-.28 jh=1 wbott=0 adj=1 \
	traces_in_taper=21 padtraces=21 encode=1 node=16 > $@ 
#
0012.Dimag.fasta.H:
	< 0012areal_rec_enc0_velow.H Transp plane=13 > 1.H;Math file1=1.H exp="file1/1000000000" > r1.H
	< 0012areal_sou_enc0_velow.H Transp plane=13 > 1.H;Math file1=1.H exp="file1/1000000000" > s1.H
	Math file1=InvVel/9000vel2.H exp="file1*0+3.3" > 1.H
	< r1.H ../Tese/bin/OWwemva_opers.x sou=s1.H \
	vel=1.H vsal=5 nrefvel=1 deltaS=0012.Dslow.fasta.H \
	xmin= 0 xmax= 9 zmin=0 zmax=1 nh=15 oh=-.14 jh=1 wbott=0 adj=0 \
	traces_in_taper=51 padtraces=51 encode=1 node=16 > $@ 

0012.Dslow1.fasta.H:
	< 0012areal_rec_enc0_velow.H Transp plane=13 > 1.H;Math file1=1.H exp="file1/1000000000" > r1.H
	< 0012areal_sou_enc0_velow.H Transp plane=13 > 1.H;Math file1=1.H exp="file1/1000000000" > s1.H
	Math file1=InvVel/9000vel2.H exp="file1*0+3.3" > 1.H
	< r1.H ../Tese/bin/OWwemva_opers.x sou=s1.H \
	vel=1.H vsal=5 nrefvel=1 deltaI=0012.Dimag.fasta.H \
	xmin= -1.06 xmax= 10.06 zmin=0 zmax=1 nh=15 oh=-.14 jh=1 wbott=0 adj=1 \
	traces_in_taper=51 padtraces=51 encode=1 node=16 > $@ 

0012.Dimag.fastt.H:
	< 0012areal_rec_enc0_velow.H Transp plane=13 > 1.H;Math file1=1.H exp="file1/1000000000" > r1.H
	< 0012areal_sou_enc0_velow.H Transp plane=13 > 1.H;Math file1=1.H exp="file1/1000000000" > s1.H
	Math file1=InvVel/9000vel2.H exp="file1*0+3.3" > 1.H
	< r1.H ../Tese/bin/OWwemva_opers.x sou=s1.H \
	vel=1.H vsal=5 nrefvel=1 deltaS=0012.Dslow.fasta.H \
	xmin= 0 xmax= 9 zmin=0 zmax=1 nh=15 oh=-.14 jh=1 wbott=0 adj=0 \
	traces_in_taper=51 padtraces=51 encode=1 node=16 > $@ 

0012.Dslow1.fastt.H:
	< 0012areal_rec_enc0_velow.H Transp plane=13 > 1.H;Math file1=1.H exp="file1/1000000000" > r1.H
	< 0012areal_sou_enc0_velow.H Transp plane=13 > 1.H;Math file1=1.H exp="file1/1000000000" > s1.H
	Math file1=InvVel/9000vel2.H exp="file1*0+3.3" > 1.H
	< r1.H ../Tese/bin/OWwemva_opers.x sou=s1.H \
	vel=1.H vsal=5 nrefvel=1 deltaI=0012.Dimag.fasta.H \
	xmin= -1.06 xmax= 10.06 zmin=0 zmax=1 nh=15 oh=-.14 jh=1 wbott=0 adj=1 \
	traces_in_taper=51 padtraces=51 encode=1 node=16 > $@ 

0012.Dimag.fastb.H:
	< 0012areal_rec_encw_velow.H Transp plane=13 > 1.H;Math file1=1.H exp="file1/1000000000" > r1.H
	< 0012areal_sou_encw_velow.H Transp plane=13 > 1.H;Math file1=1.H exp="file1/1000000000" > s1.H
	Math file1=InvVel/9000vel2.H exp="file1*0+3.3" > 1.H
	< r1.H ../Tese/bin/OWwemva_opers.x sou=s1.H \
	vel=1.H vsal=5 nrefvel=1 deltaS=0012.Dslow.fasta.H \
	xmin= 0 xmax= 9 zmin=0 zmax=1 nh=15 oh=-.14 jh=1 wbott=0 adj=0 \
	traces_in_taper=51 padtraces=51 encode=1 node=16 > $@ 

0012.Dslow1.fastb.H:
	< 0012areal_rec_encw_velow.H Transp plane=13 > 1.H;Math file1=1.H exp="file1/1000000000" > r1.H
	< 0012areal_sou_encw_velow.H Transp plane=13 > 1.H;Math file1=1.H exp="file1/1000000000" > s1.H
	Math file1=InvVel/9000vel2.H exp="file1*0+3.3" > 1.H
	< r1.H ../Tese/bin/OWwemva_opers.x sou=s1.H \
	vel=1.H vsal=5 nrefvel=1 deltaI=0012.Dimag.fastb.H \
	xmin= -1.06 xmax= 10.06 zmin=0 zmax=1 nh=15 oh=-.14 jh=1 wbott=0 adj=1 \
	traces_in_taper=51 padtraces=51 encode=1 node=16 > $@ 

0012.Dimag.fastw.H:
	< 0012areal_rec_encw_velow.H Transp plane=13 > r1.H
	< 0012areal_sou_encw_velow.H Transp plane=13 > s1.H
	Math file1=InvVel/9000vel2.H exp="file1*0+3.3" > 1.H
	< r1.H ../Tese/bin/OWwemva_opers.x sou=s1.H \
	vel=1.H vsal=5 nrefvel=1 deltaS=0012.Dslow.fasta.H \
	xmin=0 xmax=9 zmin=0 zmax=1 nh=15 oh=-.14 jh=1 wbott=0 adj=0 \
	traces_in_taper=21 padtraces=21 encode=1 node=16 > $@ 

0012.Dslow1.fastw.H:
	< 0012areal_rec_encw_velow.H Transp plane=13 > r1.H
	< 0012areal_sou_encw_velow.H Transp plane=13 > s1.H
	Math file1=InvVel/9000vel2.H exp="file1*0+3.3" > 1.H
	< r1.H ../Tese/bin/OWwemva_opers.x sou=s1.H \
	vel=1.H vsal=5 nrefvel=1 deltaI=0012.Dimag.fastw.H \
	xmin=-1.06 xmax=10.06 zmin=0 zmax=1 nh=15 oh=-.14 jh=1 wbott=0 adj=1 \
	traces_in_taper=21 padtraces=21 encode=1 node=16 > $@ 
#
##########################
0012inv_slowa:
	< 0012areal_rec_enc0_velow.H Transp plane=13 > r1.H
	< 0012areal_sou_enc0_velow.H Transp plane=13 > s1.H
	Math file1=InvVel/9000vel2.H exp="file1*0+2.7" > 1.H
	< r1.H ../Tese/bin/OW_lbfgsc_areal.x sou=s1.H \
	vel=1.H grad=0012inv_grad_slowa.H \
	Dimage=0012inv_dso_slowa.H bkgimg=0012inv_bkim_slowa.H Velout=0012inv_vout_slowa.H\
	zmin=0 zmax=1 nh=29 oh=-.28 jh=1 wbott=0 niter=1 dso=1 inversion=1 \
	traces_in_taper=21 padtraces=21 node=16 bounds=1 vmin=2.5 vmax=3.5 vsal=5 nrefvel=3 horv0= hor0.5 > /dev/null

0012inv_fasta: #
	< 0012areal_rec_enc0_velow.H Transp plane=13 > 1.H;Math file1=1.H exp="file1/1000000000" > r1.H
	< 0012areal_sou_enc0_velow.H Transp plane=13 > 1.H;Math file1=1.H exp="file1/1000000000" > s1.H
	Math file1=InvVel/9000vel2.H exp="file1*0+3.3" > 1.H
	< r1.H ../Tese/bin/OW_lbfgsc_areal.x sou=s1.H \
	vel=1.H grad=0012inv_grad_fasta.H \
	Dimage=0012inv_dso_fasta.H bkgimg=0012inv_bkim_fasta.H Velout=0012inv_vout_fasta.H \
	zmin=0 zmax=1 nh=15 29 oh=-.14 28 jh=1 wbott=0 niter=3 dso=1 inversion=1 areal=1 \
	traces_in_taper=51 padtraces=51 node=10 bounds=1 vmin=2.5 vmax=3.5 vsal=5 nrefvel=3 horv0= hor0.5 \
	dxk= .2 nxk= 150 dzk= .012 nzk= 200 > /dev/null

0012inv_fastt: #
	< 0012areal_rec_enc0_velow.H Window3d min3=3 n3=101 squeeze=n n1=48 | Transp plane=13 > 1.H;Math file1=1.H exp="file1/1000000000" > r2.H
	< 0012areal_sou_enc0_velow.H Window3d min3=3 n3=101 squeeze=n n1=48 | Transp plane=13 > 1.H;Math file1=1.H exp="file1/1000000000" > s2.H
	Math file1=InvVel/9000vel2.H exp="file1*0+3.3" > 1.H
	../Tese/bin/OW_lbfgsc_areal.x sou=s2.H rec=r2.H\
	vel=1.H grad=0012inv_grad_fastt.H \
	Dimage=0012inv_dso_fastt.H bkgimg=0012inv_bkim_fastt.H Velout=0012inv_vout_fastt.H \
	zmin=0 zmax=1. wbott=0 niter=5 dso=1 inversion=1 list=listagem_bfgs_fastt \
	timeshift=1 nth=101 oth=-.125 dth=0.0025 areal=1 \
	traces_in_taper=11 padtraces=20 node=16 bounds=1 vmin=2.5 vmax=3.5 vsal=5 nrefvel=3 damp=500 \
	dxk= .2 nxk= 150 dzk= .012 nzk= 200 > /dev/null

######################
# Time shift to offset
#
tim2off:
	Window3d < 0012inv_bkim_fastt.H min3=3.5 max3=4.02 min2=-0.1 max2=0.102> xxx.H
	Math file1=InvVel/9000vel2.H exp="file1*0+3.3" > 1.H
	./bin/OW_time2offset.x R_image=xxx.H B_image=0012tim2off.H vel=1.H \
	adj=1 node=12 nah=41 oah=-40. dah=2. nxw=11 nax=11 dax=2 oax=-10 > /dev/null

0012inv_fasta1: #
	< 0012areal_rec_enc0_velow.H Transp plane=13 > 1.H;Math file1=1.H exp="file1/1000000000" > r1.H
	< 0012areal_sou_enc0_velow.H Transp plane=13 > 1.H;Math file1=1.H exp="file1/1000000000" > s1.H
	Math file1=InvVel/9000vel2.H exp="file1*0+3.3" > 1.H
	< r1.H ../Tese/bin/OW_lbfgsc_areal.x sou=s1.H \
	vel=1.H grad=0012inv_grad_fasta1.H \
	Dimage=0012inv_dso_fasta1.H bkgimg=0012inv_bkim_fasta1.H Velout=0012inv_vout_fasta1.H \
	ddws=0012inv_vout_fasta1_ddws.H ddwr=0012inv_vout_fasta1_ddwr.H \
	zmin=0 zmax=1 nh=15 29 oh=-.14 28 jh=1 wbott=0 niter=1 dso=1 inversion=1 log=log_bfgs_a1 \
	traces_in_taper=51 padtraces=51 node=10 bounds=1 vmin=2.5 vmax=3.5 vsal=5 nrefvel=3 horv0= hor0.5 \
	dxk= .2 nxk= 150 dzk= .012 nzk= 200 > /dev/null

0012inv_fastw: #
	< 0012areal_rec_encw_velow.H Transp plane=13 > 1.H;Math file1=1.H exp="file1/1000000000" > r1.H
	< 0012areal_sou_encw_velow.H Transp plane=13 > 1.H;Math file1=1.H exp="file1/1000000000" > s1.H
	Math file1=InvVel/9000vel2.H exp="file1*0+3.3" > 1.H
	< r1.H ../Tese/bin/OW_lbfgsc_areal.x sou=s1.H \
	vel=1.H grad=0012inv_grad_fastw.H \
	Dimage=0012inv_dso_fastw.H bkgimg=0012inv_bkim_fastw.H Velout=0012inv_vout_fastw.H \
	zmin=0 zmax=1 nh=15 oh=-.14 jh=1 wbott=0 niter=2 dso=1 inversion=1 log=log_bfgs_w \
	traces_in_taper=51 padtraces=51 node=16 bounds=1 vmin=2.5 vmax=3.5 vsal=5 nrefvel=3 horv0= hor0.5 \
	nxfilt= 81 damp=100 dxk= 0.16 nxk= 100 oxk= -4. dzk= .01 nzk= 100 > /dev/null

0012inv_fastw1: #
	< 0012areal_rec_encw_velow1.H Transp plane=13 > 1.H;Math file1=1.H exp="file1/1000000000" > r1.H
	< 0012areal_sou_encw_velow1.H Transp plane=13 > 1.H;Math file1=1.H exp="file1/1000000000" > s1.H
	Math file1=InvVel/9000vel2.H exp="file1*0+3.3" > 1.H
	< r1.H ../Tese/bin/OW_lbfgsc_areal.x sou=s1.H \
	vel=1.H grad=0012inv_grad_fastw1.H \
	Dimage=0012inv_dso_fastw1.H bkgimg=0012inv_bkim_fastw1.H Velout=0012inv_vout_fastw1.H \
	ddws= 0012inv_vout_fastw1_ddws.H ddwr= 0012inv_vout_fastw1_ddwr.H \
	zmin=0 zmax=1 nh=15 oh=-.14 jh=1 wbott=0 niter=20 dso=1 inversion=1 log=log_bfgs_w \
	traces_in_taper=51 padtraces=51 node=10 bounds=1 vmin=2.5 vmax=3.5 vsal=5 nrefvel=3 horv0= hor0.5 \
	nxfilt= 81 damp=100 dxk= 0.16 nxk= 100 oxk= -4. dzk= .01 nzk= 100 > /dev/null

0012inv_fastww: #
	< 0012areal_rec_encw_velow.H Transp plane=13 > 1.H;Math file1=1.H exp="file1/1000000000" > r1.H
	< 0012areal_sou_encw_velow.H Transp plane=13 > 1.H;Math file1=1.H exp="file1/1000000000" > s1.H
	Math file1=InvVel/9000vel2.H exp="file1*0+3.3" > 1.H
	< r1.H ../Tese/bin/OW_lbfgsc_areal.x sou=s1.H \
	vel=1.H grad=0012inv_grad_fastww.H \
	Dimage=0012inv_dso_fastww.H bkgimg=0012inv_bkim_fastww.H Velout=0012inv_vout_fastww.H \
	zmin=0 zmax=1 nh=15 oh=-.14 jh=1 wbott=0 niter=2 dso=1 inversion=1 log=log_bfgs_ww \
	traces_in_taper=51 padtraces=51 node=16 bounds=1 vmin=2.5 vmax=3.5 vsal=5 nrefvel=3 horv0= hor0.5 \
	nxfilt=81 damp=200 dxk=0.23 nxk=70 oxk=-4. dzk=.01 nzk=100 > /dev/null

tst.H:
	< 0012areal_rec_enc0_velow.H Transp plane=13 > r1.H
	< 0012areal_sou_enc0_velow.H Transp plane=13 > s1.H
	Window3d < 0012inv_vout_fasta.H n4=1 f4=1 | Pad extend=1 beg2=1000 end2=1000 > 2.H
	Window3d < 0012inv_vout_fasta.H n4=1 f4=1 squeeze=n | Transp plane=13 | \
	Lloyd_vel nref=3 min_region_pct=2 niter_lloyd=120 min_slow_dev=.01 > 2ll.H
	< r1.H ~claudio/research.ln/Prst_ExpRefl/Tese/bin/OWmig2d_areal.x sou=s1.H \
	vel=2.H vref= 2ll.H xmin=-4.06 xmax=12.08 zmin=0 zmax=0.996 nh=15 oh=-.14 jh=1 wbott=0 \
	traces_in_taper=0 padtraces=0 node=16 vsal=5 nrefvel=3 every=0 encode=1 migration=1 node=16 > $@ 

0012inv_fastb: #
	< 0012areal_rec_enc0_velow.H Transp plane=13 > r1.H
	< 0012areal_sou_enc0_velow.H Transp plane=13 > s1.H
	Math file1=InvVel/9000vel2.H exp="file1*0+3.3" > 1.H
	< r1.H ../Tese/bin/OW_lbfgsc_areal.x sou=s1.H \
	vel=1.H grad=0012inv_grad_fastb.H \
	Dimage=0012inv_dso_fastb.H bkgimg=0012inv_bkim_fastb.H Velout=0012inv_vout_fastb.H\
	zmin=0 zmax=1 nh=15 29 oh=-.14 28 jh=1 wbott=0 niter=3 dso=1 inversion=1 \
	traces_in_taper=51 padtraces=51 node=16 bounds=1 vmin=2.5 vmax=3.5 vsal=5 nrefvel=3 horv0= hor0.5 > /dev/null

#######################################
#
#
#
#	Math file1=twin.slow.H exp="1/file1*2-2000" | Window3d | Transp | Pad beg2=1000 end2=1000 \
#	n1out=240 extend=1 > twin.vel.H 

twinborn:
	Spike n2=3001 o2=-15000 d2=10 n1=240 o1=0 d1=10 > z.H;Math file1=z.H exp="file1*0+2" | \
	Mute vmute=0 tmute=1500 > y.H; Math file1=y.H exp="file1+1" > z.H
	Wavelet n1=801 d1=0.006 wavelet=ricker2 phase=0 fund=20 order=0.2 tdelay=2.4 domain=time > j2.H;echo o1=-2.4 >> j2.H
	<j2.H Transf f_min=0 f_min1=2 f_max1=40 f_max=46 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs > j2.H
	Math file1=j2.H exp="file1*0">j1.H;Cmplx j2.H j1.H|Transp plane=13|Window3d squeeze=n f3=1 > twin.11111.H
	< twin.crec1.H Window3d squeeze=n min1=-6000 n1=1201 | ../ShtPSPI/bin/OWmod2d_par.x sou=twin.11111.H vel=twin.vel.H \
	vref= twin.vel.lloyd.H vreflect=z.H shots=twin.csou.born.H vsal=3000 nrefvel=4 \
	traces_in_taper=41 padtraces=81 xmin=-15000 xmax=15000 \
	zmin=0 zmax=2000 node=16 > /dev/null	
#	Spike n1=801 d1=0.004 o1=-1.2 nsp=1 k1=401 | Bandpass flo=6 fhi=42 \
#	| Transf f_min=2 f_min1=4 f_max1=42 f_max=48 wei=y is2d=y | Window3d | Cabs | Smooth rect1=25 > j1.H
#	Math file1=j1.H exp="file1*0" > j2.H ; Cmplx j1.H j2.H | Transp plane=13 > twin.11111.H

twinborn1:
	Spike n2=3001 o2=-15000 d2=10 n1=240 o1=0 d1=10 > z.H;Math file1=z.H exp="file1*0+2" | \
	Mute vmute=0 tmute=1500 > y.H; Math file1=y.H exp="file1+1" > z.H
	< twin.vel.H Window3d min2=0 max2=14500  | Pad beg2=50 extend=1 | Pad beg2=1501 > 1.H; echo o2=-30000 >> 1.H
	< twin.vel.H Window3d min2=-14500 max2=0 | Pad end2=51 extend=1 | Pad end2=1500 > 2.H; echo o2=-30000 >> 2.H
	Math file1=1.H file2=2.H exp=file1+file2 > twin.vel1.H;echo d2=20 >> twin.vel1.H
	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=2 f_max1=40 f_max=46 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs > j2.H
	Math file1=j2.H exp="file1*0">j1.H;Cmplx j2.H j1.H|Transp plane=13|Window3d squeeze=n f3=1 > twin.11111.H
	echo o4=-8000 d4=40 >> twin.crec1.H
	< twin.crec1.H Window3d squeeze=n min1=-3000 n1=301 | ../ShtPSPI/bin/OWmod2d_par.x sou=twin.11111.H vel=twin.vel1.H \
	vreflect=z.H shots=twin.csou1.born.H vsal=3000 nrefvel=4 \
	traces_in_taper=25 padtraces=50 xmin=-15000 xmax=15000 \
	zmin=0 zmax=1600 node=16 > /dev/null	

twin.Dslow.H:
	Math file1=twin.vel1.H exp="1/file1-1/2000" | Transp plane=12 reshape=1,3 > $@

twin.Dimag.H:
	< twin.vel1.H Transp plane=12 reshape=1,3 > twin.vel1.tr.H
	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=2 f_max1=40 f_max=46 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs > j2.H
	Math file1=j2.H exp="file1*0">j1.H;Cmplx j2.H j1.H|Transp plane=13|Window3d squeeze=n f3=1 > twin.11111.H
	Math file1=twin.vel1.tr.H exp="file1*0+1/2000" > twin.bvel.tr.H
	../Tese/bin/OWwemva_opers.x sou=twin.11111.H rec=twin.csou1.born.H \
	vel=twin.bvel.tr.H vsal=7000 nrefvel=4 deltaS=twin.Dslow.H \
	zmin=0 zmax=2000 nh=41 oh=-400 jh=1 wbott=0 adj=0 \
	areal=0 padtraces=25 traces_in_taper=25 node=16 > $@ 

twin.Dslow1.H:
	< twin.vel1.H Transp plane=12 reshape=1,3 > twin.vel1.tr.H
	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=2 f_max1=40 f_max=46 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs > j2.H
	Math file1=j2.H exp="file1*0">j1.H;Cmplx j2.H j1.H|Transp plane=13|Window3d squeeze=n f3=1 > twin.11111.H
	Math file1=twin.vel1.tr.H exp="file1*0+1/2000" > twin.bvel.tr.H
	../Tese/bin/OWwemva_opers.x sou=twin.11111.H rec=twin.csou1.born.H \
	vel=twin.bvel.tr.H vsal=7000 nrefvel=4 deltaI=twin.Dimag.H \
	zmin=0 zmax=2000 nh=41 oh=-400 jh=1 wbott=0 adj=1 \
	areal=0 padtraces=25 traces_in_taper=25 node=16 > $@ 

twin.Dimag.tt.H:
	< twin.vel1.H Transp plane=12 reshape=1,3 > twin.vel1.tr.H
	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=2 f_max1=40 f_max=46 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs > j2.H
	Math file1=j2.H exp="file1*0">j1.H;Cmplx j2.H j1.H|Transp plane=13|Window3d squeeze=n f3=1 > twin.11111.H
	Math file1=twin.vel1.tr.H exp="file1*0+1/2000" > twin.bvel.tr.H
	../Tese/bin/OWwemva_opers.x sou=twin.11111.H rec=twin.csou1.born.H \
	vel=twin.bvel.tr.H vsal=7000 nrefvel=4 deltaS=twin.Dslow.H \
	zmin=0 zmax=2000 timeshift=1 nth=81 oth=-.16 dth=0.004 adj=0 \
	areal=0 padtraces=25 traces_in_taper=25 node=16 > $@ 

twin.Dslow1.tt.H:
	< twin.vel1.H Transp plane=12 reshape=1,3 > twin.vel1.tr.H
	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=2 f_max1=40 f_max=46 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs > j2.H
	Math file1=j2.H exp="file1*0">j1.H;Cmplx j2.H j1.H|Transp plane=13|Window3d squeeze=n f3=1 > twin.11111.H
	Math file1=twin.vel1.tr.H exp="file1*0+1/2000" > twin.bvel.tr.H
	../Tese/bin/OWwemva_opers.x sou=twin.11111.H rec=twin.csou1.born.H \
	vel=twin.bvel.tr.H vsal=7000 nrefvel=4 deltaI=twin.Dimag.tt.H \
	zmin=0 zmax=2000 timeshift=1 nth=81 oth=-.16 dth=0.004 adj=1 \
	areal=0 padtraces=25 traces_in_taper=25 node=16 > $@ 

twinmigtt:
	< twin.vel1.H Transp plane=12 reshape=1,3 > twin.vel1.tr.H
	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=2 f_max1=40 f_max=46 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs > j2.H
	Math file1=j2.H exp="file1*0">j1.H;Cmplx j2.H j1.H|Transp plane=13|Window3d squeeze=n f3=1 > twin.11111.H
	Math file1=twin.vel1.tr.H exp="file1*0+1/2000" > twin.bvel.tr.H
	Window3d squeeze=n j4=4 < twin.csou1.born.H > x1.H
	../Tese/bin/OWmig2d_areal.x sou=twin.11111.H rec=x1.H twin.csou1.born.H \
	vel=twin.bvel.tr.H vsal=7000 nrefvel=4 bkgimg=twin.bkgimg.tt.H \
	zmin=0 zmax=2000 timeshift=1 nth=81 oth=-.16 dth=0.004 migration=1 \
	areal=0 padtraces=25 traces_in_taper=25 node=16 > /dev/null 

twin.dso.tt.H:
	< twin.bkgimg.tt.H Transp plane=13 | Gpow gpow=2 | Gpow gpow=0.5 | Scale scale_to=1 axis=3 > x1.H
	<x1.H Smooth rect1=35 rect2=1 rect3=1|Scale scale_to=1|Clip clip=.8 chop=greater to=1|Clip clip=0.8 chop=less to=0 >x2.H
	< twin.bkgimg.tt.H Transp plane=13 > x3.H
	Math file1=x2.H file2=x3.H exp="file1*file2" | Transp plane=13 > $@

twin.Dslow1.dso.H:
	< twin.vel1.H Transp plane=12 reshape=1,3 > twin.vel1.tr.H
	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=2 f_max1=40 f_max=46 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs > j2.H
	Math file1=j2.H exp="file1*0">j1.H;Cmplx j2.H j1.H|Transp plane=13|Window3d squeeze=n f3=1 > twin.11111.H
	Math file1=twin.vel1.tr.H exp="file1*0+1/2000" > twin.bvel.tr.H
	Window3d squeeze=n j4=4 < twin.csou1.born.H > x1.H
	../Tese/bin/OWwemva_opers.x sou=twin.11111.H rec=x1.H twin.csou1.born.H \
	vel=twin.bvel.tr.H vsal=7000 nrefvel=4 deltaI=twin.dso.tt.H \
	zmin=0 zmax=2000 nh=41 oh=-400 jh=1 wbott=0 adj=1 \
	areal=0 padtraces=25 traces_in_taper=25 node=16 > $@ 

twinmig:
	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=2 f_max1=40 f_max=46 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs > j2.H
	Math file1=j2.H exp="file1*0">j1.H;Cmplx j2.H j1.H|Transp plane=13|Window3d squeeze=n f3=1 > twin.11111.H
	Math file1=twin.vel1.tr.H exp="file1*0+1/2000" > twin.bvel.tr.H
	< twin.csou1.born.H Window3d squeeze=n n4=1 min4=0 > x1.H
	./bin/OWmig2d_areal.x sou=twin.11111.H vel=twin.vel1.tr.H twin.bvel1.H bkgimg=twin.bimg.H rec=x1.H \
	areal=0 migration=1 vsal=3000 nrefvel=1 xmin=-12000. xmax=12000. encode=0 zmin=0 zmax=2000. node=16 \
	nh=41 oh=-200 dh=10 > /dev/null

twininv1: # using correct velocity
	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=2 f_max1=40 f_max=46 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs > j2.H
	Math file1=j2.H exp="file1*0">j1.H;Cmplx j2.H j1.H|Transp plane=13|Window3d squeeze=n f3=1 > twin.11111.H
	Math file1=twin.vel1.tr.H exp="file1*0+1/2000" > twin.bvel.tr.H
	../Tese/bin/OW_lbfgsc_areal.x sou=twin.11111.H rec=twin.csou1.born.H \
	vel=twin.bvel.tr.H grad=twin.inv_grad001.H Dimage=twin.inv_dso001.H bkgimg=twin.inv_bkim001.H Velout=twin.inv_vout001.H \
	zmin=0 zmax=2000 nh=41 oh=-400 jh=1 niter=5 dso=1 inversion=1 areal=0 \
	dxk= 100 nxk= 195 oxk= -9720 dzk= 10 nzk= 200 log=log_bfgs_twin001 list=listagem_bfgs_twin001 \
	padtraces=25 traces_in_taper=25 damp=50000 node=16 bounds=1 vmin=1500 vmax=2600 vsal=3000 nrefvel=4 > /dev/null

twininv2: # using correct velocity
	Math file1=twin.velgrad.H exp="file1*0+1" | Tpow tpow=1 > t1.H
	Math file1=t1.H exp="file1*0.3+1757" > velgrad.H
	Spike n1=1001 d1=0.004 o1=-2 nsp=1 k1=501 | Bandpass flo=6 fhi=42 \
	| Transf f_min=2 f_min1=4 f_max1=42 f_max=48 wei=y is2d=y | Window3d | Cabs | Smooth rect1=25 > j1.H
	Math file1=j1.H exp="file1*0" > j2.H ; Cmplx j1.H j2.H | Transp plane=13 > twin.11111.H
	< velgrad.H Transp plane=12 reshape=1,3 > twin.bvel.tr.H
	../Tese/bin/OW_lbfgsc_areal.x sou=twin.11111.H rec=twin.csou.born.H \
	vel=twin.bvel.tr.H grad=twin.inv_grad002.H Dimage=twin.inv_dso002.H bkgimg=twin.inv_bkim002.H Velout=twin.inv_vout002.H \
	zmin=0 zmax=2000 nh=41 oh=-200 jh=1 niter=1 nxfilt= 1 dso=1 inversion=1 areal=0 zweight=0 \
	dxk=100 nxk=13 195 oxk=-4600 -9720 dzk=10 nzk=200 log=log_bfgs_twin002 list=listagem_bfgs_twin002 \
	padtraces=25 traces_in_taper=25 damp=50000 node=16 bounds=1 vmin=1500 vmax=2600 vsal=3000 nrefvel=4 > /dev/null
#	Window3d < twin.csou.born.H min4=-4000 max4=1010 squeeze=n > twin.csou.temp.H

twininvtt: # without zweight
	Spike n1=1001 d1=0.004 o1=-2 nsp=1 k1=501 | Bandpass flo=6 fhi=42 \
	| Transf f_min=2 f_min1=4 f_max1=42 f_max=48 wei=y is2d=y | Window3d | Cabs | Smooth rect1=25 > j1.H
	Math file1=j1.H exp="file1*0" > j2.H ; Cmplx j1.H j2.H | Transp plane=13 > twin.11111.H
	Math file1=twin.velgrad.H exp="1/file1" | Transp plane=12 reshape=1,3 > twin.bvel.tr.H
	../Tese/bin/OW_lbfgsc_areal.x sou=twin.11111.H rec=twin.csou.born.H \
	vel=twin.bvel.tr.H grad=twin.inv_grad0tt.H Dimage=twin.inv_dso0tt.H bkgimg=twin.inv_bkim0tt.H Velout=twin.inv_vout0tt.H \
	zmin=0 zmax=2000 niter=1 dso=1 inversion=1 areal=0 zweight=0 \
	timeshift=1 nth=401 oth=-.4 dth=0.002 nah=41 oah=-40. dah=2. nxw=11 nax=5 dax=2 oax=-4 \
	dxk= 100 nxk= 13 195 oxk= -4600 -9720 dzk= 10 nzk= 200 log=log_bfgs_twin0tt list=listagem_bfgs_twin0tt \
	padtraces=10 25 traces_in_taper=10 25 damp=50000 node=16 bounds=1 vmin=1500 vmax=2500 vsal=3000 nrefvel=4 > /dev/null
#	Window3d < twin.csou.born.H min4=-4000 max4=1010 squeeze=n > twin.csou.temp.H

twin2ang:
	Window3d < twin.inv_bkim0tt.H squeeze=n min1=0 -3000 n1=11 max1= 3000 min2=-.2 n2=201 > xxx.H
	Math file1=twin.velgrad.H exp="1/file1" | Transp plane=12 reshape=1,3 > twin.bvel.tr.H
	./bin/OW_time2offset.x R_image=xxx.H B_image=twin.tim2off.H vel=twin.bvel.tr.H \
	adj=1 node=16 nah=41 oah=-40. dah=2. nxw=11 21 nax=11 dax=2 oax=-10 > /dev/null

twinenc0: # correct velocity areal shot random encode in w
	Wavelet n1=1301 d1=0.0025 wavelet=ricker2 phase=0 fund=20 order=0.2 tdelay=1.625 domain=time > j2.H
	echo o1=-1.625 >> j2.H;
	<j2.H Transf f_min=0 f_min1=2 f_max1=40 f_max=46 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs > j2.H 
	Math file1=j2.H exp="file1*0">j1.H;Cmplx j2.H j1.H|Transp plane=13 | Window3d squeeze=n n3=148 f3=1> 11111.H
	< twin.bimg.H Window3d min1=-4000 max1=4000 | Transp plane=13 > junk.H #|./bin/OW_hgain.x w=1. > junk.H
	./bin/OW_arealsht.x rec_cig=junk.H sou_cig=junk.H sou=11111.H \
	vel=twin.bvel1.H rec_out=twin.areal_rec_enc0.H sou_out=twin.areal_sou_enc0.H \
	ngap=45 nrefvel=1 eps=1 vsal=3000 padtraces=81 encode=0 injection=1 node=16 nreal=1 > /dev/null 


twin.enc0.mig.H:
	< twin.areal_rec_enc0.H Transp plane=13 | Window3d n4= 1 squeeze=n > r1.H
	< twin.areal_sou_enc0.H Transp plane=13 | Window3d n4= 1 squeeze=n > s1.H
	< twin.bvel1.H Transp plane=12 reshape=1,3 | Lloyd_vel nref=1 min_region_pct=2 \
	niter_lloyd=120 min_slow_dev=.01 > twin.bvel1.lloyd.H
	< twin.bimg.H Window3d min1=0 n1=1 min2=0 n2=1 > wav0.H
	< r1.H ~claudio/research.ln/Prst_ExpRefl/Tese/bin/OWmig2d_areal.x sou=s1.H wav=wav0.H\
	vel=twin.bvel1.H vsal=3000 nrefvel=1 vref= twin.bvel1.lloyd.H nh=21 jh=1 oh=-100 zmax=2200 zmin=0 \
	traces_in_taper=0 every=0 encode=1 migration=1 node=16 > $@ 

twinenc1: # correct velocity areal shot random encode in w
	Wavelet n1=1301 d1=0.0025 wavelet=ricker2 phase=0 fund=20 order=0.2 tdelay=1.625 domain=time > j2.H
	echo o1=-1.625 >> j2.H;
	<j2.H Transf f_min=0 f_min1=2 f_max1=40 f_max=46 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs > j2.H 
	Math file1=j2.H exp="file1*0">j1.H;Cmplx j2.H j1.H|Transp plane=13 | Window3d squeeze=n n3=148 f3=1> 11111.H
	< twin.bimg.H Window3d min1=-3000 max1=3000 n1= 1 squeeze=n | Transp plane=13 > junk.H #|./bin/OW_hgain.x w=1. > junk.H
	./bin/OW_arealsht.x rec_cig=junk.H sou_cig=junk.H sou=11111.H \
	vel=twin.bvel1.H rec_out=twin.areal_rec_enc1.H sou_out=twin.areal_sou_enc1.H \
	ngap=25 nrefvel=1 eps=1 vsal=3000 padtraces=51 trace_in_taper=51 encode=0 injection=1 node=10 nreal=1 > /dev/null 
#	< twin.bimg.H Window3d min1=0 n1=5 squeeze=n | Transp plane=13 > junk.H #|./bin/OW_hgain.x w=1. > junk.H
twin.enc1.mig.H:
	< twin.areal_rec_enc1.H Transp plane=13 | Window3d squeeze=n > r1.H
	< twin.areal_sou_enc1.H Transp plane=13 | Window3d squeeze=n > s1.H
	< twin.bvel1.H Transp plane=12 reshape=1,3 | Lloyd_vel nref=1 min_region_pct=2 \
	niter_lloyd=120 min_slow_dev=.01 > twin.bvel1.lloyd.H
	< twin.bimg.H Window3d min1=0 n1=1 min2=0 n2=1 > wav0.H
	< r1.H ~claudio/research.ln/Prst_ExpRefl/Tese/bin/OWmig2d_areal.x sou=s1.H wav=wav0.H \
	vel=twin.bvel1.H vsal=3000 nrefvel=1 vref= twin.bvel1.lloyd.H nh=21 jh=1 oh=-100 zmax=2200 zmin=0 \
	traces_in_taper=0 every=0 encode=1 migration=1 node=16 > $@ 

twinencw: # correct velocity areal shot random encode in w
	Wavelet n1=2801 d1=0.002 wavelet=ricker2 phase=0 fund=20 order=0.2 tdelay=2.8 domain=time > j2.H
	echo o1=-2.8 >> j2.H;
	<j2.H Transf f_min=0 f_min1=2 f_max1=40 f_max=46 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs > j2.H 
	Math file1=j2.H exp="file1*0">j1.H;Cmplx j2.H j1.H|Transp plane=13 | Window3d squeeze=n n3=256 f3=1 > 11111.H
	< twin.bimg.H Window3d min1=-4000 max1=4000 | Transp plane=13 > junk.H #|./bin/OW_hgain.x w=1. > junk.H
	./bin/OW_arealsht.x rec_cig=junk.H sou_cig=junk.H sou=11111.H \
	vel=twin.bvel1.H rec_out=twin.areal_rec_encw.H sou_out=twin.areal_sou_encw.H \
	ngap=10 nrefvel=1 eps=1 vsal=3000 padtraces=81 encode=1 random=1 encw=1 node=16 nreal=4 > /dev/null 

twin.encw.mig.H:
	< twin.areal_rec_encw.H Transp plane=13 | Window3d n4=20 squeeze=n > r1.H
	< twin.areal_sou_encw.H Transp plane=13 | Window3d n4=20 squeeze=n > s1.H
	< twin.bvel1.H Transp plane=12 reshape=1,3 | Lloyd_vel nref=1 min_region_pct=2 \
	niter_lloyd=120 min_slow_dev=.01 > twin.bvel1.lloyd.H
	< r1.H ~claudio/research.ln/Prst_ExpRefl/Tese/bin/OWmig2d_areal.x sou=s1.H \
	vel=twin.bvel1.H vsal=3000 nrefvel=1 vref= twin.bvel1.lloyd.H nh=41 jh=1 oh=-200 zmax=2200 zmin=0 \
	traces_in_taper=0 every=0 encode=1 migration=1 node=16 > $@ 

###########################
#
# 1 refl. basin
#
basinborn1:
	./bin/OW_reflect.x 1 o1=0 d1=10 n1=201 o2=-12000 d2=20 n2=1201 nrefl=2 | Pad beg2=1000 end2=1000 > sync.refl.H
	Spike o1=0 d1=10 n1=201 o2=-12000 d2=20 n2=1201 n3=1 o3=0 d3=1 nsp=1 k1=61 k2=601 mag=2000 | Smooth rect1=9 rect2=3 \
	repeat=8| Scale scale_to=1 > xxx.H
	Math file1=xxx.H exp="-file1*300+3000" > sync.vel.H 
	< sync.vel.H Pad beg2=1000 end2=1000 extend=1 > sync.vel.pad.H 
	< sync.vel.H Transp plane=12 reshape=1,3 | Lloyd_vel nref=4 min_region_pct=2 \
	niter_lloyd=120 min_slow_dev=.01 > sync.vel.lloyd.H
	Wavelet n1=1301 d1=0.003 wavelet=ricker2 phase=0 fund=20 order=0.2 tdelay=1.95 domain=time > j2.H
	echo o1=-1.95 >> j2.H;
	<j2.H Transf f_min=0 f_min1=2 f_max1=40 f_max=46 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs > j2.H 
	Math file1=j2.H exp="file1*0">j1.H;Cmplx j2.H j1.H|Transp plane=13|Window3d squeeze=n n3=148 f3=1 > 11111.H
	< sync.crec.H ../ShtPSPI/bin/OWmod2d_par.x sou=11111.H vel=sync.vel.pad.H \
	vref=sync.vel.lloyd.H reflectivity=sync.refl.H shots=sync.csou1.born.H  \
	padtraces=50 traces_in_taper=50 xmin=-18000 xmax=18000 \
	zmin=0 zmax=1600 node=16 > /dev/null	
#	< sync.crec.H Window3d squeeze=n n4=1 > 22222.H ; 
#	Spike o1=0 d1=10 n1=201 o2=-6000 d2=20 n2=601 n3=1 o3=0 d3=1 nsp=1 k1=51 k2=301 mag=1000 | Smooth rect1=4 rect2=2 \
#	repeat=12| Scale scale_to=1 | Clip clip=0.05 chop=greater to=1 | Smooth rect1=4 rect2=2 | Scale scale_to=1 > xxx.H
#	Math file1=xxx.H exp="-file1*300+3000" > sync.vel.H 
	
basinmig1:
	Math file1=sync.vel.pad.H exp="file1*0+3000" | Pad end1=200 extend=1 > sync.bvel.H
	< sync.csou1.born.H Window3d j4= 4 squeeze=n|../ShtPSPI/bin/OWmig2d_par.x sou=11111.H vel=sync.bvel.H sync.vel.pad.H  \
	image=sync.bimg1.H vref= sync.vel.lloyd.H vsal=4000 nrefvel=1 \
	xmin=-18000. xmax=18000. encode=0 zmin=0 zmax=2000. node=16 \
	nh=21 oh=-200 dh=20 > /dev/null

basininv001: #
	Wavelet n1=1301 d1=0.003 wavelet=ricker2 phase=0 fund=20 order=0.2 tdelay=1.95 domain=time > j2.H
	echo o1=-1.95 >> j2.H
	<j2.H Transf f_min=0 f_min1=2 f_max1=40 f_max=46 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs > j2.H 
	Math file1=j2.H exp="file1*0">j1.H;Cmplx j2.H j1.H|Transp plane=13|Window3d squeeze=n n3=148 f3=1 > 11111.H
	< sync.csou1.born.H Window3d squeeze=n j4= 4 min4= 8000 > 22222.H
	< 22222.H ../Tese/bin/OW_lbfgsc_areal.x sou=11111.H \
	vel=sync.bvel.H grad=sync.inv_grad001.H \
	Dimage=sync.inv_dso001.H bkgimg=sync.inv_bkim001.H Velout=sync.inv_vout001.H \
	zmin=0 zmax=2000 nh=21 oh=-200 jh=1 niter=1 dso=1 inversion=1 areal=0 log=log_bfgs_sync001 yyy=yyy.H \
	dxk= 200 nxk= 190 oxk= -19000 dzk= 50 nzk= 100 \
	traces_in_taper=25 padtraces=25 damp=50000 node=8 bounds=1 vmin=2500 vmax=3500 vsal=5000 nrefvel=3 \

syncenc01: # correct velocity areal shot random encode in w
	Wavelet n1=1301 d1=0.0025 wavelet=ricker2 phase=0 fund=20 order=0.2 tdelay=1.625 domain=time > j2.H
	echo o1=-1.625 >> j2.H;
	<j2.H Transf f_min=0 f_min1=2 f_max1=40 f_max=46 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs > j2.H 
	Math file1=j2.H exp="file1*0">j1.H;Cmplx j2.H j1.H|Transp plane=13|Window3d squeeze=n n3=148 f3=1 > 11111.H
	< sync.bimg1.H Window3d min1=-6000 max1=6000 | Transp plane=13 > junk.H #|./bin/OW_hgain.x w=1. > junk.H
	./bin/OW_arealsht.x rec_cig=junk.H sou_cig=junk.H sou=11111.H \
	vel=sync.bvel.H rec_out=sync.areal_rec_enc01.H sou_out=sync.areal_sou_enc01.H \
	ngap=45 nrefvel=1 eps=1 vsal=4000 padtraces=81 encode=0 injection=1 node=16 nreal=1 > /dev/null 

sync.enc01.mig.H:
	< sync.areal_rec_enc01.H Transp plane=13 > r1.H
	< sync.areal_sou_enc01.H Transp plane=13 > s1.H
	< r1.H ~claudio/research.ln/Prst_ExpRefl/Tese/bin/OWmig2d_areal.x sou=s1.H \
	vel=sync.bvel.H sync.vel.pad.H nrefvel=1 vsal=5000 vref= sync.vel.lloyd.H nh=1 21 jh=1 oh=0 -200 zmax=2000 zmin=0 \
	traces_in_taper=25 encode=1 migration=1 node=16 areal=1 > $@ 

basininv01: #
	< sync.areal_rec_enc01.H Window3d min3=-4000 max3=4000 squeeze=n | Transp plane=13 > 1.H
	Math file1=1.H exp="file1/1000000" > r1.H
	< sync.areal_sou_enc01.H Window3d min3=-4000 max3=4000 squeeze=n | Transp plane=13 > 1.H
	Math file1=1.H exp="file1/1000000" > s1.H
	< r1.H ../Tese/bin/OW_lbfgsc_areal.x sou=s1.H \
	vel=sync.bvel.H grad=sync.inv_grad01.H \
	Dimage=sync.inv_dso01.H bkgimg=sync.inv_bkim01.H Velout=sync.inv_vout01.H \
	zmin=0 zmax=2000 nh=21 oh=-200 jh=1 niter=5 dso=1 inversion=1 log=log_bfgs_sync01\
	dxk=400 nxk=50 oxk=-5000. dzk=50 nzk=100 \
	traces_in_taper=25 padtraces=25 damp=50000 node=16 bounds=1 vmin=2500 vmax=3500 vsal=5000 nrefvel=3 horv0= \

###########################
#
# 2 refl. basin
#
basinborn:
	./bin/OW_reflect.x 1 o1=0 d1=10 n1=201 o2=-6000 d2=20 n2=601 | Pad beg2=1000 end2=1000 > sync.refl.H
	Spike o1=0 d1=10 n1=201 o2=-6000 d2=20 n2=601 n3=1 o3=0 d3=1 nsp=1 k1=51 k2=301 mag=1000 | Smooth rect1=4 rect2=2 \
	repeat=12| Scale scale_to=1 | Clip clip=0.05 chop=greater to=1 | Smooth rect1=4 rect2=2 | Scale scale_to=1 > xxx.H
	Math file1=xxx.H exp="-file1*300+3000" > sync.vel.H 
	< sync.vel.H Pad beg2=1000 end2=1000 extend=1 > sync.vel.pad.H 
	< sync.vel.H Transp plane=12 reshape=1,3 | Lloyd_vel nref=4 min_region_pct=2 \
	niter_lloyd=120 min_slow_dev=.01 > sync.vel.lloyd.H
	Wavelet n1=1301 d1=0.0025 wavelet=ricker2 phase=0 fund=20 order=0.2 tdelay=1.625 domain=time > j2.H
	echo o1=-1.625 >> j2.H;
	<j2.H Transf f_min=0 f_min1=2 f_max1=40 f_max=46 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs > j2.H 
	Math file1=j2.H exp="file1*0">j1.H;Cmplx j2.H j1.H|Transp plane=13|Window3d squeeze=n n3=148 f3=1 > 11111.H
	< sync.crec.H ../ShtPSPI/bin/OWmod2d_par.x sou=11111.H vel=sync.vel.pad.H \
	vref=sync.vel.lloyd.H reflectivity=sync.refl.H shots=sync.csou.born.H  \
	traces_in_taper=41 padtraces=81 xmin=-11000 xmax=11000 \
	zmin=0 zmax=1600 node=10 > /dev/null	
	< sync.crec.H Window3d squeeze=n n4=1 min4=0 > 22222.H ; echo n1=1601 o1=-16000 >> 22222.H
	
basinmig:
	Math file1=sync.vel.pad.H exp="file1*0+3000" | Pad end1=200 extend=1 > sync.bvel.H
	< sync.csou.born.H ../ShtPSPI/bin/OWmig2d_par.x sou=11111.H vel=sync.bvel.H image=sync.bimg.H \
	vsal=4000 nrefvel=1 xmin=-12000. xmax=12000. encode=0 zmin=0 zmax=2000. node=10 \
	nh=41 oh=-400 dh=20 > /dev/null

syncenc0: # correct velocity areal shot random encode in w
	Wavelet n1=1301 d1=0.0025 wavelet=ricker2 phase=0 fund=20 order=0.2 tdelay=1.625 domain=time > j2.H
	echo o1=-1.625 >> j2.H;
	<j2.H Transf f_min=0 f_min1=2 f_max1=40 f_max=46 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs > j2.H 
	Math file1=j2.H exp="file1*0">j1.H;Cmplx j2.H j1.H|Transp plane=13|Window3d squeeze=n n3=148 f3=1 > 11111.H
	< sync.bimg.H Window3d min1=-6000 max1=6000 | Transp plane=13 > junk.H #|./bin/OW_hgain.x w=1. > junk.H
	./bin/OW_arealsht.x rec_cig=junk.H sou_cig=junk.H sou=11111.H \
	vel=sync.bvel.H rec_out=sync.areal_rec_enc0.H sou_out=sync.areal_sou_enc0.H \
	ngap=45 nrefvel=1 eps=1 vsal=4000 padtraces=81 encode=0 injection=1 node=10 nreal=1 > /dev/null 

basininv0: #
	< sync.areal_rec_enc0.H Window3d min3=-4000 max3=4000 squeeze=n | Transp plane=13 > 1.H
	Math file1=1.H exp="file1/1000000" > r1.H
	< sync.areal_sou_enc0.H Window3d min3=-4000 max3=4000 squeeze=n | Transp plane=13 > 1.H
	Math file1=1.H exp="file1/1000000" > s1.H
	< r1.H ../Tese/bin/OW_lbfgsc_areal.x sou=s1.H \
	vel=sync.bvel.H grad=sync.inv_grad0.H \
	Dimage=sync.inv_dso0.H bkgimg=sync.inv_bkim0.H Velout=sync.inv_vout0.H \
	zmin=0 zmax=2000 nh=21 oh=-200 jh=1 niter=5 dso=1 inversion=1 log=log_bfgs_sync0 \
	dxk= 100 nxk= 100 oxk= -5000. dzk= 50 nzk= 40 \
	traces_in_taper=25 padtraces=25 damp=1500 node=10 bounds=1 vmin=2000 vmax=4000 vsal=5000 nrefvel=3 horv0= \

syncencz: # correct velocity areal shot random encode in w
	Wavelet n1=1301 d1=0.0025 wavelet=ricker2 phase=0 fund=20 order=0.2 tdelay=1.625 domain=time > j2.H
	echo o1=-1.625 >> j2.H;
	<j2.H Transf f_min=0 f_min1=2 f_max1=40 f_max=46 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs > j2.H 
	Math file1=j2.H exp="file1*0">j1.H;Cmplx j2.H j1.H|Transp plane=13|Window3d squeeze=n n3=148 f3=1 > 11111.H
	< sync.bimg.H Window3d min1=-6000 max1=6000 | Transp plane=13 > junk.H #|./bin/OW_hgain.x w=1. > junk.H
	./bin/OW_arealsht.x rec_cig=junk.H sou_cig=junk.H sou=11111.H \
	vel=sync.bvel.H rec_out=sync.areal_rec_encz.H sou_out=sync.areal_sou_encz.H horsplit=basinpck.out \
	ngap=45 nrefvel=1 eps=1 vsal=4000 padtraces=0 encode=1 encz=1 random=1 injection=1 node=15 nreal=1 > /dev/null 

sync.encz.mig.H:
	< sync.areal_rec_encz.H Transp plane=13 > r1.H
	< sync.areal_sou_encz.H Transp plane=13 > s1.H
	< r1.H ~claudio/research.ln/Prst_ExpRefl/Tese/bin/OWmig2d_areal.x sou=s1.H \
	vel=sync.bvel.H vsal=5000 nrefvel=1 nh=21 jh=1 oh=-200 zmax=2000 zmin=0 \
	traces_in_taper=0 every=0 encode=1 migration=1 node=10 xxx=xxx.H > $@ 

basininvz: #
	< sync.areal_rec_encz.H Window3d min3= -4000 max3= 4000 squeeze=n | Transp plane=13 > 1.H
	Math file1=1.H exp="file1/1000000" > r1.H
	< sync.areal_sou_encz.H Window3d min3= -4000 max3= 4000 squeeze=n | Transp plane=13 > 1.H
	Math file1=1.H exp="file1/1000000" > s1.H
	< r1.H ../Tese/bin/OW_lbfgsc_areal.x sou=s1.H \
	vel=sync.bvel.H grad=sync.inv_gradz.H \
	Dimage=sync.inv_dsoz.H bkgimg=sync.inv_bkimz.H Velout=sync.inv_voutz.H \
	zmin=0 zmax=2000 nh=21 oh=-200 jh=1 niter=5 dso=1 inversion=1 log=log_bfgs_syncz \
	dxk= 100 nxk= 128 oxk= -6400. dzk= 50 nzk= 40 \
	traces_in_taper=0 padtraces=0 damp=1500 node=16 bounds=1 vmin=2000 vmax=4000 vsal=5000 nrefvel=3 horv0= \

#################################
#
#
circ.slo.H:
	Math file1=twin.vel.H exp="1/(file1*1.5)" | Pad extend=1 beg2=1000 end2=1000 | Window3d j2=2|Transp plane=12 reshape=1,3 > $@

circ.vel.H:
	Math file1=twin.vel.H exp="(file1*1.5)" | Pad extend=1 beg2=1000 end2=1000 | Window3d j2=2 > $@

circborn:
	Spike n2=2501 o2=-25000 d2=20 n1=240 o1=0 d1=10 > z.H;Math file1=z.H exp="file1*0-2" | \
	Mute vmute=0 tmute=1500 > y.H; Math file1=y.H exp="file1+3" > z.H
	Wavelet n1=901 d1=0.004 wavelet=ricker2 phase=0 fund=20 order=0.2 tdelay=1.8 domain=time > j2.H;echo o1=-1.8 >> j2.H
	<j2.H Transf f_min=0 f_min1=2 f_max1=40 f_max=46 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs > j2.H
	Math file1=j2.H exp="file1*0">j1.H;Cmplx j2.H j1.H|Transp plane=13|Window3d squeeze=n n3=148 f3=1 > circ.11111.H
	< twin.crec1.H Window3d squeeze=n min1=-8000 n1=801 j4=1 | ../ShtPSPI/bin/OWmod2d_par.x sou=circ.11111.H vel=circ.vel.H \
	light=1 illum=circ.csou.born.illumshot.H \
	vreflect=z.H shots=circ.csou.born.H vsal=4000 nrefvel=3 \
	traces_in_taper=25 padtraces=75 xmin=-14000 xmax=14000 \
	zmin=0 zmax=2000 node=16 > /dev/null	

circplane:
	Wavelet n1=901 d1=0.004 wavelet=ricker2 phase=0 fund=20 order=0.2 tdelay=1.8 domain=time > j2.H;echo o1=-1.8 >> j2.H
	<j2.H Transf f_min=0 f_min1=2 f_max1=40 f_max=46 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs > j2.H
	Math file1=j2.H exp="file1*0">j1.H;Cmplx j2.H j1.H|Transp plane=13|Window3d squeeze=n n3=148 f3=1 > circ.11111.H
	Window3d < circ.csou.born.H squeeze=n > xxx.H
	./bin/OWplane_areal.x sou=circ.11111.H rec=xxx.H v0=3000 rec_pl=circ.crec.plane.H sou_pl=circ.csou.plane.H node=16 > /dev/null

circmig:
#	Spike n2=3001 o2=-15000 d2=10 n1=240 o1=0 d1=10 > z.H;Math file1=z.H exp="file1*0-2" | \
#	Mute vmute=0 tmute=1500 > y.H; Math file1=y.H exp="file1+3" > z.H
#	Wavelet n1=901 d1=0.004 wavelet=ricker2 phase=0 fund=20 order=0.2 tdelay=1.8 domain=time > j2.H;echo o1=-1.95 >> j2.H
#	<j2.H Transf f_min=0 f_min1=2 f_max1=40 f_max=46 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs > j2.H 
#	Math file1=j2.H exp="file1*0">j1.H;Cmplx j2.H j1.H|Transp plane=13|Window3d squeeze=n n3=148 f3=1 > circ.11111.H
#	< twin.crec1.H Window3d squeeze=n n4=1 | Pad beg1=120 end1=120 | \
#	../ShtPSPI/bin/OWmod2d_par.x sou=circ.11111.H vel=twin.vel.H \
#	vreflect=z.H shots=circ.1.born.H vsal=3000 nrefvel=3 \
#	traces_in_taper=41 padtraces=81 xmin=-15000 xmax=15000 \
#	zmin=0 zmax=2000 node=16 > /dev/null	
	Wavelet n1=901 d1=0.004 wavelet=ricker2 phase=0 fund=20 order=0.2 tdelay=1.8 domain=time > j2.H;echo o1=-1.8 >> j2.H
	<j2.H Transf f_min=0 f_min1=2 f_max1=40 f_max=46 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs > j2.H
	Math file1=j2.H exp="file1*0">j1.H;Cmplx j2.H j1.H|Transp plane=13|Window3d squeeze=n n3=148 f3=1 > circ.11111.H
	Math file1=circ.vel.H exp="1/(file1*0+2000)" | Pad extend=1 end1=200 | Transp plane=12 reshape=1,3 > circ.bslo.H
	Window3d < circ.csou.born.H squeeze=n n4=1 > xxx.H
	< xxx.H ../ShtPSPI/bin/OWmig2d_par.x sou=circ.11111.H \
	vel=circ.vel.H image=circ.bkim.hh.H \
	zmin=0 zmax=2390 xmin=-11000 xmax=3000 \
	nh=81 oh=-400. dh=10 ws=circ.ws.H wr=circ.wr.H \
	padtraces=100 traces_in_taper=100 node=1 vsal=3000 nrefvel=1 > /dev/null

circmigtt:
#	Spike n2=3001 o2=-15000 d2=10 n1=240 o1=0 d1=10 > z.H;Math file1=z.H exp="file1*0-2" | \
#	Mute vmute=0 tmute=1500 > y.H; Math file1=y.H exp="file1+3" > z.H
#	Wavelet n1=901 d1=0.004 wavelet=ricker2 phase=0 fund=20 order=0.2 tdelay=1.8 domain=time > j2.H;echo o1=-1.95 >> j2.H
#	<j2.H Transf f_min=0 f_min1=2 f_max1=40 f_max=46 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs > j2.H 
#	Math file1=j2.H exp="file1*0">j1.H;Cmplx j2.H j1.H|Transp plane=13|Window3d squeeze=n n3=148 f3=1 > circ.11111.H
#	< twin.crec1.H Window3d squeeze=n n4=1 | Pad beg1=120 end1=120 | \
#	../ShtPSPI/bin/OWmod2d_par.x sou=circ.11111.H vel=twin.vel.H \
#	vreflect=z.H shots=circ.1.born.H vsal=3000 nrefvel=3 \
#	traces_in_taper=41 padtraces=81 xmin=-15000 xmax=15000 \
#	zmin=0 zmax=2000 node=16 > /dev/null	
	Wavelet n1=901 d1=0.004 wavelet=ricker2 phase=0 fund=20 order=0.2 tdelay=1.8 domain=time > j2.H;echo o1=-1.8 >> j2.H
	<j2.H Transf f_min=0 f_min1=2 f_max1=40 f_max=46 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs > j2.H
	Math file1=j2.H exp="file1*0">j1.H;Cmplx j2.H j1.H|Transp plane=13|Window3d squeeze=n n3=148 f3=1 > circ.11111.H
	Math file1=circ.vel.H exp="1/(file1*0+2000)" | Pad extend=1 end1=200 | Transp plane=12 reshape=1,3 > circ.bslo.H
	../Tese/bin/OWmig2d_areal.x rec=circ.1.born.H sou=circ.11111.H \
	vel=circ.bslo.H bkgimg=circ.bkim.hh.H migration=1 \
	zmin=0 zmax=2390 areal=0 \
	timeshift=1 nth=501 oth=-1. dth=0.004 \
	padtraces=25 traces_in_taper=25 node=1 vsal=3000 nrefvel=1 > /dev/null

circ.Dslow.H:
	Math file1=twin.vel.H exp="1/file1-1/2000" | Pad extend=1 end1=200 | Transp plane=12 reshape=1,3 > $@

circ.Dimag.H:
	Math file1=circ.vel.H exp="1/(file1*0+2000)" | Pad extend=1 end1=200 | Transp plane=12 reshape=1,3 > circ.bslo.H
	Wavelet n1=901 d1=0.004 wavelet=ricker2 phase=0 fund=20 order=0.2 tdelay=1.8 domain=time > j2.H;echo o1=-1.8 >> j2.H
	<j2.H Transf f_min=0 f_min1=2 f_max1=40 f_max=46 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs > j2.H
	Math file1=j2.H exp="file1*0">j1.H;Cmplx j2.H j1.H|Transp plane=13|Window3d squeeze=n n3=148 f3=1 > circ.11111.H
	Window3d < circ.csou.born.H squeeze=n j4=1 > circ.csou.2222.H
	../Tese/bin/OWwemva_opers.x sou=circ.11111.H rec=circ.csou.2222.H \
	vel=circ.bslo.H vsal=7000 nrefvel=4 deltaS=circ.Dslow.H \
	nh=41 oh=-200. dh=10 zmin=0 zmax=3000 adj=0 \
	areal=0 padtraces=25 traces_in_taper=25 node=16 > $@ 

circ.Dslow1.H:
	Math file1=circ.vel.H exp="1/(file1*0+2000)" | Pad extend=1 end1=200 | Transp plane=12 reshape=1,3 > circ.bslo.H
	Wavelet n1=901 d1=0.004 wavelet=ricker2 phase=0 fund=20 order=0.2 tdelay=1.8 domain=time > j2.H;echo o1=-1.8 >> j2.H
	<j2.H Transf f_min=0 f_min1=2 f_max1=40 f_max=46 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs > j2.H
	Math file1=j2.H exp="file1*0">j1.H;Cmplx j2.H j1.H|Transp plane=13|Window3d squeeze=n n3=148 f3=1 > circ.11111.H
	Window3d < circ.csou.born.H squeeze=n j4=1 > circ.csou.2222.H
	../Tese/bin/OWwemva_opers.x sou=circ.11111.H rec=circ.csou.2222.H \
	vel=circ.bslo.H vsal=7000 nrefvel=4 deltaI=circ.Dimag.H \
	nh=41 oh=-200. dh=10 zmin=0 zmax=3000 adj=1 \
	areal=0 padtraces=25 traces_in_taper=25 node=16 > $@ 

circ.Dimag.0.H:
	Math file1=circ.vel.H exp="1/(file1*0+2000)" | Pad extend=1 end1=200 | Transp plane=12 reshape=1,3 > circ.bslo.H
	Wavelet n1=901 d1=0.004 wavelet=ricker2 phase=0 fund=20 order=0.2 tdelay=1.8 domain=time > j2.H;echo o1=-1.8 >> j2.H
	<j2.H Transf f_min=0 f_min1=2 f_max1=40 f_max=46 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs > j2.H
	Math file1=j2.H exp="file1*0">j1.H;Cmplx j2.H j1.H|Transp plane=13|Window3d squeeze=n n3=148 f3=1 > circ.11111.H
	Window3d < circ.csou.born.H squeeze=n j4= 1 > circ.csou.2222.H
	../Tese/bin/OWwemva_opers.x sou=circ.11111.H rec=circ.csou.2222.H \
	vel=circ.bslo.H vsal=7000 nrefvel=4 deltaS=circ.Dslow.H \
	nh=41 oh=-200. dh=10 zmin=0 zmax=3000 adj=0 \
	areal=0 padtraces=25 traces_in_taper=25 node=16 > $@ 

circ.Dslow1.0.H:
	Math file1=circ.vel.H exp="1/(file1*0+2000)" | Pad extend=1 end1=200 | Transp plane=12 reshape=1,3 > circ.bslo.H
	Wavelet n1=901 d1=0.004 wavelet=ricker2 phase=0 fund=20 order=0.2 tdelay=1.8 domain=time > j2.H;echo o1=-1.8 >> j2.H
	<j2.H Transf f_min=0 f_min1=2 f_max1=40 f_max=46 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs > j2.H
	Math file1=j2.H exp="file1*0">j1.H;Cmplx j2.H j1.H|Transp plane=13|Window3d squeeze=n n3=148 f3=1 > circ.11111.H
	Window3d < circ.csou.born.H squeeze=n j4= 1 > circ.csou.2222.H
	../Tese/bin/OWwemva_opers.x sou=circ.11111.H rec=circ.csou.2222.H \
	vel=circ.bslo.H vsal=7000 nrefvel=4 deltaI=circ.Dimag.0.H \
	nh=41 oh=-200. dh=10 zmin=0 zmax=3000 adj=1 \
	areal=0 padtraces=25 traces_in_taper=25 node=16 > $@ 

circ.Dimag.tt0.H:
	Math file1=circ.vel.H exp="1/(file1*0+2000)" | Pad extend=1 end1=200 | Transp plane=12 reshape=1,3 > circ.bslo.H
	Wavelet n1=901 d1=0.004 wavelet=ricker2 phase=0 fund=20 order=0.2 tdelay=1.8 domain=time > j2.H;echo o1=-1.8 >> j2.H
	<j2.H Transf f_min=0 f_min1=2 f_max1=40 f_max=46 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs > j2.H
	Math file1=j2.H exp="file1*0">j1.H;Cmplx j2.H j1.H|Transp plane=13|Window3d squeeze=n n3=148 f3=1 > circ.11111.H
	Window3d < circ.csou.born.H squeeze=n j4= 2 > circ.csou.2222.H
	../Tese/bin/OWwemva_opers.x sou=circ.11111.H rec=circ.csou.2222.H \
	vel=circ.bslo.H vsal=7000 nrefvel=4 deltaS=circ.Dslow.H \
	timeshift=1 nth=151 oth=-.3 dth=0.004 zmin=0 zmax=2200 adj=0 \
	areal=0 padtraces=25 traces_in_taper=25 node=16 > $@ 

circ.Dslow1.tt0.H:
	Math file1=circ.vel.H exp="1/(file1*0+2000)" | Pad extend=1 end1=200 | Transp plane=12 reshape=1,3 > circ.bslo.H
	Wavelet n1=901 d1=0.004 wavelet=ricker2 phase=0 fund=20 order=0.2 tdelay=1.8 domain=time > j2.H;echo o1=-1.8 >> j2.H
	<j2.H Transf f_min=0 f_min1=2 f_max1=40 f_max=46 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs > j2.H
	Math file1=j2.H exp="file1*0">j1.H;Cmplx j2.H j1.H|Transp plane=13|Window3d squeeze=n n3=148 f3=1 > circ.11111.H
	Window3d < circ.csou.born.H squeeze=n j4= 2 > circ.csou.2222.H
	../Tese/bin/OWwemva_opers.x sou=circ.11111.H rec=circ.csou.2222.H \
	vel=circ.bslo.H vsal=7000 nrefvel=4 deltaI=circ.Dimag.tt0.H \
	timeshift=1 nth=151 oth=-.3 dth=0.004 zmin=0 zmax=2200 adj=1 \
	areal=0 padtraces=25 traces_in_taper=25 node=16 > $@ 

circ.Dimag.tt.H:
	Math file1=circ.vel.H exp="1/(file1*0+2000)" | Pad extend=1 end1=200 | Transp plane=12 reshape=1,3 > circ.bslo.H
	Wavelet n1=901 d1=0.004 wavelet=ricker2 phase=0 fund=20 order=0.2 tdelay=1.8 domain=time > j2.H;echo o1=-1.8 >> j2.H
	<j2.H Transf f_min=0 f_min1=2 f_max1=40 f_max=46 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs > j2.H
	Math file1=j2.H exp="file1*0">j1.H;Cmplx j2.H j1.H|Transp plane=13|Window3d squeeze=n n3=148 f3=1 > circ.11111.H
	Window3d < circ.csou.born.H squeeze=n j4=2 > circ.csou.2222.H
	../Tese/bin/OWwemva_opers.x sou=circ.11111.H rec=circ.csou.2222.H \
	vel=circ.bslo.H vsal=7000 nrefvel=4 deltaS=circ.Dslow.H \
	timeshift=1 nth=241 oth=-.48 dth=0.004 zmin=0 zmax=3000 adj=0 \
	areal=0 padtraces=25 traces_in_taper=25 node=16 > $@ 

circ.Dslow1.tt.H:
	Math file1=circ.vel.H exp="1/(file1*0+2000)" | Pad extend=1 end1=200 | Transp plane=12 reshape=1,3 > circ.bslo.H
	Wavelet n1=901 d1=0.004 wavelet=ricker2 phase=0 fund=20 order=0.2 tdelay=1.8 domain=time > j2.H;echo o1=-1.8 >> j2.H
	<j2.H Transf f_min=0 f_min1=2 f_max1=40 f_max=46 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs > j2.H
	Math file1=j2.H exp="file1*0">j1.H;Cmplx j2.H j1.H|Transp plane=13|Window3d squeeze=n n3=148 f3=1 > circ.11111.H
	Window3d < circ.csou.born.H squeeze=n j4=2 > circ.csou.2222.H
	../Tese/bin/OWwemva_opers.x sou=circ.11111.H rec=circ.csou.2222.H \
	vel=circ.bslo.H vsal=7000 nrefvel=4 deltaI=circ.Dimag.tt.H \
	timeshift=1 nth=241 oth=-.48 dth=0.004 zmin=0 zmax=3000 adj=1 \
	areal=0 padtraces=25 traces_in_taper=25 node=16 > $@ 

circ.Dimag.tt1.H:
	Math file1=circ.vel.H exp="1/(file1*0+2000)" | Pad extend=1 end1=200 | Transp plane=12 reshape=1,3 > circ.bslo.H
	Wavelet n1=901 d1=0.004 wavelet=ricker2 phase=0 fund=20 order=0.2 tdelay=1.8 domain=time > j2.H;echo o1=-1.8 >> j2.H
	<j2.H Transf f_min=0 f_min1=2 f_max1=40 f_max=46 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs > j2.H
	Math file1=j2.H exp="file1*0">j1.H;Cmplx j2.H j1.H|Transp plane=13|Window3d squeeze=n n3=148 f3=1 > circ.11111.H
	Window3d < circ.csou.born.H squeeze=n j4= 2 > circ.csou.2222.H
	../Tese/bin/OWwemva_opers.x sou=circ.11111.H rec=circ.csou.2222.H \
	vel=circ.bslo.H vsal=7000 nrefvel=4 deltaS=circ.Dslow.H \
	timeshift=1 nth=241 oth=-.48 dth=0.004 zmin=0 zmax=3000 adj=0 \
	areal=0 padtraces=25 traces_in_taper=25 node=16 > $@ 

circ.Dslow1.tt1.H:
	Math file1=circ.vel.H exp="1/(file1*0+2000)" | Pad extend=1 end1=200 | Transp plane=12 reshape=1,3 > circ.bslo.H
	Wavelet n1=901 d1=0.004 wavelet=ricker2 phase=0 fund=20 order=0.2 tdelay=1.8 domain=time > j2.H;echo o1=-1.8 >> j2.H
	<j2.H Transf f_min=0 f_min1=2 f_max1=40 f_max=46 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs > j2.H
	Math file1=j2.H exp="file1*0">j1.H;Cmplx j2.H j1.H|Transp plane=13|Window3d squeeze=n n3=148 f3=1 > circ.11111.H
	Window3d < circ.csou.born.H squeeze=n j4=2 > circ.csou.2222.H
	../Tese/bin/OWwemva_opers.x sou=circ.11111.H rec=circ.csou.2222.H \
	vel=circ.bslo.H vsal=7000 nrefvel=4 deltaI=circ.Dimag.tt.H \
	timeshift=1 nth=241 oth=-.48 dth=0.004 zmin=0 zmax=3000 adj=1 \
	areal=0 padtraces=25 traces_in_taper=25 node=16 > $@ 

circinvh:
	Wavelet n1=901 d1=0.004 wavelet=ricker2 phase=0 fund=20 order=0.2 tdelay=1.8 domain=time > j2.H;echo o1=-1.8 >> j2.H
	<j2.H Transf f_min=0 f_min1=2 f_max1=40 f_max=46 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs > j2.H
	Math file1=j2.H exp="file1*0">j1.H;Cmplx j2.H j1.H|Transp plane=13|Window3d squeeze=n n3=148 f3=1 > circ.11111.H
	Math file1=circ.vel.H exp="1/(file1*0+2000)" | Pad extend=1 end1=200 | Transp plane=12 reshape=1,3 > circ.bslo.H
	Window3d < circ.csou.born.H squeeze=n n4= 1 min4= 0 j4= 2 > circ.csou.2222.H
	../Tese/bin/OW_lbfgsc_areal.x sou=circ.11111.H rec=circ.csou.2222.H \
	vel=circ.bslo.H grad=circ.inv_gradh.H Dimage=circ.inv_dsoh.H bkgimg=circ.inv_bkimh.H Velout=circ.inv_vouth.H \
	zmin=0 zmax=2000 niter=10 dso=1 inversion=1 areal=0 zweight=0 nh=81 oh=-400 dh=10. \
	ddws=circ.inv_gradh.perturbed.H ddwr=circ.inv_gradh.perturbed.H ddwsz=circ.inv_gradh.scattered.H ddwrz=circ.inv_gradh.scattered.H \
	dxk= 100 nxk= 13 195 oxk= -4600 -9720 dzk= 10 nzk= 200 log=log_bfgs_circh list=listagem_bfgs_circh \
	padtraces=25 traces_in_taper=25 damp=15000 node=14 bounds=1 vmin=1500 vmax=2500 vsal=3000 nrefvel=3 > /dev/null
#	Window3d < twin.csou.born.H min4=-4000 max4=1010 squeeze=n > twin.csou.temp.H

circinvh1:
	Wavelet n1=901 d1=0.004 wavelet=ricker2 phase=0 fund=20 order=0.2 tdelay=1.8 domain=time > j2.H;echo o1=-1.8 >> j2.H
	<j2.H Transf f_min=0 f_min1=2 f_max1=40 f_max=46 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs > j2.H
	Math file1=j2.H exp="file1*0">j1.H;Cmplx j2.H j1.H|Transp plane=13|Window3d squeeze=n n3=148 f3=1 > circ.11111.H
	Math file1=circ.vel.H exp="1/(file1*0+2000)" | Pad extend=1 end1=200 | Transp plane=12 reshape=1,3 > circ.bslo.H
	Window3d < circ.csou.born.H squeeze=n n4= 1 min4= 0 j4= 2 > circ.csou.2222.H
	../Tese/bin/OW_lbfgsc_areal.x sou=circ.11111.H rec=circ.csou.2222.H \
	vel=circ.bslo.H grad=circ.inv_gradh1.H Dimage=circ.inv_dsoh1.H bkgimg=circ.inv_bkimh1.H Velout=circ.inv_vouth1.H \
	zmin=0 zmax=2000 niter=10 dso=1 inversion=1 areal=0 zweight=0 \
	nh=41 oh=-200 dh=10. \
	dxk= 100 nxk= 13 195 oxk= -4600 -9720 dzk= 10 nzk= 200 log=log_bfgs_circh1 list=listagem_bfgs_circh1 \
	padtraces=25 traces_in_taper=25 damp=15000 node=16 bounds=1 vmin=1500 vmax=2500 vsal=3000 nrefvel=4 > /dev/null
#	Window3d < twin.csou.born.H min4=-4000 max4=1010 squeeze=n > twin.csou.temp.H

circinvh2:
	Wavelet n1=901 d1=0.004 wavelet=ricker2 phase=0 fund=20 order=0.2 tdelay=1.8 domain=time > j2.H;echo o1=-1.8 >> j2.H
	<j2.H Transf f_min=0 f_min1=2 f_max1=40 f_max=46 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs > j2.H
	Math file1=j2.H exp="file1*0">j1.H;Cmplx j2.H j1.H|Transp plane=13|Window3d squeeze=n n3=148 f3=1 > circ.11111.H
	Math file1=circ.vel.H exp="1/(file1*0+3000)" | Pad extend=1 end1=200 | Transp plane=12 reshape=1,3 > circ.bslo.H
	Window3d squeeze=n j4=4 < circ.csou.plane.H > circ.csou.plane1.H
	Window3d squeeze=n j4=4 < circ.crec.plane.H > circ.crec.plane1.H
	../Tese/bin/OW_lbfgsc_areal.x sou=circ.csou.plane1.H rec=circ.crec.plane1.H \
	vel=circ.bslo.H grad=circ.inv_gradh2.H Dimage=circ.inv_dsoh2.H bkgimg=circ.inv_bkimh2.H Velout=circ.inv_vouth2.H \
	zmin=0 zmax=2000 niter=10 dso=1 inversion=1 areal=1 zweight=0 nh=41 81 oh=-200 400 dh=10. \
	ddws= circ.inv_gradh2.s_perturbed.H ddwr= circ.inv_gradh2.r_perturbed.H ddwsz= circ.inv_gradh2.s_scattered.H ddwrz= circ.inv_gradh2.r_scattered.H \
	dxk= 100 nxk= 13 195 oxk= -4600 -9720 dzk= 10 nzk= 200 log=log_bfgs_circh2 list=listagem_bfgs_circh2 \
	padtraces=25 traces_in_taper=25 damp=30000 node=14 bounds=1 vmin=2000 vmax=4000 vsal=4500 nrefvel=3 > /dev/null
#	Window3d < twin.csou.born.H min4=-4000 max4=1010 squeeze=n > twin.csou.temp.H

circinv:
	Wavelet n1=901 d1=0.004 wavelet=ricker2 phase=0 fund=20 order=0.2 tdelay=1.8 domain=time > j2.H;echo o1=-1.8 >> j2.H
	<j2.H Transf f_min=0 f_min1=2 f_max1=40 f_max=46 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs > j2.H
	Math file1=j2.H exp="file1*0">j1.H;Cmplx j2.H j1.H|Transp plane=13|Window3d squeeze=n n3=148 f3=1 > circ.11111.H
	Math file1=circ.vel.H exp="1/(file1*0+2000)" | Pad extend=1 end1=200 | Transp plane=12 reshape=1,3 > circ.bslo.H
	Window3d < circ.csou.born.H squeeze=n n4= 1 min4= 0 j4=2 > circ.csou.2222.H
	../Tese/bin/OW_lbfgsc_areal.x sou=circ.11111.H rec=circ.csou.2222.H \
	vel=circ.bslo.H grad=circ.inv_grad0tt.H Dimage=circ.inv_dso0tt.H bkgimg=circ.inv_bkim0tt.H Velout=circ.inv_vout0tt.H \
	zmin=0 zmax=3000 niter=3 dso=1 inversion=1 areal=0 zweight=0 \
	timeshift=1 nth=121 oth=-.24 dth=0.004 thresh=0.6 \
	dxk= 100 nxk= 13 195 oxk= -4600 -9720 dzk= 10 nzk= 200 log=log_bfgs_circ0tt list=listagem_bfgs_circ0tt \
	padtraces=25 traces_in_taper=25 damp=50000 node=16 bounds=1 vmin=1500 vmax=2500 vsal=3000 nrefvel=4 > /dev/null
#	Window3d < twin.csou.born.H min4=-4000 max4=1010 squeeze=n > twin.csou.temp.H

circmigtt2:
	Wavelet n1=901 d1=0.004 wavelet=ricker2 phase=0 fund=20 order=0.2 tdelay=1.8 domain=time > j2.H;echo o1=-1.8 >> j2.H
	<j2.H Transf f_min=0 f_min1=2 f_max1=40 f_max=46 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs > j2.H
	Math file1=j2.H exp="file1*0">j1.H;Cmplx j2.H j1.H|Transp plane=13|Window3d squeeze=n n3=148 f3=1 > circ.11111.H
	Math file1=circ.vel.H exp="1/(file1*0+2000)" | Pad extend=1 end1=200 | Transp plane=12 reshape=1,3 > circ.bslo.H
	Window3d < circ.csou.born.H squeeze=n j4=  > circ.csou.2222.H
	../Tese/bin/OWmig2d_areal.x sou=circ.11111.H rec=circ.csou.2222.H \
	vel=circ.bslo.H bkgimg=circ.bkim.tt.H \
	zmin=0 zmax=3000 migration=1 areal=0 \
	timeshift=1 nth=121 oth=-.24 dth=0.004 \
	log=log_bfgs_circ.tt list=listagem_bfgs_circ.tt \
	padtraces=25 traces_in_taper=25 node=16 vsal=3000 nrefvel=1 > /dev/null

circinvtt: # without zweight
	Wavelet n1=901 d1=0.004 wavelet=ricker2 phase=0 fund=20 order=0.2 tdelay=1.8 domain=time > j2.H;echo o1=-1.8 >> j2.H
	<j2.H Transf f_min=0 f_min1=2 f_max1=40 f_max=46 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs > j2.H
	Math file1=j2.H exp="file1*0">j1.H;Cmplx j2.H j1.H|Transp plane=13|Window3d squeeze=n n3=148 f3=1 > circ.11111.H
	Window3d < circ.csou.born.H squeeze=n n4= 1 min4= 0 j4=2 > circ.csou.2222.H
	../Tese/bin/OW_lbfgsc_areal.x sou=circ.11111.H rec=circ.csou.2222.H \
	vel=circ.bslo.H grad=circ.inv_grad0tt.H Dimage=circ.inv_dso0tt.H bkgimg=circ.inv_bkim0tt.H Velout=circ.inv_vout0tt.H \
	zmin=0 zmax=3000 niter=3 dso=1 inversion=1 areal=0 zweight=0 \
	timeshift=1 nth=121 oth=-.24 dth=0.004 thresh=0.6 \
	dxk= 100 nxk= 13 195 oxk= -4600 -9720 dzk= 10 nzk= 200 log=log_bfgs_circ0tt list=listagem_bfgs_circ0tt \
	padtraces=25 traces_in_taper=25 damp=50000 node=16 bounds=1 vmin=1500 vmax=2500 vsal=3000 nrefvel=4 > /dev/null
#	Window3d < twin.csou.born.H min4=-4000 max4=1010 squeeze=n > twin.csou.temp.H

tstdso: # without zweight circ.bkim.tt.H
	< circ.inv_dso0tt.H Window3d min1=-4000 max1=4000 min2=-.24 n2=121 > x1.H
	< x1.H ../Tese/bin/OW_tstdso.x Dimage=x2.H thresh=0.6 > /dev/null

circinvtt1: # without zweight
#	< circ.bkim.tt.H Transp plane=13 | Gpow gpow=2 | Gpow gpow=0.5 | Scale scale_to=1 axis=3 > x1.H
#	 <x1.H Smooth rect1=35 rect2=1 rect3=1|Scale scale_to=1|Clip clip=.5 chop=greater to=1|Clip clip=0.5 chop=less to=0 >x2.H
#	< circ.bkim.tt.H Transp plane=13 > x3.H
#	Math file1=x2.H file2=x3.H exp="file1*file2" | Transp plane=13 > circ.inv_dsoout.tt.H
	Wavelet n1=901 d1=0.004 wavelet=ricker2 phase=0 fund=20 order=0.2 tdelay=1.8 domain=time > j2.H;echo o1=-1.8 >> j2.H
	<j2.H Transf f_min=0 f_min1=2 f_max1=40 f_max=46 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs > j2.H
	Math file1=j2.H exp="file1*0">j1.H;Cmplx j2.H j1.H|Transp plane=13|Window3d squeeze=n n3=148 f3=1 > circ.11111.H
	Math file1=circ.vel.H exp="1/(file1*0+2000)" | Pad extend=1 end1=200 | Transp plane=12 reshape=1,3 > circ.bslo.H
	Window3d < circ.csou.born.H squeeze=n n4= 1 min4= 0 j4=2 > circ.csou.2222.H
	../Tese/bin/OW_gradiente.x sou=circ.11111.H rec=circ.csou.2222.H \
	vel=circ.bslo.H grad=circ.inv_grad1tt.H dsout=circ.bkim.tt.H circ.inv_dsoout.tt.H Velout=circ.inv_vout1tt.H \
	zmin=0 zmax=3000 niter=2 dso=1 inversion=1 areal=0 zweight=0 \
	timeshift=1 nth=121 oth=-.24 dth=0.004 thresh=0.8 \
	dxk= 100 nxk= 13 195 oxk= -4600 -9720 dzk= 10 nzk= 200 log=log_bfgs_circ0tt list=listagem_bfgs_circ0tt \
	padtraces=25 traces_in_taper=25 damp=50000 node=16 bounds=1 vmin=1500 vmax=2500 vsal=3000 nrefvel=4 > /dev/null

##############################################################
#
# Const.velocity
#
constmodtt:
#	Vel n3=1 d3=1 o3=0 n2=3001 o2=-15000 d2=10 n1=440 o1=0 d1=10 vc=4 z1=500 vr1=1 z2=1000 vr3=1.5 z3=1500 vr4=2 z4=2000 vr5=2.5 z5=2500 vr5=3. const1=1 > z.H
	Vel n3=1 d3=1 o3=0 n2=3001 o2=-15000 d2=10 n1=440 o1=0 d1=10 vc=1.5 z1=1000 vr1=1.6 z2=1500 vr2=1.7 z3=2000 vr3=1.8 z4=2500 vr4=1.9 \
	const1=1 const2=1 const3=1 const4=1 > z.H
	Wavelet n1=751 d1=0.004 wavelet=ricker2 phase=0 fund=15 order=0.2 tdelay=1.5 domain=time > j2.H;echo o1=-1.5 >> j2.H
	<j2.H Transf f_min=0 f_min1=2 f_max1=36 f_max=42 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs > j2.H
	Math file1=j2.H exp="file1*0">j1.H;Cmplx j2.H j1.H|Transp plane=13 > const.11111.H
	Math file1=twin.vel.H exp="file1*0+4000" | Pad extend=1 end1=200 > const.vel.H
	../ShtPSPI/bin/OWmod2d_par.x sou=const.11111.H vel=const.vel.H \
	vsal=3500 nrefvel=1 traces_in_taper=51 padtraces=0 shots=const.crec1.H \
	nrec=501 orec=-2500 drec=10 nsht=1 osht=-6000 dsht=80 zmin=0 zmax=3000 node=10 \
	vreflect=z.H xmin=-15000 xmax=15000 > /dev/null
	Cat const.crec1.H const.crec1.H const.crec1.H const.crec1.H const.crec1.H const.crec1.H const.crec1.H const.crec1.H const.crec1.H const.crec1.H axis=4 >a.H
	Cat const.crec1.H const.crec1.H const.crec1.H const.crec1.H const.crec1.H const.crec1.H const.crec1.H const.crec1.H const.crec1.H const.crec1.H axis=4 >b.H
	Cat const.crec1.H const.crec1.H const.crec1.H const.crec1.H const.crec1.H const.crec1.H const.crec1.H const.crec1.H const.crec1.H const.crec1.H axis=4 >c.H
	Cat const.crec1.H const.crec1.H const.crec1.H const.crec1.H const.crec1.H const.crec1.H const.crec1.H const.crec1.H const.crec1.H const.crec1.H axis=4 >d.H
	Cat const.crec1.H const.crec1.H const.crec1.H const.crec1.H const.crec1.H const.crec1.H const.crec1.H const.crec1.H const.crec1.H const.crec1.H axis=4 >e.H
	Cat const.crec1.H const.crec1.H const.crec1.H const.crec1.H const.crec1.H const.crec1.H const.crec1.H const.crec1.H const.crec1.H const.crec1.H axis=4 >f.H
	Cat const.crec1.H const.crec1.H const.crec1.H const.crec1.H const.crec1.H const.crec1.H const.crec1.H const.crec1.H const.crec1.H const.crec1.H axis=4 >g.H
	Cat const.crec1.H const.crec1.H const.crec1.H const.crec1.H const.crec1.H const.crec1.H const.crec1.H const.crec1.H const.crec1.H const.crec1.H axis=4 >h.H
	Cat const.crec1.H const.crec1.H const.crec1.H const.crec1.H const.crec1.H const.crec1.H const.crec1.H const.crec1.H const.crec1.H const.crec1.H axis=4 >i.H
	Cat const.crec1.H const.crec1.H const.crec1.H const.crec1.H const.crec1.H const.crec1.H const.crec1.H const.crec1.H const.crec1.H const.crec1.H axis=4 >j.H
	Cat a.H b.H c.H d.H e.H f.H g.H h.H i.H j.H axis=4 > const.crec.H
	
constkir:
	susynlv ref="1:-10000,1000;10000.,1000" nt=751 dt=0.004 dxs=80 nxs=1 fxs=-4000 dxo=10 nxo=501 fxo=-2500 \
	v00=4000 fpeak=20 > junk1.su;< junk1.su Su2sep >junk.H ;< junk.H Infill3d | Window3d > junk1.H
	echo n2=501 o2=-2500 d2=10 n3=1 o3=-4000 d3=80 >> junk1.H; < junk1.H Transf f_min=0 f_min1=2 f_max1=36 f_max=42 wei=y is2d=y | Transp plane=35 | Transp plane=45 >  const.kirch.H
	Cat const.kirch.H const.kirch.H const.kirch.H const.kirch.H const.kirch.H const.kirch.H const.kirch.H const.kirch.H const.kirch.H const.kirch.H axis=4 >a.H
	Cat const.kirch.H const.kirch.H const.kirch.H const.kirch.H const.kirch.H const.kirch.H const.kirch.H const.kirch.H const.kirch.H const.kirch.H axis=4 >b.H
	Cat const.kirch.H const.kirch.H const.kirch.H const.kirch.H const.kirch.H const.kirch.H const.kirch.H const.kirch.H const.kirch.H const.kirch.H axis=4 >c.H
	Cat const.kirch.H const.kirch.H const.kirch.H const.kirch.H const.kirch.H const.kirch.H const.kirch.H const.kirch.H const.kirch.H const.kirch.H axis=4 >d.H
	Cat const.kirch.H const.kirch.H const.kirch.H const.kirch.H const.kirch.H const.kirch.H const.kirch.H const.kirch.H const.kirch.H const.kirch.H axis=4 >e.H
	Cat const.kirch.H const.kirch.H const.kirch.H const.kirch.H const.kirch.H const.kirch.H const.kirch.H const.kirch.H const.kirch.H const.kirch.H axis=4 >f.H
	Cat const.kirch.H const.kirch.H const.kirch.H const.kirch.H const.kirch.H const.kirch.H const.kirch.H const.kirch.H const.kirch.H const.kirch.H axis=4 >g.H
	Cat const.kirch.H const.kirch.H const.kirch.H const.kirch.H const.kirch.H const.kirch.H const.kirch.H const.kirch.H const.kirch.H const.kirch.H axis=4 >h.H
	Cat const.kirch.H const.kirch.H const.kirch.H const.kirch.H const.kirch.H const.kirch.H const.kirch.H const.kirch.H const.kirch.H const.kirch.H axis=4 >i.H
	Cat const.kirch.H const.kirch.H const.kirch.H const.kirch.H const.kirch.H const.kirch.H const.kirch.H const.kirch.H const.kirch.H const.kirch.H axis=4 >j.H
	Cat a.H b.H c.H d.H e.H f.H g.H h.H i.H j.H axis=4 | Pad beg1=200 end1=200 > const.kirchhoff.H

###	susynlv ref="1:-10000,1000;10000.,1000" ref="1:-10000,1500;10000.,1500" ref="1:-10000,2000;10000.,2000"  ref="1:-10000,2500;10000.,2500" nt=751 dt=0.004 dxs=80 nxs=1 fxs=-4000 dxo=10 nxo=501 fxo=-2500 \



constmig:
	Wavelet n1=751 d1=0.004 wavelet=ricker2 phase=0 fund=15 order=0.2 tdelay=1.5 domain=time > j2.H;echo o1=-1.5 >> j2.H
	<j2.H Transf f_min=0 f_min1=2 f_max1=36 f_max=42 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs > j2.H
	Math file1=j2.H exp="file1*0">j1.H;Cmplx j2.H j1.H|Transp plane=13 > const.11111.H
	Math file1=twin.vel.H exp="file1*0+1/3000"|Pad extend=1 end1=200 end2=1000 beg2=1000|Transp plane=12 reshape=1,3> const.vel.H
	Window3d squeeze=n n4=1 f4=50 < const.kirchhoff.H > cc.H
	./bin/OWmig2d_areal.x sou=const.11111.H rec=const.kirchhoff.H \
	vel=const.vel.H bkgimg=const.bkim.H \
	zmin=0 zmax=1500 nh=81 oh=-800. jh=2 migration=1 areal=0 \
	padtraces=0 traces_in_taper=50 node=14 extrapolator=ffd > /dev/null

const.Dslow.r4.H:
	Math file1=twin.vel.H exp="file1*0+1/1900"|Pad extend=1 end1=200 end2=1000 beg2=1000|Transp plane=12 reshape=1,3> const.vel.H
	< const.crec1.H Transp plane=35 | Transf maxsize=1000 | Window3d | Mute tmute=1.55 vmute=2000 > x.H
	< const.crec1.H Transp plane=35 | Transf maxsize=1000 | Window3d > z.H
	Math file1=z.H file2=x.H exp="file1-file2"|Transp plane=34|Transf f_min=0 f_min1=2 f_max1=36 f_max=42 wei=y is2d=y \
	maxsize=1000 |Transp plane=35>y.H;echo d3=0.332889 >> y.H
	./bin/OWmig2d_areal.x sou=const.11111.H rec=y.H vel=const.vel.H bkgimg=const.bkim4.H zmin=0 zmax=3000 nh=81 oh=-400. jh=1 \
	migration=1 areal=0 padtraces=100 traces_in_taper=100 node=14 extrapolator=ffd > /dev/null
	< const.bkim4.H ./bin/OW_dso.x > const.dkim0.H
	Wavelet n1=751 d1=0.004 wavelet=ricker2 phase=0 fund=15 order=0.2 tdelay=1.5 domain=time > j2.H;echo o1=-1.5 >> j2.H
	<j2.H Transf f_min=0 f_min1=2 f_max1=36 f_max=42 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs > j2.H
	Math file1=j2.H exp="file1*0">j1.H;Cmplx j2.H j1.H|Transp plane=13 > const.11111.H
	../Tese/bin/OWwemva_opers.x sou=const.11111.H rec=y.H vel=const.vel.H deltaI=const.dkim0.H nh=81 oh=-400. jh=1 \
	zmin=0 zmax=3000 adj=1 extrapolator=ffd areal=0 padtraces=100 traces_in_taper=100 node=14 > $@

const.Dslow.rall.H:
	Math file1=twin.vel.H exp="file1*0+1/3800"|Pad extend=1 end1=200 end2=1000 beg2=1000|Transp plane=12 reshape=1,3> const.vel.H
	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=2 f_max1=36 f_max=42 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs > j2.H
	Math file1=j2.H exp="file1*0">j1.H;Cmplx j2.H j1.H|Transp plane=13 > const.11111.H
	./bin/OWmig2d_areal.x sou=const.11111.H rec=const.kirchhoff.H vel=const.vel.H bkgimg=const.bkim.rall.H zmin=0 zmax=3000 nh=41 oh=-200. jh=1 \
	migration=1 areal=0 padtraces=100 traces_in_taper=100 node=14 extrapolator=ffd > /dev/null
	< const.bkim.rall.H ./bin/OW_dso.x > const.dkim0.H
	../Tese/bin/OWwemva_opers.x sou=const.11111.H rec=const.kirchhoff.H vel=const.vel.H deltaI=const.dkim0.H  \
	nh=41 oh=-200. jh=1 zmin=0 zmax=3000 adj=1 extrapolator=ffd areal=0 padtraces=100 traces_in_taper=100 node=14 > $@

constinvright: # no zweight
	Wavelet n1=501 d1=0.004 wavelet=ricker2 phase=0 fund=20 order=0.2 tdelay=1 domain=time > j2.H;echo o1=-1 >> j2.H
	<j2.H Transf f_min=0 f_min1=2 f_max1=40 f_max=46 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs > j2.H
	Math file1=j2.H exp="file1*0">j1.H;Cmplx j2.H j1.H|Transp plane=13|Window3d squeeze=n f3=1 > const.11111.H
	Math file1=twin.vel.H exp="file1*0+1/3000" | Transp plane=12 reshape=1,3 | Pad extend=1 end3=200 > const.slol.H
	../Tese/bin/OW_lbfgsc_areal.x sou=const.11111.H rec=const.1.born.H  \
	vel=const.slol.H grad=const.inv_gradri.H \
	Dimage=const.inv_dsori.H bkgimg=const.inv_bkimri.H Velout=const.inv_voutri.H \
	zmin=0 zmax=1000 nh=61 oh=-300 jh=1 niter=1 2 dso=1 inversion=1 areal=0 zweight=0 \
	dxk= 240 nxk= 126 oxk= -10800 dzk= 16 nzk= 188 log=log_bfgs_constri list=listagem_bfgs_constri \
	padtraces=50 traces_in_taper=25 damp=25000 node=14 bounds=1 vmin=2000 vmax=4000 vsal=7000 nrefvel=4 > /dev/null &
#	dws=const.inv_gradhri.s_conv.H dwr=const.inv_gradhlo.r_conv.H \
#	ddws=const.inv_gradhlo.s_perturbed.H ddwr=const.inv_gradhlo.r_perturbed.H \
#	ddwsz=const.inv_gradhlo.s_scattered.H ddwrz=const.inv_gradhlo.r_scattered.H \

constmighi:
	Wavelet n1=1001 d1=0.004 wavelet=ricker2 phase=0 fund=20 order=0.2 tdelay=2 domain=time > j2.H;echo o1=-2 >> j2.H
	<j2.H Transf f_min=0 f_min1=2 f_max1=40 f_max=46 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs > j2.H
	Math file1=j2.H exp="file1*0">j1.H;Cmplx j2.H j1.H|Transp plane=13|Window3d squeeze=n f3=1 > const.11111.H
	Math file1=twin.vel.H exp="file1*0+1/1300" | Transp plane=12 reshape=1,3 | Pad extend=1 end3=200 > const.slol.H
	Window3d < 1.H squeeze=n n4=1 > x1.H 
	../Tese/bin/OWmig2d_areal.x sou=const.11111.H rec=x1.H const.1.born.H vel=const.slol.H bkgimg=const.bkimhi.H \
	zmin=0 zmax=1800 nh=1 61 oh=0 -300 jh= 1 migration=1 areal=0 light=1 illum=const.miglo.illum.H \
	padtraces=0 traces_in_taper=125 node=14 vsal=7000 nrefvel=4 > /dev/null

constmiglo:
	Wavelet n1=1001 d1=0.004 wavelet=ricker2 phase=0 fund=20 order=0.2 tdelay=2 domain=time > j2.H;echo o1=-2 >> j2.H
	<j2.H Transf f_min=0 f_min1=2 f_max1=40 f_max=46 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs > j2.H
	Math file1=j2.H exp="file1*0">j1.H;Cmplx j2.H j1.H|Transp plane=13|Window3d squeeze=n f3=1 > const.11111.H
	Math file1=twin.vel.H exp="file1*0+1/1300" | Transp plane=12 reshape=1,3 | Pad extend=1 end3=200 > const.slol.H
	../Tese/bin/OWmig2d_areal.x sou=const.11111.H rec=const.1.born.H vel=const.slol.H bkgimg=const.inv_bkimlo.H \
	zmin=0 zmax=1500 nh=1 61 oh=0 -300 jh= 1 migration=1 areal=0 light=1 illum=const.mighi.illum.H \
	padtraces=0 traces_in_taper=125 node=14 vsal=7000 nrefvel=4 > /dev/null

constinvri: # no zweight
	Wavelet n1=1001 d1=0.004 wavelet=ricker2 phase=0 fund=20 order=0.2 tdelay=2 domain=time > j2.H;echo o1=-2 >> j2.H
	<j2.H Transf f_min=0 f_min1=2 f_max1=40 f_max=46 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs > j2.H
	Math file1=j2.H exp="file1*0">j1.H;Cmplx j2.H j1.H|Transp plane=13|Window3d squeeze=n f3=1 > const.11111.H
	Math file1=twin.vel.H exp="file1*0+1/1500" | Transp plane=12 reshape=1,3 | Pad extend=1 end3=200 > const.slor.H
	Window3d < const.1.born.H squeeze=n j4=4 min1=-3000 n1=601 > x1.H 
	../Tese/bin/OW_lbfgsc_areal.x sou=const.11111.H rec=x1.H \
	vel=const.slor.H grad=const.inv_gradri.H \
	Dimage=const.inv_dsori.H bkgimg=const.inv_bkimri.H Velout=const.inv_voutri.H \
	zmin=0 zmax=1700 nh=61 oh=-300 jh= 1 niter=1 2 dso=1 inversion=1 areal=0 zweight=0 \
	dxk= 240 nxk= 126 oxk= -10800 dzk= 16 nzk= 188 log=log_bfgs_constri list=listagem_bfgs_constri \
	padtraces=50 traces_in_taper=25 damp=25000 node=16 bounds=1 vmin=1000 vmax=2000 vsal=7000 nrefvel=4 > /dev/null
#	dws=const.inv_gradhlo.s_conv.H dwr=const.inv_gradhlo.r_conv.H \
#	ddws=const.inv_gradhlo.s_perturbed.H ddwr=const.inv_gradhlo.r_perturbed.H \
#	ddwsz=const.inv_gradhlo.s_scattered.H ddwrz=const.inv_gradhlo.r_scattered.H \

constinvlo: # no zweight
	Wavelet n1=1001 d1=0.004 wavelet=ricker2 phase=0 fund=20 order=0.2 tdelay=2 domain=time > j2.H;echo o1=-2 >> j2.H
	<j2.H Transf f_min=0 f_min1=2 f_max1=40 f_max=46 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs > j2.H
	Math file1=j2.H exp="file1*0">j1.H;Cmplx j2.H j1.H|Transp plane=13|Window3d squeeze=n f3=1 > const.11111.H
	Math file1=twin.vel.H exp="file1*0+1/1300" | Transp plane=12 reshape=1,3 | Pad extend=1 end3=200 > const.slol.H
	Window3d < const.1.born.H squeeze=n j4=4 min1=-3000 n1=601 > x1.H 
	../Tese/bin/OW_lbfgsc_areal.x sou=const.11111.H rec=x1.H \
	vel=const.slol.H grad=const.inv_gradlo.H \
	Dimage=const.inv_dsolo.H bkgimg=const.inv_bkimlo.H Velout=const.inv_voutlo.H \
	zmin=0 zmax=1700 nh=61 oh=-300 jh= 1 niter=1 2 dso=1 inversion=1 areal=0 zweight=0 \
	dxk= 240 nxk= 126 oxk= -10800 dzk= 16 nzk= 188 log=log_bfgs_constlo list=listagem_bfgs_constlo \
	padtraces=50 traces_in_taper=25 damp=25000 node=16 bounds=1 vmin=1000 vmax=2000 vsal=7000 nrefvel=4 > /dev/null
#	dws=const.inv_gradhlo.s_conv.H dwr=const.inv_gradhlo.r_conv.H \
#	ddws=const.inv_gradhlo.s_perturbed.H ddwr=const.inv_gradhlo.r_perturbed.H \
#	ddwsz=const.inv_gradhlo.s_scattered.H ddwrz=const.inv_gradhlo.r_scattered.H \


constinvhi: # no zweight
	Wavelet n1=1001 d1=0.004 wavelet=ricker2 phase=0 fund=20 order=0.2 tdelay=2 domain=time > j2.H;echo o1=-2 >> j2.H
	<j2.H Transf f_min=0 f_min1=2 f_max1=40 f_max=46 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs > j2.H
	Math file1=j2.H exp="file1*0">j1.H;Cmplx j2.H j1.H|Transp plane=13|Window3d squeeze=n f3=1 > const.11111.H
	Math file1=twin.vel.H exp="file1*0+1/1700" | Transp plane=12 reshape=1,3 | Pad extend=1 end3=200 > const.sloh.H
	Window3d < const.1.born.H squeeze=n j4=4 min1=-3000 n1=601 > x1.H 
	../Tese/bin/OW_lbfgsc_areal.x sou=const.11111.H rec=x1.H const.1.born.H  \
	vel=const.sloh.H grad=const.inv_gradhi.H \
	Dimage=const.inv_dsohi.H bkgimg=const.inv_bkimhi.H Velout=const.inv_vouthi.H \
	zmin=0 zmax=1700 nh=61 oh=-300 jh= 1 niter=1 2 dso=1 inversion=1 areal=0 zweight=0 \
	dxk= 240 nxk= 126 oxk= -10800 dzk= 16 nzk= 188 log=log_bfgs_consthi list=listagem_bfgs_consthi \
	padtraces=50 traces_in_taper=25 damp=25000 node=16 bounds=1 vmin=1000 vmax=2000 vsal=7000 nrefvel=4 > /dev/null
#	dws=const.inv_gradhhi.s_conv.H dwr=const.inv_gradhhi.r_conv.H \
#	ddws=const.inv_gradhhi.s_perturbed.H ddwr=const.inv_gradhhi.r_perturbed.H \
#	ddwsz=const.inv_gradhhi.s_scattered.H ddwrz=const.inv_gradhhi.r_scattered.H \

constinvlo1: # no zweight
	Wavelet n1=1001 d1=0.004 wavelet=ricker2 phase=0 fund=20 order=0.2 tdelay=2 domain=time > j2.H;echo o1=-2 >> j2.H
	<j2.H Transf f_min=0 f_min1=2 f_max1=40 f_max=46 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs > j2.H
	Math file1=j2.H exp="file1*0">j1.H;Cmplx j2.H j1.H|Transp plane=13|Window3d squeeze=n f3=1 > const.11111.H
	Math file1=twin.vel.H exp="file1*0+1/1470" | Transp plane=12 reshape=1,3 | Pad extend=1 end3=200 > const.slol.H
	Window3d < const.1.born.H squeeze=n j4=4 min1=-3000 n1=601 > x1.H 
	../Tese/bin/OW_lbfgsc_areal.x sou=const.11111.H rec=x1.H \
	vel=const.slol.H grad=const.inv_gradlo1.H \
	Dimage=const.inv_dsolo1.H bkgimg=const.inv_bkimlo1.H Velout=const.inv_voutlo1.H \
	zmin=0 zmax=1700 nh=61 oh=-300 jh= 1 niter=1 2 dso=1 inversion=1 areal=0 zweight=0 \
	dxk= 240 nxk= 126 oxk= -10800 dzk= 16 nzk= 188 log=log_bfgs_constlo1 list=listagem_bfgs_constlo1 \
	padtraces=50 traces_in_taper=25 damp=25000 node=16 bounds=1 vmin=1000 vmax=2000 vsal=7000 nrefvel=4 > /dev/null
#	dws=const.inv_gradhlo.s_conv.H dwr=const.inv_gradhlo.r_conv.H \
#	ddws=const.inv_gradhlo.s_perturbed.H ddwr=const.inv_gradhlo.r_perturbed.H \
#	ddwsz=const.inv_gradhlo.s_scattered.H ddwrz=const.inv_gradhlo.r_scattered.H \


constinvhi1: # no zweight
	Wavelet n1=1001 d1=0.004 wavelet=ricker2 phase=0 fund=20 order=0.2 tdelay=2 domain=time > j2.H;echo o1=-2 >> j2.H
	<j2.H Transf f_min=0 f_min1=2 f_max1=40 f_max=46 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs > j2.H
	Math file1=j2.H exp="file1*0">j1.H;Cmplx j2.H j1.H|Transp plane=13|Window3d squeeze=n f3=1 > const.11111.H
	Math file1=twin.vel.H exp="file1*0+1/1530" | Transp plane=12 reshape=1,3 | Pad extend=1 end3=200 > const.sloh.H
	Window3d < const.1.born.H squeeze=n j4=4 min1=-3000 n1=601 > x1.H 
	../Tese/bin/OW_lbfgsc_areal.x sou=const.11111.H rec=x1.H const.1.born.H  \
	vel=const.sloh.H grad=const.inv_gradhi1.H \
	Dimage=const.inv_dsohi1.H bkgimg=const.inv_bkimhi1.H Velout=const.inv_vouthi1.H \
	zmin=0 zmax=1700 nh=61 oh=-300 jh= 1 niter=1 2 dso=1 inversion=1 areal=0 zweight=0 \
	dxk= 240 nxk= 126 oxk= -10800 dzk= 16 nzk= 188 log=log_bfgs_consthi list=listagem_bfgs_consthi \
	padtraces=50 traces_in_taper=25 damp=25000 node=16 bounds=1 vmin=1000 vmax=2000 vsal=7000 nrefvel=4 > /dev/null
#	dws=const.inv_gradhhi.s_conv.H dwr=const.inv_gradhhi.r_conv.H \
#	ddws=const.inv_gradhhi.s_perturbed.H ddwr=const.inv_gradhhi.r_perturbed.H \
#	ddwsz=const.inv_gradhhi.s_scattered.H ddwrz=const.inv_gradhhi.r_scattered.H \

const.Dslow.lo.H:
	Math file1=const.vel.H exp="1/file1-1/1300" | Transp plane=12 reshape=1,3 > $@

const.Dimag.lo.H:
	Wavelet n1=1001 d1=0.004 wavelet=ricker2 phase=0 fund=20 order=0.2 tdelay=2 domain=time > j2.H;echo o1=-2 >> j2.H
	<j2.H Transf f_min=0 f_min1=2 f_max1=40 f_max=46 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs > j2.H
	Math file1=j2.H exp="file1*0">j1.H;Cmplx j2.H j1.H|Transp plane=13|Window3d squeeze=n f3=1 > const.11111.H
	Math file1=twin.vel.H exp="file1*0+1/1300" | Transp plane=12 reshape=1,3 | Pad extend=1 end3=200 > const.slol.H
	Window3d < const.1.born.H squeeze=n j4=4 min1=-3000 n1=601 > x1.H 
	../Tese/bin/OWwemva_opers.x sou=const.11111.H rec=x1.H const.1.born.H \
	vel=const.slol.H vsal=7000 nrefvel=4 deltaS=const.Dslow.lo.H \
	nh=61 oh=-300. dh=10 zmin=0 zmax=1700 adj=0 vsal=7000 nrefvel=1 \
	areal=0 padtraces=25 traces_in_taper=50 node=16 > $@ 

const.Dslow1.lo.pert.H:
	Wavelet n1=1001 d1=0.004 wavelet=ricker2 phase=0 fund=20 order=0.2 tdelay=2 domain=time > j2.H;echo o1=-2 >> j2.H
	<j2.H Transf f_min=0 f_min1=2 f_max1=40 f_max=46 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs > j2.H
	Math file1=j2.H exp="file1*0">j1.H;Cmplx j2.H j1.H|Transp plane=13|Window3d squeeze=n f3=1 > const.11111.H
	Math file1=twin.vel.H exp="file1*0+1/1300" | Transp plane=12 reshape=1,3 | Pad extend=1 end3=200 > const.slol.H
	Window3d < const.1.born.H squeeze=n j4=4 min1=-3000 n1=601 > x1.H 
	../Tese/bin/OWwemva_opers.x sou=const.11111.H rec=x1.H const.1.born.H \
	vel=const.slol.H vsal=7000 nrefvel=4 deltaI=const.Dimag.lo.H  \
	nh=61 oh=-300. dh=10 zmin=0 zmax=1700 adj=1 vsal=7000 nrefvel=1 \
	areal=0 padtraces=25 traces_in_taper=50 node=16 > $@
#	dws= const.adj_gradhlo.s_conv.H dwr= const.adj_gradhlo.r_conv.H \
#	ddws=const.adj_gradhlo.s_perturbed.H ddwr=const.adj_gradhlo.r_perturbed.H \
#	ddwsz=const.adj_gradhlo.s_scattered.H ddwrz=const.adj_gradhlo.r_scattered.H > $@ 

const.Dslow1.lo.dso.H:
	Wavelet n1=1001 d1=0.004 wavelet=ricker2 phase=0 fund=20 order=0.2 tdelay=2 domain=time > j2.H;echo o1=-2 >> j2.H
	<j2.H Transf f_min=0 f_min1=2 f_max1=40 f_max=46 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs > j2.H
	Math file1=j2.H exp="file1*0">j1.H;Cmplx j2.H j1.H|Transp plane=13|Window3d squeeze=n f3=1 > const.11111.H
	Math file1=twin.vel.H exp="file1*0+1/1300" | Transp plane=12 reshape=1,3 | Pad extend=1 end3=200 > const.slol.H
	Window3d < const.1.born.H squeeze=n j4=4 min1=-3000 n1=601 > x1.H 
	../Tese/bin/OWwemva_opers.x sou=const.11111.H rec=x1.H const.1.born.H \
	vel=const.slol.H vsal=7000 nrefvel=4 deltaI=const.inv_dsolo.H \
	nh=61 oh=-300. dh=10 zmin=0 zmax=1700 adj=1 vsal=7000 nrefvel=1 \
	areal=0 padtraces=25 traces_in_taper=50 node=16 > $@

const.Dimag.lo0.H:
	Math file1=twin.vel.H exp="1/(file1*0+2700)" | Pad extend=1 end1=200 | Transp plane=12 reshape=1,3 > const.bslo.H
	Wavelet n1=501 d1=0.004 wavelet=ricker2 phase=0 fund=20 order=0.2 tdelay=1 domain=time > j2.H;echo o1=-1 >> j2.H
	<j2.H Transf f_min=0 f_min1=2 f_max1=40 f_max=46 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs > j2.H
	Math file1=j2.H exp="file1*0">j1.H;Cmplx j2.H j1.H|Transp plane=13|Window3d squeeze=n f3=1 > const.11111.H
	Window3d < const.1.born.H squeeze=n n4=1 min4=0 > x1.H
	../Tese/bin/OWwemva_opers.x sou=const.11111.H rec=const.1.born.H  \
	vel=const.bslo.H vsal=7000 nrefvel=4 deltaS=const.Dslow.lo.H \
	nh=121 oh=-600. dh=10 zmin=0 zmax=1000 adj=0 vsal=7000 nrefvel=1 \
	areal=0 padtraces=25 traces_in_taper=50 node=16 > $@ 

const.Dslow1.lo0.H:
	Math file1=twin.vel.H exp="1/(file1*0+2700)" | Pad extend=1 end1=200 | Transp plane=12 reshape=1,3 > const.bslo.H
	Wavelet n1=501 d1=0.004 wavelet=ricker2 phase=0 fund=20 order=0.2 tdelay=1 domain=time > j2.H;echo o1=-1 >> j2.H
	<j2.H Transf f_min=0 f_min1=2 f_max1=40 f_max=46 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs > j2.H
	Math file1=j2.H exp="file1*0">j1.H;Cmplx j2.H j1.H|Transp plane=13|Window3d squeeze=n f3=1 > const.11111.H
	Window3d < const.1.born.H squeeze=n n4=1 min4=0 > x1.H
	../Tese/bin/OWwemva_opers.x sou=const.11111.H rec=const.1.born.H  \
	vel=const.bslo.H vsal=7000 nrefvel=4 deltaI=const.Dimag.lo.H \
	nh=121 oh=-600. dh=10 zmin=0 zmax=1000 adj=1 vsal=7000 nrefvel=1 \
	areal=0 padtraces=25 traces_in_taper=50 node=16 > $@ 

const.Dslow.hi.H:
	Math file1=const.vel.H exp="1/file1-1/1700" | Transp plane=12 reshape=1,3 > $@

const.Dimag.hi.H:
	Wavelet n1=1001 d1=0.004 wavelet=ricker2 phase=0 fund=20 order=0.2 tdelay=2 domain=time > j2.H;echo o1=-2 >> j2.H
	<j2.H Transf f_min=0 f_min1=2 f_max1=40 f_max=46 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs > j2.H
	Math file1=j2.H exp="file1*0">j1.H;Cmplx j2.H j1.H|Transp plane=13|Window3d squeeze=n f3=1 > const.11111.H
	Math file1=twin.vel.H exp="file1*0+1/1700" | Transp plane=12 reshape=1,3 | Pad extend=1 end3=200 > const.sloh.H
	Window3d < const.1.born.H squeeze=n j4=4 min1=-3000 n1=601 > x1.H 
	../Tese/bin/OWwemva_opers.x sou=const.11111.H rec=x1.H const.1.born.H \
	vel=const.sloh.H vsal=7000 nrefvel=4 deltaS=const.Dslow.hi.H \
	nh=61 oh=-300. dh=10 zmin=0 zmax=1700 adj=0 vsal=7000 nrefvel=1 \
	areal=0 padtraces=25 traces_in_taper=50 node=16 > $@ 

const.Dslow1.hi.pert.H:
	Wavelet n1=1001 d1=0.004 wavelet=ricker2 phase=0 fund=20 order=0.2 tdelay=2 domain=time > j2.H;echo o1=-2 >> j2.H
	<j2.H Transf f_min=0 f_min1=2 f_max1=40 f_max=46 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs > j2.H
	Math file1=j2.H exp="file1*0">j1.H;Cmplx j2.H j1.H|Transp plane=13|Window3d squeeze=n f3=1 > const.11111.H
	Math file1=twin.vel.H exp="file1*0+1/1700" | Transp plane=12 reshape=1,3 | Pad extend=1 end3=200 > const.sloh.H
	Window3d < const.1.born.H squeeze=n j4=4 min1=-3000 n1=601 > x1.H 
	../Tese/bin/OWwemva_opers.x sou=const.11111.H rec=x1.H const.1.born.H \
	vel=const.sloh.H vsal=7000 nrefvel=4 deltaI=const.Dimag.hi.H \
	nh=61 oh=-300. dh=10 zmin=0 zmax=1700 adj=1 vsal=7000 nrefvel=1 \
	areal=0 padtraces=25 traces_in_taper=50 node=16 > $@ 

const.Dslow1.hi.dso.H:
	Wavelet n1=1001 d1=0.004 wavelet=ricker2 phase=0 fund=20 order=0.2 tdelay=2 domain=time > j2.H;echo o1=-2 >> j2.H
	<j2.H Transf f_min=0 f_min1=2 f_max1=40 f_max=46 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs > j2.H
	Math file1=j2.H exp="file1*0">j1.H;Cmplx j2.H j1.H|Transp plane=13|Window3d squeeze=n f3=1 > const.11111.H
	Math file1=twin.vel.H exp="file1*0+1/1700" | Transp plane=12 reshape=1,3 | Pad extend=1 end3=200 > const.sloh.H
	Window3d < const.1.born.H squeeze=n j4=4 min1=-3000 n1=601 > x1.H 
	../Tese/bin/OWwemva_opers.x sou=const.11111.H rec=x1.H const.1.born.H \
	vel=const.sloh.H vsal=7000 nrefvel=4 deltaI=const.inv_dsohi.H \
	nh=61 oh=-300. dh=10 zmin=0 zmax=1700 adj=1 vsal=7000 nrefvel=1 \
	areal=0 padtraces=25 traces_in_taper=50 node=16 > $@ 

const.Dimag.hi0.H:
	Math file1=twin.vel.H exp="1/(file1*0+3300)" | Pad extend=1 end1=200 | Transp plane=12 reshape=1,3 > const.bslo.H
	Wavelet n1=501 d1=0.004 wavelet=ricker2 phase=0 fund=20 order=0.2 tdelay=1 domain=time > j2.H;echo o1=-1 >> j2.H
	<j2.H Transf f_min=0 f_min1=2 f_max1=40 f_max=46 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs > j2.H
	Math file1=j2.H exp="file1*0">j1.H;Cmplx j2.H j1.H|Transp plane=13|Window3d squeeze=n f3=1 > const.11111.H
	Window3d < const.1.born.H squeeze=n n4=1 min4=0 min1=2000 n1=1 | Pad beg1=602 end1=202 > x1.H
	../Tese/bin/OWwemva_opers.x sou=const.11111.H rec=x1.H const.1.born.H  \
	vel=const.bslo.H vsal=7000 nrefvel=4 deltaS=const.Dslow.hi.H \
	nh=61 oh=-300. dh=10 zmin=0 zmax=1000 adj=0 vsal=7000 nrefvel=1 \
	areal=0 padtraces=25 traces_in_taper=50 node=16 > $@ 

const.Dslow1.hi0.H:
	Math file1=twin.vel.H exp="1/(file1*0+2700)" | Pad extend=1 end1=200 | Transp plane=12 reshape=1,3 > const.bslo.H
	Wavelet n1=501 d1=0.004 wavelet=ricker2 phase=0 fund=20 order=0.2 tdelay=1 domain=time > j2.H;echo o1=-1 >> j2.H
	<j2.H Transf f_min=0 f_min1=2 f_max1=40 f_max=46 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs > j2.H
	Math file1=j2.H exp="file1*0">j1.H;Cmplx j2.H j1.H|Transp plane=13|Window3d squeeze=n f3=1 > const.11111.H
	Window3d < const.1.born.H squeeze=n n4=1 min4=0 min1=2000 n1=1 | Pad beg1=602 end1=202 > x1.H
	../Tese/bin/OWwemva_opers.x sou=const.11111.H rec=x1.H const.1.born.H  \
	vel=const.bslo.H vsal=7000 nrefvel=4 deltaI=const.Dimag.hi0.H \
	nh=61 oh=-300. dh=10 zmin=0 zmax=1000 adj=1 vsal=7000 nrefvel=1 \
	areal=0 padtraces=25 traces_in_taper=50 node=16 > $@ 

###################			nh=41 oh=-200. dh=10.
#
# Time shift img.cond
#
constmigtt:
	Wavelet n1=1001 d1=0.004 wavelet=ricker2 phase=0 fund=20 order=0.2 tdelay=2 domain=time > j2.H;echo o1=-2 >> j2.H
	<j2.H Transf f_min=0 f_min1=2 f_max1=40 f_max=46 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs > j2.H
	Math file1=j2.H exp="file1*0">j1.H;Cmplx j2.H j1.H|Transp plane=13|Window3d squeeze=n f3=1 > const.11111.H
	Math file1=twin.vel.H exp="1/(file1*0+1425)" | Pad extend=1 end1=200 | Transp plane=12 reshape=1,3 > const.bslo.H
	../Tese/bin/OWmig2d_areal.x rec=const.1.born.H sou=const.11111.H \
	vel=const.bslo.H bkgimg=const.bkim.tt.H migration=1 \
	zmin=0 zmax=1700 areal=0 \
	timeshift=1 nth=81 oth=-.32 dth=0.008 \
	padtraces=25 traces_in_taper=25 node=16 vsal=3000 nrefvel=1 > /dev/null

const2ang:
	Window3d < const.bkim.tt.H squeeze=n min1=-2000 max1=2000 > xxx.H
	Math file1=twin.vel.H exp="1/(file1*0+1425)" | Pad extend=1 end1=200 | Transp plane=12 reshape=1,3 > const.bslo.H
	./bin/OW_time2offset.x R_image=xxx.H B_image=const.tim2off.H vel=const.bslo.H \
	adj=1 node=16 nah=41 oah=-40. dah=2. nxw=21 nax=1 11 dax=1 oax=0 -5 > /dev/null

resmigtt:
	Window3d < const.bkim.tt.H min1=-2000 max1=2000 |Pad beg1=100 end1=100 beg2=50 end2=50 end3=100 > const.xx.H
	./bin/OW_resmig.x bkgimg=const.xx.H Dimage=const.dimg.tt.H s0=.0007017543859 rho=1.05263157894 resmigtau=1 > /dev/null

resmighh:
	Window3d min1=-2000 max1=2000 < const.inv_bkimlo.H |Pad beg1=100 end1=100 beg2=50 end2=50 end3=100 > const.xx.H
	./bin/OW_resmig.x bkgimg=const.xx.H Dimage=const.dimg.hh.H s0=.0007692307692 rho=1.15384615384615 resmig=1 > /dev/null

const.inv_dsoout.tt.H:
	< const.bkim.tt.H Transp plane=13 | Gpow gpow=2 | Gpow gpow=0.5 | Scale scale_to=1 axis=3 > x1.H
	<x1.H Smooth rect1=35 rect2=1 rect3=1|Scale scale_to=1|Clip clip=.5 chop=greater to=1|Clip clip=0.5 chop=less to=0 >x2.H
	< const.bkim.hh.H Transp plane=13 > x3.H
	Math file1=x2.H file2=x3.H exp="file1*file2" | Transp plane=13 > $@

constinvtt: # without zweight
	Wavelet n1=1001 d1=0.004 wavelet=ricker2 phase=0 fund=20 order=0.2 tdelay=2 domain=time > j2.H;echo o1=-2 >> j2.H
	<j2.H Transf f_min=0 f_min1=2 f_max1=40 f_max=46 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs > j2.H
	Math file1=j2.H exp="file1*0">j1.H;Cmplx j2.H j1.H|Transp plane=13|Window3d squeeze=n f3=1 > const.11111.H
	Math file1=twin.vel.H exp="1/(file1*0+1300)" | Pad extend=1 end1=200 | Transp plane=12 reshape=1,3 > const.bslo.H
	../Tese/bin/OW_gradiente.x rec=const.1.born.H sou=const.11111.H \
	vel=const.bslo.H grad=const.inv_gradtt.H dsout=const.inv_dsoout.tt.H Velout=const.inv_vouttt.H \
	zmin=0 zmax=1700 niter=2 dso=1 inversion=1 areal=0 zweight=0 \
	timeshift=1 nth=81 oth=-.32 dth=0.008 thresh=0.8 \
	dxk= 100 nxk= 13 195 oxk= -4600 -9720 dzk= 10 nzk= 200 log=log_bfgs_consttt list=listagem_bfgs_consttt \
	padtraces=25 traces_in_taper=25 damp=20000 node=16 bounds=1 vmin=1000 vmax=3000 vsal=3500 nrefvel=4 > /dev/null

const.inv_dsoout.tt0.H:
	< const.bkim.hh0.H Transp plane=13 | Gpow gpow=2 | Gpow gpow=0.5 | Scale scale_to=1 axis=3 > x1.H
	<x1.H Smooth rect1=35 rect2=1 rect3=1|Scale scale_to=1|Clip clip=.5 chop=greater to=1|Clip clip=0.5 chop=less to=0 >x2.H
	< const.bkim.hh0.H Transp plane=13 > x3.H
	Math file1=x2.H file2=x3.H exp="file1*file2" | Transp plane=13 > $@

constinvtt0: # without zweight
	Wavelet n1=901 d1=0.004 wavelet=ricker2 phase=0 fund=20 order=0.2 tdelay=1.8 domain=time > j2.H;echo o1=-1.8 >> j2.H
	<j2.H Transf f_min=0 f_min1=2 f_max1=40 f_max=46 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs > j2.H
	Math file1=j2.H exp="file1*0">j1.H;Cmplx j2.H j1.H|Transp plane=13|Window3d squeeze=n n3=148 f3=1 > const.11111.H
	Math file1=circ.vel.H exp="1/(file1*0+1500)" | Pad extend=1 end1=200 | Transp plane=12 reshape=1,3 > const.bslo.H
	../Tese/bin/OW_gradiente.x rec=const.1.born.H sou=const.11111.H \
	vel=const.bslo.H grad=const.inv_grad0tt.H dsout=const.inv_dsoout.tt0.H Velout=const.inv_vout0tt.H \
	zmin=0 zmax=1000 niter=2 dso=1 inversion=1 areal=0 zweight=0 \
	timeshift=1 nth=161 oth=-.32 dth=0.004 thresh=0.8 \
	dxk= 100 nxk= 13 195 oxk= -4600 -9720 dzk= 10 nzk= 200 log=log_bfgs_consttt0 list=listagem_bfgs_consttt0 \
	padtraces=25 traces_in_taper=25 damp=20000 node=16 bounds=1 vmin=1000 vmax=3000 vsal=3500 nrefvel=4 > /dev/null

const.Dimag.tt.H:
	Math file1=circ.vel.H exp="1/(file1*0+2500)" | Pad extend=1 end1=200 | Transp plane=12 reshape=1,3 > const.bslo.H
	Wavelet n1=901 d1=0.004 wavelet=ricker2 phase=0 fund=20 order=0.2 tdelay=1.8 domain=time > j2.H;echo o1=-1.8 >> j2.H
	<j2.H Transf f_min=0 f_min1=2 f_max1=40 f_max=46 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs > j2.H
	Math file1=j2.H exp="file1*0">j1.H;Cmplx j2.H j1.H|Transp plane=13|Window3d squeeze=n n3=148 f3=1 > const.11111.H
	../Tese/bin/OWwemva_opers.x sou=const.11111.H rec=const.1.born.H \
	vel=const.bslo.H vsal=7000 nrefvel=4 deltaS=const.Dslow.H \
	timeshift=1 nth=161 oth=-.32 dth=0.004 zmin=0 zmax=3000 adj=0 \
	areal=0 padtraces=25 traces_in_taper=25 node=16 > $@ 

const.Dslow1.tt.H:
	Math file1=circ.vel.H exp="1/(file1*0+2500)" | Pad extend=1 end1=200 | Transp plane=12 reshape=1,3 > const.bslo.H
	Wavelet n1=901 d1=0.004 wavelet=ricker2 phase=0 fund=20 order=0.2 tdelay=1.8 domain=time > j2.H;echo o1=-1.8 >> j2.H
	<j2.H Transf f_min=0 f_min1=2 f_max1=40 f_max=46 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs > j2.H
	Math file1=j2.H exp="file1*0">j1.H;Cmplx j2.H j1.H|Transp plane=13|Window3d squeeze=n n3=148 f3=1 > const.11111.H
	../Tese/bin/OWwemva_opers.x sou=const.11111.H rec=const.1.born.H \
	vel=const.bslo.H vsal=7000 nrefvel=4 deltaI=const.Dimag.tt.H \
	timeshift=1 nth=161 oth=-.32 dth=0.004 zmin=0 zmax=3000 adj=1 \
	areal=0 padtraces=25 traces_in_taper=25 node=16 > $@ 


##############################################################
#
# Incl.Const.velocity
#
inclmod:
	Vel vc=3000 alfa1=15 z1=100 const1=1 vr1=1000 n2=3001 o2=-15000 d2=10 n1=840 o1=0 d1=10 n3=1 d3=1 o3=0 > z.H
	Wavelet n1=1101 d1=0.004 wavelet=ricker2 phase=0 fund=20 order=0.2 tdelay=2.2 domain=time > j2.H;echo o1=-2.2 >> j2.H
	<j2.H Transf f_min=0 f_min1=2 f_max1=40 f_max=46 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs > j2.H
	Math file1=j2.H exp="file1*0">j1.H;Cmplx j2.H j1.H|Transp plane=13|Window3d squeeze=n n3=202 f3=1 > incl.11111.H
	Math file1=z.H exp="file1*0+2000" > incl.vel.H
	< twin.crec1.H Window3d squeeze=n n4=1 j4= 4 min4=-4000 min1=-3000 max1=3010 > x1.H ; echo o4=-9000 >> x1.H
	< x1.H ../ShtPSPI/bin/OWmod2d_par.x sou=incl.11111.H vel=incl.vel.H \
	vreflect=z.H shots=incl.csou.born.H vsal=3000 nrefvel=1 \
	traces_in_taper=50 padtraces=150 xmin=-15000 xmax=15000 \
	zmin=0 zmax=8390 node=16 > /dev/null

inclmig:
	Wavelet n1=1101 d1=0.004 wavelet=ricker2 phase=0 fund=20 order=0.2 tdelay=2.2 domain=time > j2.H;echo o1=-2.2 >> j2.H
	<j2.H Transf f_min=0 f_min1=2 f_max1=40 f_max=46 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs > j2.H
	Math file1=j2.H exp="file1*0">j1.H;Cmplx j2.H j1.H|Transp plane=13|Window3d squeeze=n n3=202 f3=1 > incl.11111.H
	Math file1=incl.vel.H exp="1/(file1*0+2500)" | Pad extend=1 end1=200 | Transp plane=12 reshape=1,3 > incl.bslo.H
	< incl.csou.born.H ../ShtPSPI/bin/OWmig2d_par.x sou=incl.11111.H \
	vel=incl.vel.H image=incl.bkim.H \
	zmin=0 zmax=6000 \
	nh=81 oh=-400. dh=10 ws=incl.ws.H wr=incl.wr.H \
	padtraces=50 traces_in_taper=50 node=16 vsal=3000 nrefvel=1 > /dev/null


###########################################################
#
# Sep136
#
twolayer.slow.H: #OW_sqrvel.x
	Spike n2=2001 o2=-10000 d2=10 n1=201 o1=0 d1=10 > z.H;Math file1=z.H exp="file1*0+3000" > x.H
	Spike n2=2001 o2=-10000 d2=10 n1=201 o1=0 d1=10 > z.H;Math file1=z.H exp="file1*0+300" | \
	Mute vmute=0 tmute=750 > y.H; Math file1=y.H file2=x.H exp="file1+file2" | Gpow gpow=-1 |\
	Transp plane=12 reshape=1,3 > $@

twolayer.bslow.H:
	Spike n2=2001 o2=-10000 d2=10 n1=201 o1=0 d1=10 > z.H;Math file1=z.H exp="file1*0+3000"| Gpow gpow=-1 |\
	Transp plane=12 reshape=1,3> $@

twolayer.dslow.H: square.slow.%.H square.bslow.H
	Math file1=twolayer.slow.H file2=twolayer.bslow.H exp=file1-file2 > $@

twolayer.csou.H:
	Wavelet n1=1721 d1=0.004 wavelet=ricker2 phase=0 fund=15 order=0.2 tdelay=3.44 domain=time > j2.H;echo o1=-3.44 >> j2.H
	<j2.H Transf f_min=0 f_min1=4 f_max1=32 f_max=37.2 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs |Smooth rect1=7 > j2.H
	Math file1=j2.H exp="file1*0">j1.H;Cmplx j2.H j1.H|Transp plane=13 > $@

twolayer.model:
	Spike n2=2001 o2=-10000 d2=10 n1=201 o1=0 d1=10 > z.H;Math file1=z.H exp="file1*0+2" | \
	Mute vmute=0 tmute=1500 > y.H; Math file1=y.H exp="2-file1/2" > z.H
	Math file1=twolayer.slow.H exp="1/file1" | Window3d | Transp > twolayer.slow.tr.H
	../ShtPSPI/bin/OWmod2d_par.x sou=twolayer.csou.H vel=twolayer.slow.tr.H \
	vreflect=z.H shots=x.H \
	vsal=3500 nrefvel=1 traces_in_taper=50 padtraces=50 xmin=-9500 xmax=9500 \
	nrec=401 orec=-2000 drec=10 nsht=50 osht=-2000 dsht=10 zmin=0 zmax=1700 node=15 > /dev/null
	Cat x.H x.H axis=4 max_memory=1000 >> x.H
	Cat x.H x.H axis=4 max_memory=1000 >> x.H
	Cat x.H x.H axis=4 max_memory=1000 >> x.H
	Cp x.H twolayer.crec.H
	Rm x.H

twolayer.bkim:
	Window3d < twolayer.crec.H j4=4 squeeze=n > xrec.H
	./bin/OWmig2d_areal.x sou=twolayer.csou.H rec=xrec.H vel=twolayer.bslow.H bkgimg=twolayer.bkim.H \
	vsal=3500 nrefvel=1 zmin=0 zmax=2000 nh=41 oh=-200 jh=1 areal=0 migration=1 \
	padtraces=0 traces_in_taper=25 node=15 > /dev/null
	< twolayer.bkim.H ./bin/OW_dso.x > twolayer.dso.H

twolayer.model1:
	Spike n2=2001 o2=-10000 d2=10 n1=201 o1=0 d1=10 > z.H;Math file1=z.H exp="file1*0+2" | \
	Mute vmute=0 tmute=1500 > y.H; Math file1=y.H exp="2-file1/2" > z1.H
	Spike n2=2001 o2=-10000 d2=10 n1=201 o1=0 d1=10 > z.H;Math file1=z.H exp="file1*0+4" | \
	Mute vmute=0 tmute=750 > y.H; Math file1=y.H exp="4-file1" > z2.H;
	Math file1=z1.H file2=z2.H exp=file1+file2 > z.H
	Math file1=twolayer.slow.H exp="1/file1" | Window3d | Transp > twolayer.slow.tr.H
	../ShtPSPI/bin/OWmod2d_par.x sou=twolayer.csou.H vel=twolayer.slow.tr.H \
	vreflect=z.H shots=x.H \
	vsal=3500 nrefvel=1 traces_in_taper=50 padtraces=50 xmin=-9500 xmax=9500 \
	nrec=401 orec=-2000 drec=10 nsht=50 osht=-2000 dsht=10 zmin=0 zmax=1700 node=15 > /dev/null
	Cat x.H x.H axis=4 max_memory=1000 >> x.H
	Cat x.H x.H axis=4 max_memory=1000 >> x.H
	Cat x.H x.H axis=4 max_memory=1000 >> x.H
	Cp x.H twolayer.crec1.H
	Rm x.H

twolayer.bkim1:
	./bin/OWmig2d_areal.x sou=twolayer.csou.H rec=twolayer.crec1.H vel=twolayer.bslow.H bkgimg=twolayer.bkim1.H \
	vsal=3500 nrefvel=1 zmin=0 zmax=2000 nh=41 oh=-200 jh=1 areal=0 migration=1 \
	padtraces=0 traces_in_taper=25 node=15 > /dev/null
	< twolayer.bkim1.H ./bin/OW_dso.x > twolayer.dso.H

twolayer.gold.%:
	Window3d < twolayer.bkim.H squeeze=n min1=-2000 max1=2000 > i1.H
	Window3d < twolayer.bslow.H | Transp|Gpow gpow=-1 > 1.H
	../Tese/bin/OW_arealsht.x rec_cig=i1.H sou_cig=i1.H sou=twolayer.csou.H vel=1.H \
	rec_out=twolayer.crec.gold$*.H sou_out=twolayer.csou.gold$*.H nrefvel=1 vsal=3500 \
	padtraces=0 traces_in_taper=60 encode=1 encz=0 eps=1 gold=1 injection=1 nreal=1 \
	ws=twolayer.gold.ws0.H wr=twolayer.gold.wr0.H \
	ngap=$* zmin=0 zmax=2000 node=14 > /dev/null 

twolayer.bkim.gold%:
	< twolayer.csou.gold$*.H Window3d squeeze=n n4= 1 | Transp plane=13 > s1.H
	< twolayer.crec.gold$*.H Window3d squeeze=n n4= 1 | Transp plane=13 > r1.H
	./bin/OWmig2d_areal.x sou=s1.H rec=r1.H vel=twolayer.bslow.H bkgimg=twolayer.bkim.gold$*.H \
	vsal=3500 nrefvel=1 zmin=0 zmax=2000 nh=41 oh=-200 jh=1 areal=1 migration=1 \
	padtraces=0 traces_in_taper=25 node=14 > /dev/null

twolayer.dso.gold%.H:
	< twolayer.bkim.gold$*.H ./bin/OW_dso.x > $@

twolayer.rand.%:
	Window3d < twolayer.bkim.H squeeze=n min1=-2000 max1=2000 > i1.H
	Window3d < twolayer.bslow.H | Transp|Gpow gpow=-1 > 1.H
	../Tese/bin/OW_arealsht.x rec_cig=i1.H sou_cig=i1.H sou=twolayer.csou.H vel=1.H \
	rec_out=twolayer.crec.rand$*.H sou_out=twolayer.csou.rand$*.H nrefvel=1 vsal=3500 \
	padtraces=0 traces_in_taper=60 encode=1 encw=1 eps=1 random=1 injection=1 nreal=1 \
	ngap=$* zmin=0 zmax=2000 node=14 > /dev/null 

twolayer.bkim.rand%:
	< twolayer.csou.rand$*.H Window3d squeeze=n n4= 1 | Transp plane=13 > s1.H
	< twolayer.crec.rand$*.H Window3d squeeze=n n4= 1 | Transp plane=13 > r1.H
	./bin/OWmig2d_areal.x sou=s1.H rec=r1.H vel=twolayer.bslow.H bkgimg=twolayer.bkim.rand$*.H \
	vsal=3500 nrefvel=1 zmin=0 zmax=2000 nh=41 oh=-200 jh=1 areal=1 migration=1 \
	padtraces=0 traces_in_taper=25 node=14 > /dev/null

twolayer.dso.rand%.H:
	< twolayer.bkim.rand$*.H ./bin/OW_dso.x > $@

twolayer.Dimag_0.H: 
	../Tese/bin/OWwemva_opers.x sou=twolayer.csou.H rec=twolayer.crec1.H \
	vel=twolayer.bslow.H vsal=3500 nrefvel=1 deltaS=twolayer.dslow.H \
	zmin=0 zmax=2000 nh=41 oh=-200 jh=1 adj=0 areal=0 \
	padtraces=0 traces_in_taper=25 node=14 > $@ 

twolayer.Dslow_0.H: #square.bslow.H square.dslow.%.H square.csou.H square.crec.%.H square.Dimag.%.H #OWwemva_opers.x 
	../Tese/bin/OWwemva_opers.x sou=twolayer.csou.H rec=twolayer.crec1.H \
	vel=twolayer.bslow.H vsal=3500 nrefvel=1 deltaI=twolayer.Dimag_0.H \
	zmin=0 zmax=2000 nh=41 oh=-200 jh=1 adj=1 areal=0 \
	padtraces=0 traces_in_taper=25 node=14 > $@ 

twolayer.Dimag.gold.%.H: 
	< twolayer.csou.gold$*.H Window3d squeeze=n n4= 1 | Transp plane=13 > s1.H
	< twolayer.crec.gold$*.H Window3d squeeze=n n4= 1 | Transp plane=13 > r1.H
	../Tese/bin/OWwemva_opers.x sou=s1.H rec=r1.H \
	vel=twolayer.bslow.H vsal=3500 nrefvel=1 deltaS=twolayer.dslow.H \
	zmin=0 zmax=2000 nh=41 oh=-200 jh=1 adj=0 areal=1 \
	padtraces=0 traces_in_taper=25 node=14 > $@ 

twolayer.Dslow.gold.%.H: #square.bslow.H square.dslow.%.H square.csou.H square.crec.%.H square.Dimag.%.H #OWwemva_opers.x 
	< twolayer.csou.gold$*.H Window3d squeeze=n n4= 1 | Transp plane=13 > s1.H
	< twolayer.crec.gold$*.H Window3d squeeze=n n4= 1 | Transp plane=13 > r1.H
	../Tese/bin/OWwemva_opers.x sou=s1.H rec=r1.H \
	vel=twolayer.bslow.H vsal=3500 nrefvel=1 deltaI=twolayer.Dimag.gold.$*.H \
	zmin=0 zmax=2000 nh=41 oh=-200 jh=1 adj=1 areal=1 \
	padtraces=0 traces_in_taper=25 node=14 > $@ 

twolayer.Dimag.rand.%.H: 
	< twolayer.csou.rand$*.H Window3d squeeze=n n4= 1 | Transp plane=13 > s1.H
	< twolayer.crec.rand$*.H Window3d squeeze=n n4= 1 | Transp plane=13 > r1.H
	../Tese/bin/OWwemva_opers.x sou=s1.H rec=r1.H \
	vel=twolayer.bslow.H vsal=3500 nrefvel=1 deltaS=twolayer.dslow.H \
	zmin=0 zmax=2000 nh=41 oh=-200 jh=1 adj=0 areal=1 \
	padtraces=0 traces_in_taper=25 node=14 > $@ 

twolayer.Dslow.rand.%.H:
	< twolayer.csou.rand$*.H Window3d squeeze=n n4= 1 | Transp plane=13 > s1.H
	< twolayer.crec.rand$*.H Window3d squeeze=n n4= 1 | Transp plane=13 > r1.H
	../Tese/bin/OWwemva_opers.x sou=s1.H rec=r1.H \
	vel=twolayer.bslow.H vsal=3500 nrefvel=1 deltaI=twolayer.Dimag.rand.$*.H \
	zmin=0 zmax=2000 nh=41 oh=-200 jh=1 adj=1 areal=1 \
	padtraces=0 traces_in_taper=25 node=14 > $@ 

twolayer.Dslow.dso_0.H:
	../Tese/bin/OWwemva_opers.x sou=twolayer.csou.H rec=twolayer.crec1.H \
	vel=twolayer.bslow.H vsal=3500 nrefvel=1 deltaI=twolayer.dso.H \
	zmin=0 zmax=2000 nh=41 oh=-200 jh=1 adj=1 areal=0 \
	padtraces=0 traces_in_taper=25 node=14 > $@ 

twolayer.Dslow.randdso.%.H:
	< twolayer.csou.rand$*.H Window3d squeeze=n n4= 1 | Transp plane=13 > s1.H
	< twolayer.crec.rand$*.H Window3d squeeze=n n4= 1 | Transp plane=13 > r1.H
	../Tese/bin/OWwemva_opers.x sou=s1.H rec=r1.H \
	vel=twolayer.bslow.H vsal=3500 nrefvel=1 deltaI=twolayer.dso.rand$*.H \
	zmin=0 zmax=2000 nh=41 oh=-200 jh=1 adj=1 areal=1 \
	padtraces=0 traces_in_taper=25 node=14 > $@ 

twolayer.Dslow.golddso.%.H:
	< twolayer.csou.gold$*.H Window3d squeeze=n n4= 1 | Transp plane=13 > s1.H
	< twolayer.crec.gold$*.H Window3d squeeze=n n4= 1 | Transp plane=13 > r1.H
	../Tese/bin/OWwemva_opers.x sou=s1.H rec=r1.H \
	vel=twolayer.bslow.H vsal=3500 nrefvel=1 deltaI=twolayer.dso.gold$*.H \
	zmin=0 zmax=2000 nh=41 oh=-200 jh=1 adj=1 areal=1 \
	padtraces=0 traces_in_taper=25 node=14 > $@ 

###########################################################
####
#### Lab
####
square.slow.%.H: #OW_sqrvel.x
	./bin/OW_sqrvel.x back_vel=2000 vel_pert=$* xcenter=0 zcenter=750 extent=500 slow_out=$@ > /dev/null

square.bslow.H: #OW_sqrvel.x
	./bin/OW_sqrvel.x back_vel=2000 vel_pert=0 slow_out=$@

square.dslow.%.H: square.slow.%.H square.bslow.H
	Math file1=square.slow.$*.H file2=square.bslow.H exp=file1-file2 > $@

square.model0.%: square.slow.%.H #OWmod2d_par.x
	Spike n2=2001 o2=-10000 d2=10 n1=201 o1=0 d1=10 > z.H;Math file1=z.H exp="file1*0+2" | \
	Mute vmute=0 tmute=1500 > y.H; Math file1=y.H exp="file1+1" > z.H
	Wavelet n1=1001 d1=0.004 wavelet=ricker2 phase=0 fund=15 order=0.2 tdelay=2 domain=time > j2.H;echo o1=-2.0 >> j2.H
	<j2.H Transf f_min=0 f_min1=4 f_max1=32 f_max=38 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs |Smooth rect1=7 > 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 > square.csou.H
	Math file1=square.slow.$*.H exp="1/file1" | Window3d | Transp > square.slow.$*.tr.H
	../ShtPSPI/bin/OWmod2d_par.x sou=square.csou.H vel=square.slow.$*.tr.H \
	vreflect=z.H shots=square.crec0.$*.H \
	vsal=2500 nrefvel=4 traces_in_taper=50 padtraces=50 xmin=-9500 xmax=9500 \
	light=1 illum=square.illum.$*.H \
	nrec=401 orec=-2000 drec=10 nsht=401 osht=-2000 dsht=10 zmin=0 zmax=1700 node=15 > /dev/null

square.model1.%: square.slow.%.H #OWmod2d_par.x
	Spike n2=2001 o2=-10000 d2=10 n1=201 o1=0 d1=10 > z.H;Math file1=z.H exp="file1*0+2" | \
	Mute vmute=0 tmute=1500 > y.H; Math file1=y.H exp="file1+1" > z.H
	Wavelet n1=1001 d1=0.004 wavelet=ricker2 phase=0 fund=15 order=0.2 tdelay=2 domain=time > j2.H;echo o1=-2.0 >> j2.H
	<j2.H Transf f_min=0 f_min1=4 f_max1=32 f_max=38 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs |Smooth rect1=7 > 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 > square.csou.H
	Math file1=square.slow.$*.H exp="1/file1" | Window3d | Transp > square.slow.$*.tr.H
	../ShtPSPI/bin/OWmod2d_par.x sou=square.csou.H vel=square.slow.$*.tr.H \
	vreflect=z.H shots=square.crec1.$*.H \
	vsal=2500 nrefvel=4 traces_in_taper=50 padtraces=50 xmin=-9500 xmax=9500 \
	light=1 illum=square.illum.$*.H \
	nrec=401 orec=-2000 drec=10 nsht=101 osht=-2000 dsht=40 zmin=0 zmax=1700 node=15 > /dev/null

square.model2.%: square.slow.%.H #OWmod2d_par.x
	Spike n2=2001 o2=-10000 d2=10 n1=201 o1=0 d1=10 > z.H;Math file1=z.H exp="file1*0+2" | \
	Mute vmute=0 tmute=1500 > y.H; Math file1=y.H exp="file1+1" > z.H
	Wavelet n1=1001 d1=0.004 wavelet=ricker2 phase=0 fund=15 order=0.2 tdelay=2 domain=time > j2.H;echo o1=-2.0 >> j2.H
	<j2.H Transf f_min=0 f_min1=4 f_max1=32 f_max=38 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs |Smooth rect1=7 > 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 > square.csou.H
	Math file1=square.slow.$*.H exp="1/file1" | Window3d | Transp > square.slow.$*.tr.H
	../ShtPSPI/bin/OWmod2d_par.x sou=square.csou.H vel=square.slow.$*.tr.H \
	vreflect=z.H shots=square.crec2.$*.H \
	vsal=2500 nrefvel=4 traces_in_taper=50 padtraces=50 xmin=-9500 xmax=9500 \
	light=1 illum=square.illum.$*.H \
	nrec=401 orec=-2000 drec=10 nsht=51 osht=-2000 dsht=80 zmin=0 zmax=1700 node=15 > /dev/null

square.Dimag_0.%.H: 
	Wavelet n1=1001 d1=0.004 wavelet=ricker2 phase=0 fund=15 order=0.2 tdelay=2 domain=time > j2.H;echo o1=-2.0 >> j2.H
	<j2.H Transf f_min=0 f_min1=4 f_max1=32 f_max=38 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs |Smooth rect1=7 > j2.H
	Math file1=j2.H exp="file1*0">j1.H;Cmplx j2.H j1.H|Transp plane=13 > square.csou.H
	../Tese/bin/OWwemva_opers.x sou=square.csou.H rec=square.crec0.$*.H \
	vel=square.bslow.H vsal=2500 nrefvel=1 deltaS=square.dslow.$*.H \
	zmin=0 zmax=2000 nh=31 oh=-150 jh=1 adj=0 areal=0 \
	padtraces=0 traces_in_taper=25 node=14 > $@ 

square.Dslow_0.%.H: #square.bslow.H square.dslow.%.H square.csou.H square.crec.%.H square.Dimag.%.H #OWwemva_opers.x 
	Wavelet n1=1001 d1=0.004 wavelet=ricker2 phase=0 fund=15 order=0.2 tdelay=2 domain=time > j2.H;echo o1=-2.0 >> j2.H
	<j2.H Transf f_min=0 f_min1=4 f_max1=32 f_max=38 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs |Smooth rect1=7 > j2.H
	Math file1=j2.H exp="file1*0">j1.H;Cmplx j2.H j1.H|Transp plane=13 > square.csou.H
	../Tese/bin/OWwemva_opers.x sou=square.csou.H rec=square.crec0.$*.H \
	vel=square.bslow.H vsal=2500 nrefvel=1 deltaI=square.Dimag_0.$*.H \
	zmin=0 zmax=2000 nh=31 oh=-150 jh=1 adj=1 areal=0 \
	padtraces=0 traces_in_taper=25 node=14 > $@ 

square.Dimag.%.H: 
	Wavelet n1=1001 d1=0.004 wavelet=ricker2 phase=0 fund=15 order=0.2 tdelay=2 domain=time > j2.H;echo o1=-2.0 >> j2.H
	<j2.H Transf f_min=0 f_min1=4 f_max1=32 f_max=38 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs |Smooth rect1=7 > j2.H
	Math file1=j2.H exp="file1*0">j1.H;Cmplx j2.H j1.H|Transp plane=13 > square.csou.H
	../Tese/bin/OWwemva_opers.x sou=square.csou.H rec=square.crec1.$*.H \
	vel=square.bslow.H vsal=2500 nrefvel=1 deltaS=square.dslow.$*.H \
	zmin=0 zmax=2000 nh=31 oh=-150 jh=1 adj=0 areal=0 \
	padtraces=0 traces_in_taper=25 node=14 > $@ 

square.Dslow.%.H: #square.bslow.H square.dslow.%.H square.csou.H square.crec.%.H square.Dimag.%.H #OWwemva_opers.x 
	Wavelet n1=1001 d1=0.004 wavelet=ricker2 phase=0 fund=15 order=0.2 tdelay=2 domain=time > j2.H;echo o1=-2.0 >> j2.H
	<j2.H Transf f_min=0 f_min1=4 f_max1=32 f_max=38 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs |Smooth rect1=7 > j2.H
	Math file1=j2.H exp="file1*0">j1.H;Cmplx j2.H j1.H|Transp plane=13 > square.csou.H
	../Tese/bin/OWwemva_opers.x sou=square.csou.H rec=square.crec1.$*.H \
	vel=square.bslow.H vsal=2500 nrefvel=1 deltaI=square.Dimag.$*.H \
	ddws=square.ddws.$*.H ddwsz=square.ddwsz.$*.H ddwr=square.ddwr.$*.H ddwrz=square.ddwrz.$*.H \
	zmin=0 zmax=2000 nh=31 oh=-150 jh=1 adj=1 areal=0 \
	padtraces=0 traces_in_taper=25 node=14 > $@ 

#square.Dimag1.%.H: #square.csou.H square.crec.%.H square.bslow.H square.dslow.%.H #OWwemva_opers.x 
#	../Tese/bin/OWwemva_opers.x sou=square.csou.H rec=square.crec1.$*.H \
#	vel=square.bslow.H vsal=2500 nrefvel=1 deltaS=square.dslow.$*.H \
#	zmin=0 zmax=1700 nh=41 oh=-200 jh=1 adj=0 areal=0 \
#	padtraces=50 traces_in_taper=25 node=10 > $@ 
#
#square.Dslow1.%.H: #square.bslow.H square.dslow.%.H square.csou.H square.crec.%.H square.Dimag.%.H #OWwemva_opers.x 
#	../Tese/bin/OWwemva_opers.x sou=square.csou.H rec=square.crec1.$*.H \
#	vel=square.bslow.H vsal=2500 nrefvel=1 deltaI=square.Dimag1.$*.H \
#	zmin=0 zmax=1700 nh=41 oh=-200 jh=1 adj=1 areal=0 \
#	padtraces=50 traces_in_taper=25 node=10 > $@ 
#
#square.Dimag2.%.H: #square.csou.H square.crec.%.H square.bslow.H square.dslow.%.H #OWwemva_opers.x 
#	< square.crec1.$*.H Window3d squeeze=n min4=0 n4=1 > square.crec1.tmp.H
#	../Tese/bin/OWwemva_opers.x sou=square.csou.H rec=square.crec1.tmp.H \
#	vel=square.bslow.H vsal=2500 nrefvel=1 deltaS=square.dslow.$*.H \
#	zmin=0 zmax=1700 nh=41 oh=-200 jh=1 adj=0 areal=0 \
#	padtraces=50 traces_in_taper=25 node=10 > $@ 
#
#square.Dslow2.%.H: #square.bslow.H square.dslow.%.H square.csou.H square.crec.%.H square.Dimag.%.H #OWwemva_opers.x 
#	< square.crec1.$*.H Window3d squeeze=n min4=0 n4=1 > square.crec1.tmp.H
#	../Tese/bin/OWwemva_opers.x sou=square.csou.H rec=square.crec1.tmp.H \
#	vel=square.bslow.H vsal=2500 nrefvel=1 deltaI=square.Dimag2.$*.H \
#	ddws=square.ddws.$*.H ddwsz=square.ddwsz.$*.H ddwr=square.ddwr.$*.H ddwrz=square.ddwrz.$*.H \
#	zmin=0 zmax=1700 nh=41 oh=-200 jh=1 adj=1 areal=0 \
#	padtraces=50 traces_in_taper=25 node=10 > $@ 
#
#square.model4.%: square.slow.%.H #OWmod2d_par.x
#	Spike n2=2001 o2=-10000 d2=10 n1=201 o1=0 d1=10 > z.H;Math file1=z.H exp="file1*0+2" | \
#	Mute vmute=0 tmute=1500 > y.H; Math file1=y.H exp="file1+1" > z.H
#	Wavelet n1=1001 d1=0.004 wavelet=ricker2 phase=0 fund=15 order=0.2 tdelay=2 domain=time > j2.H;echo o1=-2.0 >> j2.H
#	<j2.H Transf f_min=0 f_min1=4 f_max1=32 f_max=38 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs > j2.H
#	Math file1=j2.H exp="file1*0">j1.H;Cmplx j2.H j1.H|Transp plane=13|Window3d squeeze=n f3=1 > square.csou.H
#	Math file1=square.slow.$*.H exp="1/file1" | Window3d | Transp > square.slow.$*.tr.H
#	../ShtPSPI/bin/OWmod2d_par.x sou=square.csou.H vel=square.slow.$*.tr.H \
#	vreflect=z.H shots=square.crec4.$*.H \
#	vsal=2500 nrefvel=4 traces_in_taper=50 padtraces=50 xmin=-9500 xmax=9500 \
#	light=1 illum=square.illum.$*.H \
#	nrec=401 orec=-2000 drec=10 nsht=151 osht=-3000 dsht=40 zmin=0 zmax=1700 node=12 > /dev/null
#
#square.Dimag4.%.H: #square.csou.H square.crec.%.H square.bslow.H square.dslow.%.H #OWwemva_opers.x 
#	< square.crec4.$*.H Window3d squeeze=n min4= 0 n4= 1 > square.crec1.tmp.H
#	../Tese/bin/OWwemva_opers.x sou=square.csou.H rec=square.crec1.tmp.H \
#	vel=square.bslow.H vsal=2500 nrefvel=1 deltaS=square.dslow.$*.H \
#	zmin=0 zmax=1700 nh=41 oh=-200 jh=1 adj=0 areal=0 \
#	padtraces=50 traces_in_taper=25 node=10 > $@ 
#
#square.Dslow4.%.H: #square.bslow.H square.dslow.%.H square.csou.H square.crec.%.H square.Dimag.%.H #OWwemva_opers.x 
#	< square.crec4.$*.H Window3d squeeze=n min4= 0 n4= 1 > square.crec1.tmp.H
#	../Tese/bin/OWwemva_opers.x sou=square.csou.H rec=square.crec1.tmp.H \
#	vel=square.bslow.H vsal=2500 nrefvel=1 deltaI=square.Dimag4.$*.H \
#	ddws= square.ddws.$*.H ddwsz= square.ddwsz.$*.H ddwr= square.ddwr.$*.H ddwrz= square.ddwrz.$*.H \
#	zmin=0 zmax=1700 nh=41 oh=-200 jh=1 adj=1 areal=0 \
#	padtraces=50 traces_in_taper=25 node=4 > $@ 

square.bkim_0.%:
	Wavelet n1=1001 d1=0.004 wavelet=ricker2 phase=0 fund=15 order=0.2 tdelay=2 domain=time > j2.H;echo o1=-2.0 >> j2.H
	<j2.H Transf f_min=0 f_min1=4 f_max1=32 f_max=38 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs |Smooth rect1=7 > j2.H
	Math file1=j2.H exp="file1*0">j1.H;Cmplx j2.H j1.H|Transp plane=13 > square.csou.H
	./bin/OWmig2d_areal.x sou=square.csou.H rec=square.crec0.$*.H vel=square.bslow.H bkgimg=square.bkim_0.$*.H \
	vsal=2500 nrefvel=1 zmin=0 zmax=2000 nh=31 oh=-150 jh=1 areal=0 migration=1 \
	padtraces=0 traces_in_taper=25 node=10 > /dev/null
	< square.bkim.$*.H ./bin/OW_dso.x > square.dso.$*.H

square.bkim.%:
	Wavelet n1=1001 d1=0.004 wavelet=ricker2 phase=0 fund=15 order=0.2 tdelay=2 domain=time > j2.H;echo o1=-2.0 >> j2.H
	<j2.H Transf f_min=0 f_min1=4 f_max1=32 f_max=38 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs |Smooth rect1=7 > j2.H
	Math file1=j2.H exp="file1*0">j1.H;Cmplx j2.H j1.H|Transp plane=13 > square.csou.H
	./bin/OWmig2d_areal.x sou=square.csou.H rec=square.crec2.$*.H vel=square.bslow.H bkgimg=square.bkim.$*.H \
	vsal=2500 nrefvel=1 zmin=0 zmax=2000 nh=51 oh=-250 jh=1 areal=0 migration=1 \
	padtraces=0 traces_in_taper=25 node=10 > /dev/null
	< square.bkim_0.$*.H ./bin/OW_dso.x > square.dso_0.$*.H

square.Dslow3.dso.%.H: #square.bslow.H square.dslow.%.H square.csou.H square.crec.%.H square.Dimag.%.H #OWwemva_opers.x 
	< square.crec1.$*.H Window3d squeeze=n min4=0 n4=1 > square.crec1.tmp.H
	../Tese/bin/OWwemva_opers.x sou=square.csou.H rec=square.crec1.tmp.H \
	vel=square.bslow.H vsal=2500 nrefvel=1 deltaI=square.dso.$*.H \
	ddws=square.ddws.dso.$*.H ddwsz=square.ddwsz.dso.$*.H ddwr=square.ddwr.dso.$*.H ddwrz=square.ddwrz.dso.$*.H \
	zmin=0 zmax=1700 nh=41 oh=-200 jh=1 adj=1 areal=0 \
	padtraces=50 traces_in_taper=25 node=10 > $@ 

########################
#
#
squarerotsd%:
	Window3d <square.bkim.$*.H min1=-2000 max1=2000 |Transp plane=13|\
	./bin/OW_3dslant.x nax=21 nah=35 oax=-10 oah=-35 dax=1 dah=2 \
	nxw=21 rot=1 upshft=0 nodes=14 nxchunk=1 > square.rot.sou$*.H
	Window3d <square.bkim.$*.H min1=-2000 max1=2000 |Transp plane=13|\
	./bin/OW_3dslant.x nax=21 nah=35 oax=-10 oah=-35 dax=1 dah=2 \
	nxw=21 rot=1 upshft=0 nodes=14 nxchunk=1 rec=1 > square.rot.rec$*.H
########################
# Gold
square.csou1.H:
	Wavelet n1=1721 d1=0.004 wavelet=ricker2 phase=0 fund=15 order=0.2 tdelay=3.44 domain=time > j2.H;echo o1=-3.44 >> j2.H
	<j2.H Transf f_min=0 f_min1=4 f_max1=32 f_max=37.2 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs |Smooth rect1=7 > j2.H
	Math file1=j2.H exp="file1*0">j1.H;Cmplx j2.H j1.H|Transp plane=13 > $@

squareperm.gold.%:
	Window3d < square.bkim.0.05.H squeeze=n min1=-2170 max1=2000 > i1.H
	Window3d < square.bslow.H | Transp|Gpow gpow=-1 > 1.H
	../Tese/bin/OW_arealsht.x rec_cig=i1.H sou_cig=i1.H sou=square.csou1.H vel=1.H \
	rec_out=square.crec.perm.gold$*.0.05.H sou_out=square.csou.perm.gold$*.0.05.H nrefvel=1 vsal=3000 \
	padtraces=0 traces_in_taper=60 encode=1 encz=0 eps=1 gold=1 injection=1 nreal=1 \
	ws=square.gold.ws0.H wr=square.gold.wr0.H \
	ngap=$* zmin=0 zmax=2000 node=14 > /dev/null 

square.bkim11.perm.gold%:
	< square.csou.perm.gold$*.0.05.H Window3d squeeze=n n4= 1 | Transp plane=13 > s1.H
	< square.crec.perm.gold$*.0.05.H Window3d squeeze=n n4= 1 | Transp plane=13 > r1.H
	./bin/OWmig2d_areal.x sou=s1.H rec=r1.H vel=square.bslow.H bkgimg=square.bkim.perm.gold$*.0.05.H \
	vsal=2500 nrefvel=1 zmin=0 zmax=2000 nh=41 oh=-200 jh=1 areal=1 migration=1 \
	padtraces=0 traces_in_taper=25 node=14 > /dev/null

square.Dimag_gold%.H: #square.csou.H square.crec.%.H square.bslow.H square.dslow.%.H #OWwemva_opers.x 
	< square.csou.perm.gold$*.0.05.H Transp plane=13 > s1.H
	< square.crec.perm.gold$*.0.05.H Transp plane=13 > r1.H
	../Tese/bin/OWwemva_opers.x sou=s1.H rec=r1.H \
	vel=square.bslow.H vsal=2500 nrefvel=1 deltaS=square.dslow.0.05.H \
	zmin=0 zmax=2000 nh=41 oh=-200 jh=1 adj=0 areal=1 \
	padtraces=0 traces_in_taper=25 node=14 > $@ 

square.Dslow_gold%.H: #square.bslow.H square.dslow.%.H square.csou.H square.crec.%.H square.Dimag.%.H #OWwemva_opers.x 
	< square.csou.perm.gold$*.0.05.H Transp plane=13 > s1.H
	< square.crec.perm.gold$*.0.05.H Transp plane=13 > r1.H
	../Tese/bin/OWwemva_opers.x sou=s1.H rec=r1.H \
	vel=square.bslow.H vsal=2500 nrefvel=1 deltaI=square.Dimag_gold$*.0.05.H \
	zmin=0 zmax=2000 nh=41 oh=-200 jh=1 adj=1 areal=1 \
	padtraces=0 traces_in_taper=25 node=14 > $@ 
#
#
#
#########################################square.bkim.0.05.H.H
squareperm.0.0%:
#	< square.rot.sou$*.H Transp plane=13 > s1.H
#	< square.rot.rec$*.H Transp plane=13 > r1.H
	Window3d < square.bkim.$*.H squeeze=n min1=0 n1=1 | Pad beg1=200 end1=200 > s1.H
	Window3d < square.bslow.H | Transp|Gpow gpow=-1 > 1.H
	../Tese/bin/OW_arealsht.x rec_cig=s1.H sou_cig=s1.H sou=square.csou.H vel=1.H \
	rec_out=square.crec.perm00.$*.H sou_out=square.csou.perm00.$*.H nrefvel=1 vsal=3000 \
	padtraces=0 traces_in_taper=60 encode=1 encz=1 eps=0 random=1 injection=1 nreal=1 \
	ws=square.ws0.H wr=square.wr0.H \
	ngap=1 zmin=0 zmax=2000 node=14 > /dev/null 

squareperm000.0.0:
	< square.bkim.0.05.H.H Window3d min1=0 n1=1 squeeze=n | Transp plane=13 > s1.H
	Window3d < square.bkim.$*.H squeeze=n min1=0 n1=1 | Pad beg1=200 end1=200 > s1.H
	Window3d < square.bslow.H | Transp|Gpow gpow=-1 > 1.H
	../Tese/bin/OW_arealsht.x rec_cig=s1.H sou_cig=s1.H sou=square.csou.H vel=1.H \
	rec_out=square.crec.perm00.$*.H sou_out=square.csou.perm00.$*.H nrefvel=1 vsal=3000 \
	padtraces=0 traces_in_taper=60 encode=1 encz=1 eps=0 random=1 injection=1 nreal=1 \
	ws=square.ws0.H wr=square.wr0.H \
	ngap=1 zmin=0 zmax=2000 node=14 > /dev/null 

squareperm.1.0%:
#	< square.rot.sou$*.H Transp plane=13 > s1.H
#	< square.rot.rec$*.H Transp plane=13 > r1.H
	Window3d < square.bkim.$*.H squeeze=n min1=-2170 max1=2000 > s1.H
	Window3d < square.bslow.H | Transp|Gpow gpow=-1 > 1.H
	../Tese/bin/OW_arealsht.x rec_cig=s1.H sou_cig=s1.H sou=square.csou.H vel=1.H \
	rec_out=square.crec.perm01.$*.H sou_out=square.csou.perm01.$*.H nrefvel=1 vsal=3000 \
	padtraces=0 traces_in_taper=60 encode=1 encz=1 eps=0 random=1 injection=1 nreal=1 \
	ws=square.ws1.H wr=square.wr1.H \
	ngap=31 zmin=0 zmax=2000 node=14 > /dev/null 

squareperm.2.0%:
#	< square.rot.sou$*.H Transp plane=13 > s1.H
#	< square.rot.rec$*.H Transp plane=13 > r1.H
	Window3d < square.bkim.$*.H squeeze=n min1=-2170 max1=2000 > s1.H
	Window3d < square.bslow.H | Transp|Gpow gpow=-1 > 1.H
	../Tese/bin/OW_arealsht.x rec_cig=s1.H sou_cig=s1.H sou=square.csou.H vel=1.H \
	rec_out=square.crec.perm02.$*.H sou_out=square.csou.perm02.$*.H nrefvel=1 vsal=3000 \
	padtraces=0 traces_in_taper=60 encode=1 encz=1 eps=1 random=1 injection=1 nreal=1 \
	ws=square.ws1.H wr=square.wr1.H \
	ngap=31 zmin=0 zmax=2000 node=14 > /dev/null 

square.bkim01.perm.%:
	< square.csou.perm01.$*.H Transp plane=13 > s1.H
	< square.crec.perm01.$*.H Transp plane=13 > r1.H
	./bin/OWmig2d_areal.x sou=s1.H rec=r1.H vel=square.bslow.H bkgimg=square.bkim01.perm.$*.H \
	vsal=2500 nrefvel=1 zmin=0 zmax=2000 nh=31 oh=-150 jh=1 areal=1 migration=1 \
	padtraces=0 traces_in_taper=25 node=14 > /dev/null

square.bkim02.perm.%:
	< square.csou.perm02.$*.H Transp plane=13 > s1.H
	< square.crec.perm02.$*.H Transp plane=13 > r1.H
	./bin/OWmig2d_areal.x sou=s1.H rec=r1.H vel=square.bslow.H bkgimg=square.bkim02.perm.$*.H \
	vsal=2500 nrefvel=1 zmin=0 zmax=2000 nh=31 oh=-150 jh=1 areal=1 migration=1 \
	padtraces=0 traces_in_taper=25 node=14 > /dev/null

squareperm0%:
#	< square.rot.sou$*.H Transp plane=13 > s1.H
#	< square.rot.rec$*.H Transp plane=13 > r1.H
	Window3d < square.bkim.$*.H min1=-2000 max1=2000 > s1.H
	Window3d < square.bslow.H | Transp|Gpow gpow=-1 > 1.H
	../Tese/bin/OW_arealsht.x rec_cig=s1.H sou_cig=s1.H sou=square.csou.H vel=1.H \
	rec_out=square.crec.perm.$*.H sou_out=square.csou.perm.$*.H nrefvel=1 vsal=3000 \
	padtraces=0 traces_in_taper=60 encode=1 encz=1 eps=0 random=1 injection=1 nreal=1 \
	ws=square.ws0.H wr=square.wr0.H \
	ngap=61 zmin=0 zmax=2000 node=14 > /dev/null 

squareperm1%:
#	< square.rot.sou$*.H Transp plane=13 > s1.H
#	< square.rot.rec$*.H Transp plane=13 > r1.H
	Window3d < square.bkim.$*.H min1=-2000 max1=2000 > s1.H
	Window3d < square.bslow.H | Transp|Gpow gpow=-1 > 1.H
	../Tese/bin/OW_arealsht.x rec_cig=s1.H sou_cig=s1.H sou=square.csou.H vel=1.H \
	rec_out=square.crec.perm1.$*.H sou_out=square.csou.perm1.$*.H nrefvel=1 vsal=3000 \
	padtraces=0 traces_in_taper=60 encode=1 encz=1 eps=1 random=1 injection=1 nreal=1 \
	ws=square.ws1.H wr=square.wr1.H \
	ngap=21 zmin=0 zmax=2000 node=14 > /dev/null 

squareperm2%:
	< square.rot.sou$*.H Transp plane=13 > s1.H
#	< square.rot.rec$*.H Window3d Transp plane=13 > r1.H
	Window3d < square.bkim.$*.H min1=-2000 max1=2000 > s1.H
	../Tese/bin/OW_arealsht.x rec_cig=s1.H sou_cig=s1.H sou=square.csou.H vel=square.bslow.H \
	rec_out=square.crec.perm0.$*.H sou_out=square.csou.perm0.$*.H nrefvel=1 vsal=3000 \
	padtraces=0 traces_in_taper=60 encode=1 encz=1 eps=1 random=1 injection=1 nreal=1 \
	ws=square.ws2.H wr=square.wr2.H \
	ngap=11 zmin=0 zmax=2000 node=14 > /dev/null 

square.bkim0.perm.%:
	< square.csou.perm.$*.H Transp plane=13 > s1.H
	< square.crec.perm.$*.H Transp plane=13 > r1.H
	./bin/OWmig2d_areal.x sou=s1.H rec=r1.H vel=square.bslow.H bkgimg=square.bkim.perm.$*.H \
	vsal=2500 nrefvel=1 zmin=0 zmax=2000 nh=31 oh=-150 jh=1 areal=1 migration=1 \
	padtraces=0 traces_in_taper=25 node=14 > /dev/null
	< square.bkim.perm.$*.H ./bin/OW_dso.x > square.dso.perm0.$*.H

square.bkim1.perm.%:
	< square.csou.perm1.$*.H Transp plane=13 > s1.H
	< square.crec.perm1.$*.H Transp plane=13 > r1.H
	./bin/OWmig2d_areal.x sou=s1.H rec=r1.H vel=square.bslow.H bkgimg=square.bkim.perm1.$*.H \
	vsal=2500 nrefvel=1 zmin=0 zmax=2000 nh=31 oh=-150 jh=1 areal=1 migration=1 \
	padtraces=0 traces_in_taper=25 node=14 > /dev/null
	< square.bkim.perm1.$*.H ./bin/OW_dso.x > square.dso.perm1.$*.H

square.bkim2.perm.%:
	< square.csou.perm2.$*.H Transp plane=13 > s1.H
	< square.crec.perm2.$*.H Transp plane=13 > r1.H
	./bin/OWmig2d_areal.x sou=s1.H rec=r1.H vel=square.bslow.H bkgimg=square.bkim.perm2.$*.H \
	vsal=2500 nrefvel=1 zmin=0 zmax=2000 nh=31 oh=-150 jh=1 areal=1 migration=1 \
	padtraces=0 traces_in_taper=25 node=14 > /dev/null
	< square.bkim.perm2.$*.H ./bin/OW_dso.x > square.dso.perm2.$*.H

square.Dimag0.perm.%.H: #square.csou.H square.crec.%.H square.bslow.H square.dslow.%.H #OWwemva_opers.x 
	< square.csou.perm.$*.H Transp plane=13 > s1.H
	< square.crec.perm.$*.H Transp plane=13 > r1.H
	../Tese/bin/OWwemva_opers.x sou=s1.H rec=r1.H \
	vel=square.bslow.H vsal=2500 nrefvel=1 deltaS=square.dslow.$*.H \
	zmin=0 zmax=2000 nh=31 oh=-150 jh=1 adj=0 areal=1 \
	padtraces=0 traces_in_taper=25 node=14 > $@ 

square.Dslow0.perm.%.H: #square.bslow.H square.dslow.%.H square.csou.H square.crec.%.H square.Dimag.%.H #OWwemva_opers.x 
	< square.csou.perm.$*.H Transp plane=13 > s1.H
	< square.crec.perm.$*.H Transp plane=13 > r1.H
	../Tese/bin/OWwemva_opers.x sou=s1.H rec=r1.H \
	vel=square.bslow.H vsal=2500 nrefvel=1 deltaI=square.Dimag0.perm.$*.H \
	zmin=0 zmax=2000 nh=31 oh=-150 jh=1 adj=1 areal=1 \
	padtraces=0 traces_in_taper=25 node=14 > $@ 

square.Dimag1.perm.%.H: #square.csou.H square.crec.%.H square.bslow.H square.dslow.%.H #OWwemva_opers.x 
	< square.csou.perm1.$*.H Transp plane=13 > s1.H
	< square.crec.perm1.$*.H Transp plane=13 > r1.H
	../Tese/bin/OWwemva_opers.x sou=s1.H rec=r1.H \
	vel=square.bslow.H vsal=2500 nrefvel=1 deltaS=square.dslow.$*.H \
	zmin=0 zmax=2000 nh=31 oh=-150 jh=1 adj=0 areal=1 \
	padtraces=0 traces_in_taper=25 node=14 > $@ 

square.Dslow1.perm.%.H: #square.bslow.H square.dslow.%.H square.csou.H square.crec.%.H square.Dimag.%.H #OWwemva_opers.x 
	< square.csou.perm1.$*.H Transp plane=13 > s1.H
	< square.crec.perm1.$*.H Transp plane=13 > r1.H
	../Tese/bin/OWwemva_opers.x sou=s1.H rec=r1.H \
	vel=square.bslow.H vsal=2500 nrefvel=1 deltaI=square.Dimag1.perm.$*.H \
	zmin=0 zmax=2000 nh=31 oh=-150 jh=1 adj=1 areal=1 \
	padtraces=0 traces_in_taper=25 node=14 > $@ 

square.Dimag2.perm.%.H: #square.csou.H square.crec.%.H square.bslow.H square.dslow.%.H #OWwemva_opers.x 
	< square.csou.perm2.$*.H Transp plane=13 > s1.H
	< square.crec.perm2.$*.H Transp plane=13 > r1.H
	../Tese/bin/OWwemva_opers.x sou=s1.H rec=r1.H \
	vel=square.bslow.H vsal=2500 nrefvel=1 deltaS=square.dslow.$*.H \
	zmin=0 zmax=2000 nh=31 oh=-150 jh=1 adj=0 areal=1 \
	padtraces=0 traces_in_taper=25 node=14 > $@ 

square.Dslow2.perm.%.H: #square.bslow.H square.dslow.%.H square.csou.H square.crec.%.H square.Dimag.%.H #OWwemva_opers.x 
	< square.csou.perm2.$*.H Transp plane=13 > s1.H
	< square.crec.perm2.$*.H Transp plane=13 > r1.H
	../Tese/bin/OWwemva_opers.x sou=s1.H rec=r1.H \
	vel=square.bslow.H vsal=2500 nrefvel=1 deltaI=square.Dimag2.perm.$*.H \
	zmin=0 zmax=2000 nh=31 oh=-150 jh=1 adj=1 areal=1 \
	ddws=square.ddws2.perm.$*.H ddwsz=square.ddwsz2.perm.$*.H ddwr=square.ddwr2.prem.$*.H ddwrz=square.ddwrz2.perm.$*.H \
	padtraces=0 traces_in_taper=25 node=14 > $@ 

square.Dslow2a.perm.%.H: #square.bslow.H square.dslow.%.H square.csou.H square.crec.%.H square.Dimag.%.H #OWwemva_opers.x 
	< square.csou.perm2.$*.H Window3d squeeze=n n4=1 | Transp plane=13 > s1.H
	< square.crec.perm2.$*.H Window3d squeeze=n n4=1 | Transp plane=13 > r1.H
	../Tese/bin/OWwemva_opers.x sou=s1.H rec=r1.H \
	vel=square.bslow.H vsal=2500 nrefvel=1 deltaI=square.Dimag2.perm.$*.H \
	zmin=0 zmax=2000 nh=31 oh=-150 jh=1 adj=1 areal=1 \
	ddws=square.ddws2.perm.$*.H ddwsz=square.ddwsz2.perm.$*.H ddwr=square.ddwr2.prem.$*.H ddwrz=square.ddwrz2.perm.$*.H \
	padtraces=0 traces_in_taper=25 node=2 > $@ 

square.Dslow0.permdso.%.H: #square.bslow.H square.dslow.%.H square.csou.H square.crec.%.H square.Dimag.%.H #OWwemva_opers.x 
	< square.csou.perm.$*.H Transp plane=13 > s1.H
	< square.crec.perm.$*.H Transp plane=13 > r1.H
	../Tese/bin/OWwemva_opers.x sou=s1.H rec=r1.H \
	vel=square.bslow.H vsal=2500 nrefvel=1 deltaI=square.dso.perm0.$*.H \
	zmin=0 zmax=2000 nh=31 oh=-150 jh=1 adj=1 areal=1 \
	padtraces=0 traces_in_taper=25 node=14 > $@ 

square.Dslow1.permdso.%.H: #square.bslow.H square.dslow.%.H square.csou.H square.crec.%.H square.Dimag.%.H #OWwemva_opers.x 
	< square.bkim.perm1.$*.H ./bin/OW_dso.x > square.dso.perm1.$*.H
	< square.csou.perm1.$*.H Transp plane=13 > s1.H
	< square.crec.perm1.$*.H Transp plane=13 > r1.H
	../Tese/bin/OWwemva_opers.x sou=s1.H rec=r1.H \
	vel=square.bslow.H vsal=2500 nrefvel=1 deltaI=square.dso.perm1.$*.H \
	zmin=0 zmax=2000 nh=31 oh=-150 jh=1 adj=1 areal=1 \
	padtraces=0 traces_in_taper=25 node=14 > $@ 

square.Dslow2.permdso.%.H: #square.bslow.H square.dslow.%.H square.csou.H square.crec.%.H square.Dimag.%.H #OWwemva_opers.x 
	< square.bkim.perm2.$*.H ./bin/OW_dso.x > square.dso.perm1.$*.H
	< square.csou.perm2.$*.H Transp plane=13 > s1.H
	< square.crec.perm2.$*.H Transp plane=13 > r1.H
	../Tese/bin/OWwemva_opers.x sou=s1.H rec=r1.H \
	vel=square.bslow.H vsal=2500 nrefvel=1 deltaI=square.dso.perm2.$*.H \
	zmin=0 zmax=2000 nh=31 oh=-150 jh=1 adj=1 areal=1 \
	padtraces=0 traces_in_taper=25 node=14 > $@ 

kkk:
	Transf < square.ddwsz.-0.05.H > 1.H ; < 1.H Window3d | Grey eout=1 pclip=99.8 gainpanel=a > square.ddwsz.-0.05.T
	Transf < square.ddws.-0.05.H > 1.H ; < 1.H Window3d | Grey eout=1 pclip=99.8 gainpanel=a > square.ddws.-0.05.T
	Transf < square.ddwrz.-0.05.H > 1.H ; < 1.H Window3d | Grey eout=1 pclip=99.8 gainpanel=a > square.ddwrz.-0.05.T
	Transf < square.ddwr.-0.05.H > 1.H ; < 1.H Window3d | Grey eout=1 pclip=99.8 gainpanel=a > square.ddwr.-0.05.T
	Transf < square.ddwsz.0.05.H > 1.H ; < 1.H Window3d | Grey eout=1 pclip=99 gainpanel=a > square.ddwsz.0.05.T
	Transf < square.ddws.0.05.H > 1.H ; < 1.H Window3d | Grey eout=1 pclip=99.8 gainpanel=a > square.ddws.0.05.T
	Transf < square.ddwrz.0.05.H > 1.H ; < 1.H Window3d | Grey eout=1 pclip=99.8 gainpanel=a > square.ddwrz.0.05.T
	Transf < square.ddwr.0.05.H > 1.H ; < 1.H Window3d | Grey eout=1 pclip=99.8 gainpanel=a > square.ddwr.0.05.T
	Transf < square.ddwsz.dso.-0.05.H > 1.H ; < 1.H Window3d | Grey eout=1 pclip=99 gainpanel=a > square.ddwsz.dso.-0.05.T
	Transf < square.ddws.dso.-0.05.H > 1.H ; < 1.H Window3d | Grey eout=1 pclip=99.8 gainpanel=a > square.ddws.dso.-0.05.T
	Transf < square.ddwrz.dso.-0.05.H > 1.H ; < 1.H Window3d | Grey eout=1 pclip=99.8 gainpanel=a > square.ddwrz.dso.-0.05.T
	Transf < square.ddwr.dso.-0.05.H > 1.H ; < 1.H Window3d | Grey eout=1 pclip=99.8 gainpanel=a > square.ddwr.dso.-0.05.T
	Transf < square.ddwsz.dso.0.05.H > 1.H ; < 1.H Window3d | Grey eout=1 pclip=99.8 gainpanel=a > square.ddwsz.dso.0.05.T
	Transf < square.ddws.dso.0.05.H > 1.H ; < 1.H Window3d | Grey eout=1 pclip=99.8 gainpanel=a > square.ddws.dso.0.05.T
	Transf < square.ddwrz.dso.0.05.H > 1.H ; < 1.H Window3d | Grey eout=1 pclip=99.8 gainpanel=a > square.ddwrz.dso.0.05.T
	Transf < square.ddwr.dso.0.05.H > 1.H ; < 1.H Window3d | Grey eout=1 pclip=99.8 gainpanel=a > square.ddwr.dso.0.05.T

	Transf < square.ddws2.perm.0.05.H > 1.H ; < 1.H Window3d | Grey eout=1 pclip=99.8 gainpanel=a > square.ddws2.perm.0.05.T
	Transf < square.ddwsz2.perm.0.05.H > 1.H ; < 1.H Window3d | Grey eout=1 pclip=99.8 gainpanel=a > square.ddwsz2.perm.0.05.T
	Transf < square.ddwr2.prem.0.05.H > 1.H ; < 1.H Window3d | Grey eout=1 pclip=99.8 gainpanel=a > square.ddwr2.perm.T
	Transf < square.ddwrz2.perm.0.05.H > 1.H ; < 1.H Window3d | Grey eout=1 pclip=99.8 gainpanel=a > square.ddwrz2.perm.0.05.T
#

square.ddws2.perm.0.05.v:
	Window3d < square.ddws2.perm.0.05.T min2=-2000 max2=2000 max1=1 | Transp plane=13 | Cubeplot flat=1 \
	frame1=85 frame2=200 frame3=70 wantcoordlabel=-1 point1=.5 point2=1 title="Scattered sou.wvfld - square of hi vel " \
	label1="depth" label2="distance" label3="time" titlefat=1 titlesz=8 \
	> /dev/null out=$@
	pstexpen square.ddws2.perm.0.05.v square.ddws2.perm.0.05.ps ; epstopdf square.ddws2.perm.0.05.ps

square.ddwsz2.perm.0.05.v:
	Window3d < square.ddwsz2.perm.0.05.T min2=-2000 max2=2000 max1=1 | Transp plane=13 | Cubeplot flat=1 \
	frame1=85 frame2=200 frame3=70 wantcoordlabel=-1 point1=.5 point2=1 title="Scattered sou.wvfld - square of hi vel " \
	label1="depth" label2="distance" label3="time" titlefat=1 titlesz=8 \
	> /dev/null out=$@
	pstexpen square.ddwsz2.perm.0.05.v square.ddwsz2.perm.0.05.ps ; epstopdf square.ddwsz2.perm.0.05.ps

square.ddwr2.perm.0.05.v:
	Window3d < square.ddwr2.perm.T min2=-2000 max2=2000 max1=1 | Transp plane=13 | Cubeplot flat=1 \
	frame1=85 frame2=200 frame3=70 wantcoordlabel=-1 point1=.5 point2=1 title="Scattered sou.wvfld - square of hi vel " \
	label1="depth" label2="distance" label3="time" titlefat=1 titlesz=8 \
	> /dev/null out=$@
	pstexpen square.ddwr2.perm.0.05.v square.ddwr2.perm.0.05.ps ; epstopdf square.ddwr2.perm.0.05.ps

square.ddwrz2.perm.0.05.v:
	Window3d < square.ddwrz2.perm.0.05.T min2=-2000 max2=2000 max1=1 | Transp plane=13 | Cubeplot flat=1 \
	frame1=85 frame2=200 frame3=70 wantcoordlabel=-1 point1=.5 point2=1 title="Scattered sou.wvfld - square of hi vel " \
	label1="depth" label2="distance" label3="time" titlefat=1 titlesz=8 \
	> /dev/null out=$@
	pstexpen square.ddwrz2.perm.0.05.v square.ddwrz2.perm.0.05.ps ; epstopdf square.ddwrz2.perm.0.05.ps

#

square.ddwsz.-0.05.v: # Areal shot migration of synthesized data with no phase encoding applied.
	Window3d < square.ddwsz.-0.05.T min2=-2000 max2=2000 max1=1 | Transp plane=13 | Cubeplot flat=1 \
	frame1=85 frame2=200 frame3=70 wantcoordlabel=-1 point1=.5 point2=1 title="Scattered sou.wvfld - square of hi vel " label1="depth" label2="distance" label3="time" titlefat=1 titlesz=8 \
	> /dev/null out=$@
	pstexpen square.ddwsz.-0.05.v square.ddwsz.-0.05.ps ; epstopdf square.ddwsz.-0.05.ps

square.ddws.-0.05.v: # Areal shot migration of synthesized data with no phase encoding applied.
	Window3d < square.ddws.-0.05.T min2=-2000 max2=2000 max1=1 | Transp plane=13 | Cubeplot flat=1 \
	frame1=85 frame2=200 frame3=70 wantcoordlabel=-1 point1=.5 point2=1 title="Phase screened sou.wvfld - square of hi vel " label1="depth" label2="distance" label3="time" titlefat=1 titlesz=8 \
	> /dev/null out=$@
	pstexpen square.ddws.-0.05.v square.ddws.-0.05.ps ; epstopdf square.ddws.-0.05.ps

square.ddwsz.0.05.v: # Areal shot migration of synthesized data with no phase encoding applied.
	Window3d < square.ddwsz.0.05.T min2=-2000 max2=2000 max1=1 | Transp plane=13 | Cubeplot flat=1 \
	frame1=85 frame2=200 frame3=70 wantcoordlabel=-1 point1=.5 point2=1 title="Scattered sou.wvfld - square of lo vel " label1="depth" label2="distance" label3="time" titlefat=1 titlesz=8 \
	> /dev/null out=$@
	pstexpen square.ddwsz.0.05.v square.ddwsz.0.05.ps ; epstopdf square.ddwsz.0.05.ps

square.ddws.0.05.v: # Areal shot migration of synthesized data with no phase encoding applied.
	Window3d < square.ddws.0.05.T min2=-2000 max2=2000 max1=1 | Transp plane=13 | Cubeplot flat=1 \
	frame1=85 frame2=200 frame3=70 wantcoordlabel=-1 point1=.5 point2=1 title="Phase screened sou.wvfld - square of lo vel " label1="depth" label2="distance" label3="time" titlefat=1 titlesz=8 \
	> /dev/null out=$@
	pstexpen square.ddws.0.05.v square.ddws.0.05.ps ; epstopdf square.ddws.0.05.ps

square.ddwrz.-0.05.v: # Areal shot migration of synthesized data with no phase encoding applied.
	Window3d < square.ddwrz.-0.05.T min2=-2000 max2=2000 min1=1 max1=2 | Transp plane=13 | Cubeplot flat=1 \
	frame1=85 frame2=200 frame3=40 wantcoordlabel=-1 point1=.5 point2=1 title="Scattered rec.wvfld - square of hi vel " label1="depth" label2="distance" label3="time" titlefat=1 titlesz=8 \
	> /dev/null out=$@
	pstexpen square.ddwrz.-0.05.v square.ddwrz.-0.05.ps ; epstopdf square.ddwrz.-0.05.ps

square.ddwr.-0.05.v: # Areal shot migration of synthesized data with no phase encoding applied.
	Window3d < square.ddwr.-0.05.T min2=-2000 max2=2000 min1=1 max1=2 | Transp plane=13 | Cubeplot flat=1 \
	frame1=85 frame2=200 frame3=40 wantcoordlabel=-1 point1=.5 point2=1 title="Phase screened rec.wvfld - square of hi vel " label1="depth" label2="distance" label3="time" titlefat=1 titlesz=8 \
	> /dev/null out=$@
	pstexpen square.ddwr.-0.05.v square.ddwr.-0.05.ps ; epstopdf square.ddwr.-0.05.ps

square.ddwrz.0.05.v: # Areal shot migration of synthesized data with no phase encoding applied.
	Window3d < square.ddwrz.0.05.T min2=-2000 max2=2000 min1=1 max1=2 | Transp plane=13 | Cubeplot flat=1 \
	frame1=85 frame2=200 frame3=40 wantcoordlabel=-1 point1=.5 point2=1 title="Scattered rec.wvfld - square of lo vel " label1="depth" label2="distance" label3="time" titlefat=1 titlesz=8 \
	> /dev/null out=$@
	pstexpen square.ddwrz.0.05.v square.ddwrz.0.05.ps ; epstopdf square.ddwrz.0.05.ps

square.ddwr.0.05.v: # Areal shot migration of synthesized data with no phase encoding applied.
	Window3d < square.ddwr.0.05.T min2=-2000 max2=2000 min1=1 max1=2 | Transp plane=13 | Cubeplot flat=1 \
	frame1=85 frame2=200 frame3=40 wantcoordlabel=-1 point1=.5 point2=1 title="Phase screened rec.wvfld - square of lo vel " label1="depth" label2="distance" label3="time" titlefat=1 titlesz=8 \
	> /dev/null out=$@
	pstexpen square.ddwr.0.05.v square.ddwr.0.05.ps ; epstopdf square.ddwr.0.05.ps

square.bkim.0.05.v:
	Window3d <square.bkim.0.05.H min1=-2000 max1=2000|Transp plane=12 reshape=2,3|Grey eout=1 pclip=100 gainpanel=a >square.bkim.0.05.T
	<square.bkim.0.05.T Cubeplot flat=1 frame1=85 frame2=200 frame3=20 wantcoordlabel=-1 point1=1 point2=.5 \
	title="Background Image - square of lo vel " label1="depth" label3="offset" label2="distance" titlefat=1 titlesz=8 \
	> /dev/null out=$@
	pstexpen square.bkim.0.05.v square.bkim.0.05.ps ; epstopdf square.bkim.0.05.ps
	convert square.bkim.0.05.pdf square.bkim.0.05.jpg

square.Dimag2.0.05.v:
	Window3d <square.Dimag2.0.05.H min1=-2000 max1=2000|Transp plane=12 reshape=2,3|Grey eout=1 pclip=100 gainpanel=a >square.Dimag2.0.05.T
	<square.Dimag2.0.05.T Cubeplot flat=1 frame1=85 frame2=200 frame3=20 wantcoordlabel=-1 point1=1 point2=.5 \
	title="Background Image - square of lo vel " label1="depth" label3="offset" label2="distance" titlefat=1 titlesz=8 \
	> /dev/null out=$@
	pstexpen square.Dimag2.0.05.v square.Dimag2.0.05.ps ; epstopdf square.Dimag2.0.05.ps
	convert square.Dimag2.0.05.pdf square.Dimag2.0.05.jpg

square.bkim.-0.05.v:
	Window3d <square.bkim.-0.05.H min1=-2000 max1=2000|Transp plane=12 reshape=2,3|Grey eout=1 pclip=100 gainpanel=a >square.bkim.-0.05.T
	<square.bkim.-0.05.T Cubeplot flat=1 frame1=85 frame2=200 frame3=20 wantcoordlabel=-1 point1=1 point2=.5 \
	title="Background Image - square of lo vel " label1="depth" label3="offset" label2="distance" titlefat=1 titlesz=8 \
	> /dev/null out=$@
	pstexpen square.bkim.-0.05.v square.bkim.-0.05.ps ; epstopdf square.bkim.-0.05.ps
	convert square.bkim.-0.05.pdf square.bkim.-0.05.jpg

square.Dimag2.-0.05.v:
	Window3d <square.Dimag2.-0.05.H min1=-2000 max1=2000|Transp plane=12 reshape=2,3|Grey eout=1 pclip=100 gainpanel=a >square.Dimag2.-0.05.T
	<square.Dimag2.-0.05.T Cubeplot flat=1 frame1=85 frame2=200 frame3=20 wantcoordlabel=-1 point1=1 point2=.5 \
	title="Background Image - square of lo vel " label1="depth" label3="offset" label2="distance" titlefat=1 titlesz=8 \
	> /dev/null out=$@
	pstexpen square.Dimag2.-0.05.v square.Dimag2.-0.05.ps ; epstopdf square.Dimag2.-0.05.ps
	convert square.Dimag2.-0.05.pdf square.Dimag2.-0.05.jpg

square.Dslow2.-0.05.v:
	Window3d < square.Dslow2.-0.05.H min1=-2000 max1=2000 | Transp | Grey newclip=1 color=j \
	wantscalebar=1 > /dev/null out=$@
	pstexpen square.Dslow2.-0.05.v square.Dslow2.-0.05.ps invras=n fat=1 color=y
	epstopdf square.Dslow2.-0.05.ps;convert square.Dslow2.-0.05.pdf square.Dslow2.-0.05.jpg

square.Dslow2.0.05.v:
	Window3d < square.Dslow2.0.05.H min1=-2000 max1=2000 | Transp | Grey newclip=1 color=j \
	wantscalebar=1 > /dev/null out=$@
	pstexpen square.Dslow2.0.05.v square.Dslow2.-0.05.ps invras=n fat=1 color=y
	epstopdf square.Dslow2.0.05.ps;convert square.Dslow2.0.05.pdf square.Dslow2.0.05.jpg

square.Dslow4.-0.05.v:
	Window3d < square.Dslow4.-0.05.H min1=-2000 max1=2000 | Transp | Grey newclip=1 color=j \
	wantscalebar=1 > /dev/null out=$@
	pstexpen square.Dslow4.-0.05.v square.Dslow4.-0.05.ps invras=n fat=1 color=y
	epstopdf square.Dslow4.-0.05.ps;convert square.Dslow4.-0.05.pdf square.Dslow4.-0.05.jpg

square.Dslow4.0.05.v:
	Window3d < square.Dslow4.0.05.H min1=-2000 max1=2000 | Transp | Grey newclip=1 color=j \
	wantscalebar=1 > /dev/null out=$@
	pstexpen square.Dslow4.0.05.v square.Dslow4.0.05.ps invras=n fat=1 color=y
	epstopdf square.Dslow4.0.05.ps;convert square.Dslow4.0.05.pdf square.Dslow4.0.05.jpg

###########################################################
####
#### Lab
####
square1.slow.H: #OW_sqrvel.x
	./bin/OW_sqrvel.x back_vel=3000 vel_pert=0.1 xcenter=0 zcenter=300 extentx=300 extentz=300 slow_out=$@ > /dev/null

square.1.slow.H: #OW_sqrvel.x
	./bin/OW_sqrvel.x back_vel=3000 vel_pert=0.01 xcenter=0 zcenter=300 extentx=300 extentz=300 slow_out=$@ > /dev/null

square.1.dslow.H: 
	Math file1=square.1.slow.H file2=square1.bslow.H exp=file1-file2 > $@

square1.bslow.H: #OW_sqrvel.x
	./bin/OW_sqrvel.x back_vel=3000 vel_pert=0 slow_out=$@ > /dev/null

square1.dslow.H: square1.slow.H square1.bslow.H
	Math file1=square1.slow.H file2=square1.bslow.H exp=file1-file2 > $@

square1.model2: square1.slow.H
	Spike n2=2001 o2=-10000 d2=10 n1=201 o1=0 d1=10 > z.H;Math file1=z.H exp="file1*0+2" | \
	Mute vmute=0 tmute=600 > y.H; Math file1=y.H exp="file1+1" > z.H
	Wavelet n1=251 d1=0.004 wavelet=ricker2 phase=0 fund=25 order=0.2 tdelay=.5 domain=time > j2.H;echo o1=-.5 >> j2.H
	<j2.H Transf f_min=0 f_min1=4 f_max1=42 f_max=48 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs |Smooth rect1=7 > 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 > square.csou.H
	Math file1=square1.slow.H exp="1/file1" | Window3d | Transp > square1.slow.tr.H
	../ShtPSPI/bin/OWmod2d_par.x sou=square.csou.H vel=square1.slow.tr.H \
	vreflect=z.H shots=square1.crec.H \
	vsal=3500 nrefvel=4 traces_in_taper=150 padtraces=0 xmin=-9500 xmax=9500 \
	nrec=201 orec=-1000 drec=10 nsht=51 osht=-2000 dsht=80 zmin=0 zmax=1000 node=15 > /dev/null

square.1.model2: square1.slow.H
	Spike n2=2001 o2=-10000 d2=10 n1=201 o1=0 d1=10 > z.H;Math file1=z.H exp="file1*0+2" | \
	Mute vmute=0 tmute=600 > y.H; Math file1=y.H exp="file1+1" > z.H
	Wavelet n1=251 d1=0.004 wavelet=ricker2 phase=0 fund=25 order=0.2 tdelay=.5 domain=time > j2.H;echo o1=-.5 >> j2.H
	<j2.H Transf f_min=0 f_min1=4 f_max1=42 f_max=48 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs |Smooth rect1=7 > 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 > square.csou.H
	Math file1=square.1.slow.H exp="1/file1" | Window3d | Transp > square.1.slow.tr.H
	../ShtPSPI/bin/OWmod2d_par.x sou=square.csou.H vel=square.1.slow.tr.H \
	vreflect=z.H shots=square.1.crec.H \
	vsal=3500 nrefvel=4 traces_in_taper=150 padtraces=0 xmin=-9500 xmax=9500 \
	nrec=201 orec=-1000 drec=10 nsht=51 osht=-2000 dsht=80 zmin=0 zmax=1000 node=15 > /dev/null

square3.model2:
	Spike n2=2001 o2=-10000 d2=10 n1=201 o1=0 d1=10 > z.H;Math file1=z.H exp="file1*0+2" | \
	Mute vmute=0 tmute=600 > y.H; Math file1=y.H exp="file1+1" > z.H
	Spike n1=251 d1=0.004 o1=-.5 n2=1 o2=0 d2=1 n3=1 o3=0 d3=1 nsp=1 k1=126 | Bandpass flo=2 fhi=48 | Transf f_min=0 f_min1=4 \
	f_max1=40 f_max=48 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs |Smooth rect1=3 > 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 > square.csou.H
	Math file1=square1.slow.H exp="1/file1" | Window3d | Transp > square1.slow.tr.H
	../ShtPSPI/bin/OWmod2d_par.x sou=square.csou.H vel=square1.slow.tr.H \
	vreflect=z.H shots=square.crec.bpf.H extrapolator=ffd \
	vsal=3500 nrefvel=4 traces_in_taper=150 padtraces=0 xmin=-9500 xmax=9500 \
	nrec=201 orec=-1000 drec=10 nsht=51 osht=-2000 dsht=80 zmin=0 zmax=1700 node=15 > /dev/null

square.3.model2:
	Spike n2=2001 o2=-10000 d2=10 n1=201 o1=0 d1=10 > z.H;Math file1=z.H exp="file1*0+2" | \
	Mute vmute=0 tmute=600 > y.H; Math file1=y.H exp="file1+1" > z.H
	Spike n1=251 d1=0.004 o1=-.5 n2=1 o2=0 d2=1 n3=1 o3=0 d3=1 nsp=1 k1=126 | Bandpass flo=2 fhi=48 | Transf f_min=0 f_min1=4 \
	f_max1=40 f_max=48 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs |Smooth rect1=3 > 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 > square.csou.H
	Math file1=square.1.slow.H exp="1/file1" | Window3d | Transp > square.1.slow.tr.H
	../ShtPSPI/bin/OWmod2d_par.x sou=square.csou.H vel=square.1.slow.tr.H \
	vreflect=z.H shots=square.crec.bpf.1.H extrapolator=ffd \
	vsal=3500 nrefvel=4 traces_in_taper=150 padtraces=0 xmin=-9500 xmax=9500 \
	nrec=201 orec=-1000 drec=10 nsht=51 osht=-2000 dsht=80 zmin=0 zmax=1700 node=15 > /dev/null

square1.Dimag.%.H: 
	Wavelet n1=1001 d1=0.004 wavelet=ricker2 phase=0 fund=15 order=0.2 tdelay=2 domain=time > j2.H;echo o1=-2.0 >> j2.H
	<j2.H Transf f_min=0 f_min1=4 f_max1=32 f_max=38 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs |Smooth rect1=7 > j2.H
	Math file1=j2.H exp="file1*0">j1.H;Cmplx j2.H j1.H|Transp plane=13 > square.csou.H
	../Tese/bin/OWwemva_opers.x sou=square.csou.H rec=square.crec1.$*.H \
	vel=square.bslow.H vsal=2500 nrefvel=1 deltaS=square.dslow.$*.H \
	zmin=0 zmax=2000 nh=31 oh=-150 jh=1 adj=0 areal=0 \
	padtraces=0 traces_in_taper=25 node=14 > $@ 

square1.Dslow.%.H: #square.bslow.H square.dslow.%.H square.csou.H square.crec.%.H square.Dimag.%.H #OWwemva_opers.x 
	Wavelet n1=1001 d1=0.004 wavelet=ricker2 phase=0 fund=15 order=0.2 tdelay=2 domain=time > j2.H;echo o1=-2.0 >> j2.H
	<j2.H Transf f_min=0 f_min1=4 f_max1=32 f_max=38 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs |Smooth rect1=7 > j2.H
	Math file1=j2.H exp="file1*0">j1.H;Cmplx j2.H j1.H|Transp plane=13 > square.csou.H
	../Tese/bin/OWwemva_opers.x sou=square.csou.H rec=square.crec1.$*.H \
	vel=square.bslow.H vsal=2500 nrefvel=1 deltaI=square.Dimag.$*.H \
	ddws=square.ddws.$*.H ddwsz=square.ddwsz.$*.H ddwr=square.ddwr.$*.H ddwrz=square.ddwrz.$*.H \
	zmin=0 zmax=2000 nh=31 oh=-150 jh=1 adj=1 areal=0 \
	padtraces=0 traces_in_taper=25 node=14 > $@ 

square1.model3: square1.slow.H
	Spike n2=2001 o2=-10000 d2=10 n1=201 o1=0 d1=10 > z.H;Math file1=z.H exp="file1*0+2" | \
	Mute vmute=0 tmute=600 > y.H; Math file1=y.H exp="file1+1" > z.H
	Wavelet n1=751 d1=0.004 wavelet=ricker2 phase=0 fund=35 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=52 f_max=60 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs |Smooth rect1=7 > 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 > square.csou.H
	Math file1=square1.slow.H exp="1/file1" | Window3d | Transp > square1.slow.tr.H
	../ShtPSPI/bin/OWmod2d_par.x sou=square.csou.H vel=square1.slow.tr.H \
	vreflect=z.H shots=square2.crec.H \
	vsal=3500 nrefvel=4 traces_in_taper=150 padtraces=0 xmin=-9500 xmax=9500 \
	nrec=1201 orec=-6000 drec=10 nsht=51 osht=-2000 dsht=80 zmin=0 zmax=700 node=4 > /dev/null

square.1.model3: square1.slow.H
	Spike n2=2001 o2=-10000 d2=10 n1=201 o1=0 d1=10 > z.H;Math file1=z.H exp="file1*0+2" | \
	Mute vmute=0 tmute=600 > y.H; Math file1=y.H exp="file1+1" > z.H
	Wavelet n1=751 d1=0.004 wavelet=ricker2 phase=0 fund=35 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=52 f_max=60 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs |Smooth rect1=7 > 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 > square.csou.H
	Math file1=square.1.slow.H exp="1/file1" | Window3d | Transp > square.1.slow.tr.H
	../ShtPSPI/bin/OWmod2d_par.x sou=square.csou.H vel=square.1.slow.tr.H \
	vreflect=z.H shots=square.1.crec.H extrapolator=pspi \
	vsal=3500 nrefvel=4 traces_in_taper=150 padtraces=0 xmin=-9500 xmax=9500 \
	nrec=1201 orec=-6000 drec=10 nsht=51 osht=-2000 dsht=80 zmin=0 zmax=700 node=14 > /dev/null

#############################################
#
#
# Testing renormalization 0.01
#
square.csou.H:
	Spike n1=251 d1=0.004 o1=-.5 n2=1 o2=0 d2=1 n3=1 o3=0 d3=1 nsp=1 k1=126 | Bandpass flo=2 fhi=48 | Transf f_min=0 f_min1=4 \
	f_max1=40 f_max=48 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs |Smooth rect1=3 > 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 > $@

square.3.tkim:
	echo n6=1 o6=0 d6=1 >> square.crec.bpf.1.H
	./bin/OWmig2d_areal.x sou=square.csou.H rec=square.crec.bpf.1.H vel=square.1.slow.H bkgimg=square.3.tkim.H \
	extrapolator=ffd zmin=0 zmax=1000 nh=51 oh=-250 jh=1 areal=0 migration=1 \
	padtraces=0 traces_in_taper=25 node=14 > /dev/null

square.3.bkim:
	./bin/OWmig2d_areal.x sou=square.csou.H rec=square.crec.bpf.1.H vel=square1.bslow.H bkgimg=square.3.bkim.H \
	extrapolator=ffd zmin=0 zmax=1000 nh=51 oh=-250 jh=1 areal=0 migration=1 \
	padtraces=0 traces_in_taper=25 node=14 > /dev/null

square.3.dkim:
	Math file1=square.3.tkim.H file2=square.3.bkim.H exp=file1-file2 > square.3.dkim.H

square.3.Dimag.H: 
	../Tese/bin/OWwemva_opers.x sou=square.csou.H rec=square.crec.bpf.1.H \
	vel=square1.bslow.H deltaS=square.1.dslow.H \
	zmin=0 zmax=1000 nh=51 oh=-250 jh=1 adj=0 areal=0 extrapolator=ffd born2=0 renorm=0 \
	padtraces=0 traces_in_taper=25 node=14 > $@ 

square.3.Dslow.H:
	../Tese/bin/OWwemva_opers.x sou=square.csou.H rec=square.crec.bpf.1.H \
	vel=square1.bslow.H deltaI=square.3.Dimag.H \
	zmin=0 zmax=1000 nh=51 oh=-250 jh=1 adj=1 areal=0 extrapolator=ffd born2=0 renorm=0 \
	padtraces=0 traces_in_taper=25 node=14 > $@ 


square.3.Dimag.renorm.H: 
	../Tese/bin/OWwemva_opers.x sou=square.csou.H rec=square.crec.bpf.1.H \
	vel=square1.bslow.H deltaS=square.1.dslow.H \
	zmin=0 zmax=1000 nh=51 oh=-250 jh=1 adj=0 areal=0 extrapolator=ffd born2=0 renorm=1 \
	padtraces=0 traces_in_taper=25 node=14 > $@ 

square.3.Dslow.renorm.H:
	../Tese/bin/OWwemva_opers.x sou=square.csou.H rec=square.crec.bpf.1.H \
	vel=square1.bslow.H deltaI=square.3.Dimag.renorm.H \
	zmin=0 zmax=1000 nh=51 oh=-250 jh=1 adj=1 areal=0 extrapolator=ffd born2=0 renorm=1 \
	padtraces=0 traces_in_taper=25 node=14 > $@ 

sq.3renorm: # 
	Spike n1=251 d1=0.004 o1=-.5 n2=1 o2=0 d2=1 n3=1 o3=0 d3=1 nsp=1 k1=126 | Bandpass flo=2 fhi=60 | Transf f_min=0 f_min1=4 \
	f_max1=50 f_max=58 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs |Smooth rect1=3 > 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 > square.csou.H
	Window3d < square.crec.bpf.H squeeze=n n4=4 f4=25 > r1.H 
	../Tese/bin/OW_lbfgsc_scat2.x sou=square.csou.H rec=square.crec.bpf.H \
	vel=square1.bslow.H grad=square3.grad.H Dimage=square3.dimg.H bkgimg=square3.bimg.H Velout=square3.vout.H \
	zmin=0 zmax=1000 nh=31 oh=-150 jh=1 niter=5 dso=1 inversion=1 areal=0 mmax=5 xv_min=-2500 xv_max=2500 \
	dxk= 100 nxk= 58 oxk= -2750 dzk= 20 nzk= 51 \
	extrapolator=ffd padtraces=0 traces_in_taper=25 node=14 bounds=1 vmin=2800 vmax=3500 cbounds=1 \
	log=log_bfgs_square3 list=listagem_bfgs_square3 nitercg=5 epscg=0 .1 renorm=1 # dkws=dkws dkwr=dkwr bkws=bkws bkwr=bkwr

#############################################
#
#
# Testing renormalization 0.1
#
square3.tkim:
	echo n6=1 o6=0 d6=1 >> square.crec.bpf.H
	./bin/OWmig2d_areal.x sou=square.csou.H rec=square.crec.bpf.H vel=square1.slow.H bkgimg=square3.tkim.H \
	extrapolator=ffd zmin=0 zmax=1000 nh=51 oh=-250 jh=1 areal=0 migration=1 \
	padtraces=0 traces_in_taper=25 node=14 > /dev/null

square3.bkim:
	./bin/OWmig2d_areal.x sou=square.csou.H rec=square.crec.bpf.H vel=square1.bslow.H bkgimg=square3.bkim.H \
	extrapolator=ffd zmin=0 zmax=1000 nh=51 oh=-250 jh=1 areal=0 migration=1 \
	padtraces=0 traces_in_taper=25 node=14 > /dev/null

square3.dkim:
	Math file1=square3.tkim.H file2=square3.bkim.H exp=file1-file2 > square3.dkim.H

square3.Dimag.H:
	../Tese/bin/OWwemva_opers.x sou=square.csou.H rec=square.crec.bpf.H \
	vel=square1.bslow.H deltaS=square1.dslow.H \
	zmin=0 zmax=1000 nh=51 oh=-250 jh=1 adj=0 areal=0 extrapolator=ffd born2=0 renorm=0 \
	padtraces=0 traces_in_taper=25 node=14 > $@ 

square3.Dimag.a.H:
	../Tese/bin/OWwemva_opers.x sou=square.csou.a.H rec=square.crec.bpf.H \
	vel=square1.bslow.H deltaS=square1.dslow.H \
	zmin=0 zmax=1000 nh=51 oh=-250 jh=1 adj=0 areal=0 extrapolator=ffd born2=0 renorm=0 \
	padtraces=0 traces_in_taper=25 node=14 > $@ 

square3.Dslow.H:
	../Tese/bin/OWwemva_opers.x sou=square.csou.H rec=square.crec.bpf.H square1.crec.H \
	vel=square1.bslow.H deltaI=square3.Dimag.H \
	zmin=0 zmax=1000 nh=51 oh=-250 jh=1 adj=1 areal=0 extrapolator=ffd born2=0 renorm=0 \
	padtraces=0 traces_in_taper=25 node=14 > $@ 


square3.Dimag.renorm.H: 
	../Tese/bin/OWwemva_opers.x sou=square.csou.H rec=square.crec.bpf.H \
	vel=square1.bslow.H deltaS=square1.dslow.H \
	zmin=0 zmax=1000 nh=51 oh=-250 jh=1 adj=0 areal=0 extrapolator=ffd born2=0 renorm=1 \
	padtraces=0 traces_in_taper=25 node=14 > $@ 

square3.Dimag.renorm.a.H: 
	Spike n1=251 d1=0.004 o1=-.5 n2=1 o2=0 d2=1 n3=1 o3=0 d3=1 nsp=1 k1=126 | Bandpass flo=2 fhi=60 | Transf f_min=0 f_min1=4 \
	f_max1=40 f_max=48 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs |Smooth rect1=3 > 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 > square.csou.a.H
	../Tese/bin/OWwemva_opers.x sou=square.csou.a.H rec=square.crec.bpf.H \
	vel=square1.bslow.H deltaS=square1.dslow.H \
	zmin=0 zmax=1000 nh=51 oh=-250 jh=1 adj=0 areal=0 extrapolator=ffd born2=0 renorm=1 \
	padtraces=0 traces_in_taper=25 node=14 > $@ # dkws=dkws dkwr=dkwr bkws=bkws bkwr=bkwr > $@ 

square3.Dslow.renorm.H: #square.bslow.H square.dslow.%.H square.csou.H square.crec.%.H square.Dimag.%.H #OWwemva_opers.x 
#	Wavelet n1=251 d1=0.004 wavelet=ricker2 phase=0 fund=15 order=0.2 tdelay=.5 domain=time > j2.H;echo o1=-.5 >> j2.H
#	<j2.H Transf f_min=0 f_min1=4 f_max1=42 f_max=48 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs |Smooth rect1=7 > 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 > square.csou.H
	Spike n1=251 d1=0.004 o1=-.5 n2=1 o2=0 d2=1 n3=1 o3=0 d3=1 nsp=1 k1=126 | Bandpass flo=2 fhi=60 | Transf f_min=0 f_min1=4 \
	f_max1=50 f_max=58 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs |Smooth rect1=3 > 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 > square.csou.H
	../Tese/bin/OWwemva_opers.x sou=square.csou.H rec=square.crec.bpf.H square1.crec.H \
	vel=square1.bslow.H deltaI=square3.Dimag.renorm.H \
	zmin=0 zmax=1000 nh=51 oh=-250 jh=1 adj=1 areal=0 extrapolator=ffd renorm=1 \
	padtraces=0 traces_in_taper=25 node=14 > $@ 

sq3renorm.0.1: # 
	Spike n1=251 d1=0.004 o1=-.5 n2=1 o2=0 d2=1 n3=1 o3=0 d3=1 nsp=1 k1=126 | Bandpass flo=2 fhi=60 | Transf f_min=0 f_min1=4 \
	f_max1=40 f_max=48 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs |Smooth rect1=3 > 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 > square.csou.H
	Window3d < square.crec.bpf.H squeeze=n n4=1 f4=25 > r1.H 
	../Tese/bin/OW_renorm01.x sou=square.csou.H rec=r1.H square.crec.bpf.H \
	vel=square1.bslow.H Velout=square3.vout.0.1.H \
	zmin=0 zmax=1000 nh=31 oh=-150 jh=1 niter=150 nl_iter=1 cgsolv=reg P_image=square3.Dimag.H dso=1 inversion=0 areal=0 xv_min=-2500 xv_max=2500 \
	dxk= 100 nxk= 58 oxk= -2750 dzk= 20 nzk= 51 Vrenorm=square3.Vrenorm.0.1.H \
	extrapolator=ffd padtraces=0 traces_in_taper=25 node=14 \
	log=log_bfgs_square3.0.1 list=listagem_bfgs_square3.0.1 epscg=1. renorm=1 dkws=dkws dkwr=dkwr bkws=bkws bkwr=bkwr

#############################################
#
#
# Testing renormalization 0.3
#
square1.slow.0.3.H: #OW_sqrvel.x
	./bin/OW_sqrvel.x back_vel=3000 vel_pert=0.3 xcenter=0 zcenter=600 extentx=600 extentz=600 slow_out=1.H > /dev/null
	Window3d < 1.H|Transp|Window3d j2=2| Pad extend=1 end1=100 |Transp plane=12 reshape=1,3 > $@

square1.bslow.0.3.H:
	Math file1=square1.slow.0.3.H exp="file1*0+1/3000" > $@

square1.dslow.0.3.H:
	Math file1=square1.slow.0.3.H file2=square1.bslow.0.3.H exp="file1-1/3000" > $@

square3.model2.0.3:
	Spike n2=2001 o2=-10000 d2=10 n1=201 o1=0 d1=10 > z.H;Math file1=z.H exp="file1*0+2" | \
	Mute vmute=0 tmute=600 > y.H; Math file1=y.H exp="file1+1" > z.H
	Spike n1=401 d1=0.004 o1=-.8 n2=1 o2=0 d2=1 n3=1 o3=0 d3=1 nsp=1 k1=126 | Bandpass flo=2 fhi=48 | Transf f_min=0 f_min1=4 \
	f_max1=40 f_max=48 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs |Smooth rect1=3 > 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 > square.csou.H
	Math file1=square1.slow.0.3.H exp="1/file1" | Window3d | Transp > square1.slow.0.3.tr.H
	../ShtPSPI/bin/OWmod2d_par.x sou=square.csou.H vel=square1.slow.0.3.tr.H \
	vreflect=z.H shots=square.crec.bpf.0.3.H extrapolator=ffd \
	vsal=3500 nrefvel=4 traces_in_taper=150 padtraces=0 xmin=-9500 xmax=9500 \
	nrec=201 orec=-1000 drec=10 nsht=51 osht=-2000 dsht=80 zmin=0 zmax=1700 node=15 > /dev/null &

square3.ikim.0.3:
	echo n6=1 o6=0 d6=1 >> r1.H
	./bin/OWmig2d_areal.x sou=square.csou.H rec=r1.H vel=square3.vout.born.0.3.H bkgimg=square3.ikim.0.3.H \
	extrapolator=ffd zmin=0 zmax=1000 nh=51 oh=-250 jh=1 areal=0 migration=1 \
	padtraces=0 traces_in_taper=25 node=14 > /dev/null

square3.tkim.0.3:
	echo n6=1 o6=0 d6=1 >> square.crec.bpf.0.3.H
	./bin/OWmig2d_areal.x sou=square.csou.H rec=square.crec.bpf.0.3.H vel=square1.slow.0.3.H bkgimg=square3.tkim.0.3.H \
	extrapolator=ffd zmin=0 zmax=1000 nh=51 oh=-250 jh=1 areal=0 migration=1 \
	padtraces=0 traces_in_taper=25 node=14 > /dev/null

square3.bkim.0.3:
	./bin/OWmig2d_areal.x sou=square.csou.H rec=square.crec.bpf.0.3.H vel=square1.bslow.H bkgimg=square3.bkim.0.3.H \
	extrapolator=ffd zmin=0 zmax=1000 nh=51 oh=-250 jh=1 areal=0 migration=1 \
	padtraces=0 traces_in_taper=25 node=14 > /dev/null

square3.dkim.0.3:
	Math file1=square3.tkim.0.3.H file2=square3.bkim.0.3.H exp=file1-file2 > square3.dkim.0.3.H

square3.Dimag.0.3.H:
	../Tese/bin/OWwemva_opers.x sou=square.csou.H rec=square.crec.bpf.0.3.H \
	vel=square1.bslow.H deltaS=square1.dslow.0.3.H \
	zmin=0 zmax=1000 nh=51 oh=-250 jh=1 adj=0 areal=0 extrapolator=ffd born2=0 renorm=0 \
	padtraces=0 traces_in_taper=25 node=14 > $@ 

square3.Dslow.0.3.H:
	../Tese/bin/OWwemva_opers.x sou=square.csou.H rec=square.crec.bpf.0.3.H \
	vel=square1.bslow.H deltaI=square3.Dimag.0.3.H \
	zmin=0 zmax=1000 nh=51 oh=-250 jh=1 adj=1 areal=0 extrapolator=ffd born2=0 renorm=0 \
	padtraces=0 traces_in_taper=25 node=14 > $@ 

square.csou.H:
	Spike n1=401 d1=0.004 o1=-.8 n2=1 o2=0 d2=1 n3=1 o3=0 d3=1 nsp=1 k1=126 | Bandpass flo=2 fhi=48 | Transf f_min=0 f_min1=4 \
	f_max1=40 f_max=48 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs |Smooth rect1=3 > 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 > $@

square3.Dimag.renorm.0.3.H: 
	Spike n1=401 d1=0.004 o1=-.8 n2=1 o2=0 d2=1 n3=1 o3=0 d3=1 nsp=1 k1=126 | Bandpass flo=2 fhi=48 | Transf f_min=0 f_min1=4 \
	f_max1=40 f_max=48 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs |Smooth rect1=3 > 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 > square.csou.H
	Window3d < square.crec.bpf.0.3.H squeeze=n n4=4 f4=25 > r1.H 
	../Tese/bin/OWwemva_opers.x sou=square.csou.H rec=square.crec.bpf.0.3.H \
	vel=square1.bslow.H deltaS=square1.dslow.0.3.H \
	zmin=0 zmax=1000 nh=51 oh=-250 jh=1 adj=0 areal=0 extrapolator=ffd born2=0 renorm=1 \
	padtraces=0 traces_in_taper=25 node=14 > $@ 

sq3renorm.0.3: # 
	Spike n1=401 d1=0.004 o1=-.8 n2=1 o2=0 d2=1 n3=1 o3=0 d3=1 nsp=1 k1=126 | Bandpass flo=2 fhi=48 | Transf f_min=0 f_min1=4 \
	f_max1=40 f_max=48 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs |Smooth rect1=3 > 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|Window3d squeeze=n f3=1 > square.csou.H
	Math file1=square.crec.bpf.0.3.H exp="file1*1" | Window3d squeeze=n n4= f4= f3=1 > r1.H
	../Tese/bin/OWwemva_opers.x sou=square.csou.H rec=r1.H square.crec.bpf.0.3.H \
	vel=square1.bslow.H deltaS=square1.dslow.0.3.H \
	zmin=0 zmax=1000 nh=31 oh=-150 jh=1 adj=0 areal=0 extrapolator=ffd born2=0 renorm=0 \
	padtraces=0 traces_in_taper=25 node=14 > img1.H
	../Tese/bin/OW_renorm01.x sou=square.csou.H rec=r1.H square.crec.bpf.0.3.H \
	vel=square1.bslow.H Velout=square3.vout.0.3.H \
	zmin=0 zmax=1000 nh=31 oh=-150 jh=1 niter=25 nl_iter=1 cgsolv=reg P_image=img1.H dso=1 inversion=0 areal=0 xv_min=-2500 xv_max=2500 \
	dxk= 100 nxk= 58 oxk= -2750 dzk= 20 nzk= 51 Vrenorm=square3.Vrenorm.H \
	extrapolator=ffd vsal=3500 nrefvel=1 padtraces=0 traces_in_taper=25 node=14 dot=0 \
	log=log_bfgs_square3.0.3 list=listagem_bfgs_square3.0.3 epscg=0.0001 renorm=1 dkws=dkws dkwr=dkwr bkws=bkws bkwr=bkwr
#	Window3d < square3.Dimag.renorm.0.3.H | Transp plane=24|Stack3d| Transp plane=24 |Window3d> img1.H

sq3renorm.0.3a: # 
	Spike n1=401 d1=0.004 o1=-.8 n2=1 o2=0 d2=1 n3=1 o3=0 d3=1 nsp=1 k1=126 | Bandpass flo=2 fhi=48 | Transf f_min=0 f_min1=4 \
	f_max1=40 f_max=48 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs |Smooth rect1=3 > 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|Window3d squeeze=n f3=1 > square.csou.H
	Math file1=square.crec.bpf.0.3.H exp="file1*1" | Window3d squeeze=n n4=3 f4=23 f3=1 > r1.H
	../Tese/bin/OWwemva_opers.x sou=square.csou.H rec=r1.H square.crec.bpf.0.3.H \
	vel=square1.bslow.H deltaS=square1.dslow.0.3.H \
	zmin=0 zmax=1000 nh=31 oh=-150 jh=1 adj=0 areal=0 extrapolator=ffd born2=0 renorm=0 \
	padtraces=0 traces_in_taper=25 node=14 > img1.H
	../Tese/bin/OW_renorm01.x sou=square.csou.H rec=r1.H square.crec.bpf.0.3.H vel=square1.bslow.H Velout=square3.vout.renorm.0.3.H \
	zmin=0 zmax=1000 nh=31 oh=-150 jh=1 niter=3 10 nl_iter=1 cgsolv=reg P_image=img1.H dso=1 inversion=0 areal=0 xv_min=-2500 xv_max=2500 \
	dxk= 100 nxk= 58 oxk= -2750 dzk= 20 nzk= 51 Vrenorm=square3.Vrenorm.H \
	extrapolator=ffd padtraces=0 traces_in_taper=25 node=14 dot=0 \
	log=log_bfgs_square3.0.3 list=listagem_bfgs_square3.0.3 epscg=0.0001 renorm=1 dkws=dkws dkwr=dkwr bkws=bkws bkwr=bkwr
#	Window3d < square3.Dimag.renorm.0.3.H | Transp plane=24|Stack3d| Transp plane=24 |Window3d> img1.H

sq3born.0.3: # 
	Spike n1=401 d1=0.004 o1=-.8 n2=1 o2=0 d2=1 n3=1 o3=0 d3=1 nsp=1 k1=126| Bandpass flo=2 fhi=48 | Transf f_min=0 f_min1=4 \
	f_max1=40 f_max=48 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs |Smooth rect1=3 > 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|Window3d squeeze=n f3=1 > square.csou.H
	Math file1=square.crec.bpf.0.3.H exp="file1*1" | Window3d squeeze=n n4= 3 f4= 24 f3=1 > r1.H
	../Tese/bin/OWwemva_opers.x sou=square.csou.H rec=r1.H square.crec.bpf.0.3.H \
	vel=square1.bslow.H deltaS=square1.dslow.0.3.H \
	zmin=0 zmax=1000 nh=31 oh=-150 jh=1 adj=0 areal=0 extrapolator=ffd born2=0 renorm=0 \
	padtraces=0 traces_in_taper=25 node=14 > img1.H
	../Tese/bin/OW_renorm01.x sou=square.csou.H rec=r1.H square.crec.bpf.0.3.H \
	vel=square1.bslow.H Velout=square3.vout.born.0.3.H \
	zmin=0 zmax=1000 nh=31 oh=-150 jh=1 niter=10 35 nl_iter=1 cgsolv=reg P_image=img1.H dso=1 \
	inversion=0 areal=0 xv_min=-2500 xv_max=2500 \
	dxk= 100 nxk= 58 oxk= -2750 dzk= 20 nzk= 51 \
	extrapolator=ffd padtraces=0 traces_in_taper=25 node=14 dot=0 \
	log=log_bfgs_square3.0.3 list=listagem_bfgs_square3.0.3 epscg=0.0001 renorm=0 \
	mmov=square3.mmov.born.0.3.H rmov=square3.rmov.born.0.3.H err=square3.err.born.0.3.H
#	Window3d < square3.Dimag.renorm.0.3.H | Transp plane=24|Stack3d| Transp plane=24 |Window3d> img1.H

sq3bfgs.0.3:
	Spike n1=401 d1=0.004 o1=-.8 n2=1 o2=0 d2=1 n3=1 o3=0 d3=1 nsp=1 k1=126 | Bandpass flo=2 fhi=48 | Transf f_min=0 f_min1=4 \
	f_max1=40 f_max=48 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs |Smooth rect1=3 > 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 > square.csou.H
	Math file1=square1.slow.0.3.H exp="file1*1.2" > vvv.H
	../Tese/bin/OW_lbfgsc_areal.x sou=square.csou.H rec=square.crec.bpf.0.3.H \
	vel=vvv.H square1.bslow.H grad=square3.grad.0.3.H \
	Dimage=square3.dso.0.3.H bkgimg=square3.bkimg.0.3.H Velout=square3.vout.0.3.H \
	zmin=0 zmax=1000 nh=31 oh=-150 jh=1 niter=25 dso=1 inversion=1 areal=0 mmax=15 xv_min=-2500 xv_max=2500 \
	dxk=100 nxk=58 oxk=-2750 dzk=20 nzk=51 \
	log=log_bfgs_square3.0.3 list=listagem_bfgs_square3.0.3 \
	padtraces=0 traces_in_taper=25 node=14 bounds=1 vmin=2000 vmax=4000 cbounds=1 extrapolator=ffd

# reflectors at 0.5,1,1.5,2 km
square4.model2.0.3:
	Spike n2=1001 o2=-10000 d2=20 n1=301 o1=0 d1=10 > z.H;Math file1=z.H exp="file1*0+1" | \
	Mute vmute=0 tmute=0500 > 1.H; 
	Spike n2=1001 o2=-10000 d2=20 n1=301 o1=0 d1=10 > z.H;Math file1=z.H exp="file1*0+1" | \
	Mute vmute=0 tmute=1500 > 3.H;
	Math file1=1.H file2=3.H exp="file1+file2+1" > z.H
	Spike n1=401 d1=0.005 o1=-1. n2=1 o2=0 d2=1 n3=1 o3=0 d3=1 nsp=1 k1=201|Bandpass flo=2 fhi=36| Transf f_min=0 f_min1=4 \
	f_max1=32 f_max=36 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs |Smooth rect1=3 > 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 | Window3d squeeze=n f3=1 > square.csou.H
	Math file1=square1.slow.0.3.H exp="1/file1" | Window3d | Transp > square1.slow.0.3.tr.H
	../ShtPSPI/bin/OWmod2d_par.x sou=square.csou.H vel=square1.slow.0.3.tr.H \
	vreflect=z.H shots=square4.crec.bpf.0.3.H extrapolator=ffd \
	traces_in_taper=50 padtraces=100 xmin=-9500 xmax=9500 \
	nrec=201 orec=-2000 drec=20 nsht=51 osht=-2000 dsht=80 zmin=0 zmax=1700 node=15 > /dev/null

square4.ikim.0.3:
	echo n6=1 o6=0 d6=1 >> r1.H
	./bin/OWmig2d_areal.x sou=square.csou.H rec=r1.H vel=square3.vout.born.0.3.H bkgimg=square3.ikim.0.3.H \
	extrapolator=ffd zmin=0 zmax=1000 nh=51 oh=-250 jh=1 areal=0 migration=1 \
	padtraces=0 traces_in_taper=25 node=14 > /dev/null

square4.tkim.0.3:
	echo n6=1 o6=0 d6=1 >> square4.crec.bpf.0.3.H
	./bin/OWmig2d_areal.x sou=square.csou.H rec=square4.crec.bpf.0.3.H vel=square1.slow.0.3.H bkgimg=square4.tkim.0.3.H \
	extrapolator=ffd zmin=0 zmax=2000 nh=25 oh=-240 jh=1 areal=0 migration=1 \
	padtraces=0 traces_in_taper=25 node=14 > /dev/null

square4.bkim.0.3:
	./bin/OWmig2d_areal.x sou=square.csou.H rec=square4.crec.bpf.0.3.H vel=square1.bslow.0.3.H bkgimg=square4.bkim.0.3.H \
	extrapolator=ffd zmin=0 zmax=2000 nh=25 oh=-240 jh=1 areal=0 migration=1 \
	padtraces=0 traces_in_taper=25 node=14 > /dev/null

square4.scan.rho.H:
	Window3d < square4.bkimIPT40.0.3.H min1=-1000 max1=1000 > x.H
	../Tese/bin/OW_resmig.x nrho=401 orho=0.95 drho=0.001 bkgimg=x.H square4.bkimIPT40.0.3.H Dimage=$@ scan=1 node=14

square4.rhorms.H:
	Math file1=square1.slow.0.3.H file2=square1.bslow.0.3.H exp="file2/file1" | ../Tese/bin/OW_vrms.x int2rms=1 > $@

square4.resmig.H:
	Window3d squeeze=n min1=-8220 n1=829 n3=251 < square4.rhorms.H | Smooth rect1=13 rect2=1 rect3=1 > square4.rhorms.ltd.H
	../Tese/bin/OW_resmig.x nrho=201 orho=0.95 drho=0.001 rhoxz=square4.rhorms.ltd.H bkgimg=square4.bkimIPT40.0.3.H Dimage=$@ \
	resmigx=1 node=14 xxx=xxx.H

square4.dkim.0.3:
	Math file1=square4.tkim.0.3.H file2=square4.bkim.0.3.H exp=file1-file2 > square4.dkim.0.3.H

square4.Dimag.0.3.H:
	Spike n1=401 d1=0.005 o1=-1. n2=1 o2=0 d2=1 n3=1 o3=0 d3=1 nsp=1 k1=201|Bandpass flo=2 fhi=36| Transf f_min=0 f_min1=4 \
	f_max1=32 f_max=36 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs |Smooth rect1=3 > 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 | Window3d squeeze=n f3=1 > square.csou.H
	../Tese/bin/OWwemva_opers.x sou=square.csou.H rec=square4.crec.bpf.0.3.H \
	vel=square1.bslow.0.3.H deltaS=square1.dslow.0.3.H \
	zmin=0 zmax=2000 nh=25 oh=-240 jh=1 adj=0 areal=0 extrapolator=ffd born2=0 renorm=0 \
	padtraces=0 traces_in_taper=25 node=14 dkws=dkws4 dkwr=dkwr4 bkws=bkws4 bkwr=bkwr4  > $@ 

square4.Dimag.0.3a.H:
	Spike n1=401 d1=0.005 o1=-1. n2=1 o2=0 d2=1 n3=1 o3=0 d3=1 nsp=1 k1=201|Bandpass flo=2 fhi=36| Transf f_min=0 f_min1=4 \
	f_max1=32 f_max=36 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs |Smooth rect1=3 > 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 | Window3d squeeze=n f3=1 > square.csou.H
#
#	Math file1=square4.crec.bpf.0.3.H exp="file1/100"|Window3d squeeze=n n4=1 f4=25 > r1.H
#
	../Tese/bin/OWwemva_opers.x sou=square.csou.H rec=square4.crec.bpf.0.3.H \
	vel=square1.bslow.0.3.H deltaS=square1.dslow.0.3.H \
	zmin=0 zmax=2000 nh=25 oh=-240 jh=1 adj=0 areal=0 extrapolator=ffd born2=0 renorm=0 \
	padtraces=0 traces_in_taper=25 node=14 > $@ #dkws=dkws4 dkwr=dkwr4 bkws=bkws4 bkwr=bkwr4

square4.Dslow.0.3.H:
	../Tese/bin/OWwemva_opers.x sou=square.csou.H rec=square4.crec.bpf.0.3.H \
	vel=square1.bslow.0.3.H deltaI=square4.Dimag.0.3.H \
	zmin=0 zmax=2000 nh=25 oh=-240 jh=1 adj=1 areal=0 extrapolator=ffd born2=0 renorm=0 \
	padtraces=0 traces_in_taper=25 node=14 > $@ 

square4.Dimag.renorm.0.3.H: 
	Spike n1=401 d1=0.005 o1=-1. n2=1 o2=0 d2=1 n3=1 o3=0 d3=1 nsp=1 k1=201|Bandpass flo=2 fhi=36| Transf f_min=0 f_min1=4 \
	f_max1=32 f_max=36 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs |Smooth rect1=3 > 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 | Window3d squeeze=n f3=1 > square.csou.H
#
	Math file1=square4.crec.bpf.0.3.H exp="file1/100"|Window3d squeeze=n n4=1 f4=25 > r1.H
#
	../Tese/bin/OWwemva_opers.x sou=square.csou.H rec=r1.H square4.crec.bpf.0.3.H \
	vel=square1.bslow.0.3.H deltaS=square1.dslow.0.3.H \
	zmin=0 zmax=2000 nh=25 oh=-240 jh=1 adj=0 areal=0 extrapolator=ffd born2=0 renorm=1 \
	padtraces=0 traces_in_taper=25 node=14 > $@ #dkws=dkwsr4 dkwr=dkwrr4 bkws=bkwsr4 bkwr=bkwrr4  > $@ 

square4.Dimag.renorm.0.3a.H: 
	Spike n1=401 d1=0.005 o1=-1. n2=1 o2=0 d2=1 n3=1 o3=0 d3=1 nsp=1 k1=201|Bandpass flo=2 fhi=36| Transf f_min=0 f_min1=4 \
	f_max1=32 f_max=36 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs |Smooth rect1=3 > 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 | Window3d squeeze=n f3=1 > square.csou.H
#
	Math file1=square4.crec.bpf.0.3.H exp="file1/100"|Window3d squeeze=n n4=1 f4=25 > r1.H
#
	../Tese/bin/OWwemva_opers.x sou=square.csou.H rec=square4.crec.bpf.0.3.H \
	vel=square1.bslow.0.3.H deltaS=square1.dslow.0.3.H \
	zmin=0 zmax=2000 nh=25 oh=-240 jh=1 adj=0 areal=0 extrapolator=ffd born2=0 renorm=1 \
	padtraces=0 traces_in_taper=25 node=14 > $@ #dkws=dkwsr4 dkwr=dkwrr4 bkws=bkwsr4 bkwr=bkwrr4  > $@ 

square4.Dslow.from_renorm.0.3.H:
	../Tese/bin/OWwemva_opers.x sou=square.csou.H rec=square4.crec.bpf.0.3.H \
	vel=square1.bslow.0.3.H deltaI=square4.Dimag.renorm.0.3.H \
	zmin=0 zmax=2000 nh=25 oh=-240 jh=1 adj=1 areal=0 extrapolator=ffd born2=0 renorm=0 \
	padtraces=0 traces_in_taper=25 node=14 > $@ 

sq4renorm.0.3: # 
	Spike n1=401 d1=0.005 o1=-1. n2=1 o2=0 d2=1 n3=1 o3=0 d3=1 nsp=1 k1=201|Bandpass flo=2 fhi=36| Transf f_min=0 f_min1=4 \
	f_max1=32 f_max=36 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs |Smooth rect1=3 > 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 | Window3d squeeze=n n3=16 1 f3=25 1 > square.csou.H
#
	Math file1=square4.crec.bpf.0.3.H exp="file1*1" | Window3d squeeze=n n4=1 f4=25 n3=16 f3=24 > r1.H;echo o3=12.468825 >> r1.H
#
	../Tese/bin/OWwemva_opers.x sou=square.csou.H rec=r1.H square4.crec.bpf.0.3.H vel=square1.bslow.0.3.H deltaS=square1.dslow.0.3.H \
	zmin=0 zmax=2000 nh=25 oh=-240 jh=1 adj=0 areal=0 extrapolator=ffd born2=0 renorm=0 padtraces=0 traces_in_taper=25 node=14 > img1.H
#
	../Tese/bin/OW_renorm01.x sou=square.csou.H rec=r1.H square4.crec.bpf.0.3.H vel=square1.bslow.H Velout=square4.vout.0.3.H \
	zmin=0 zmax=2000 nh=25 oh=-240 jh=1 niter=2 25 nl_iter=1 cgsolv=reg P_image=img1.H dso=1 inversion=0 areal=0 xv_min=-2500 xv_max=2500 \
	dxk= 100 nxk= 58 oxk= -2750 dzk= 20 nzk= 51 Vrenorm=square3.Vrenorm.H extrapolator=ffd padtraces=0 traces_in_taper=25 node=14 dot=0 \
	list=listagem_square4.renorm.0.3 epscg=1. renorm=1 dkws=dkws.4 dkwr=dkwr.4 bkws=bkws.4 bkwr=bkwr.4 \
	mmov=square4.mmov.renorm.0.3.H rmov=square4.rmov.renorm.0.3.H err=square4.err.renorm.0.3.H


sq4born.0.3:
	../Tese/bin/OW_renorm01.x sou=square.csou.H rec=square4.crec.bpfIPT40.0.3.H \
	vel=square1.bslow.0.3.H Velout=square4.vout.born.0.3.H \
	zmin=0 zmax=2000 nh=25 oh=-240 jh=1 niter=30 nl_iter=1 cgsolv=reg P_image=square4.Dimag.0.3.H dso=1 inversion=0 areal=0 \
	extrapolator=ffd padtraces=0 traces_in_taper=25 node=14 dot=0 \
	log=log_square4.0.3 list=listagem_square4.0.3 epscg=1. lapl=1 renorm=0 \
	mmov=square4.mmov.born.0.3.H rmov=square4.rmov.born.0.3.H err=square4.err.born.0.3.H

sq4born.0.3a:
	../Tese/bin/OW_renorm01.x sou=square.csou.H rec=square4.crec.bpfIPT40.0.3.H \
	vel=square1.bslow.0.3.H Velout=square4.vout.born.0.3a.H \
	zmin=0 zmax=2000 nh=25 oh=-240 jh=1 niter=50 nl_iter=1 cgsolv=reg P_image=square4.Dimag.0.3.H dso=1 inversion=0 areal=0 \
	extrapolator=ffd padtraces=0 traces_in_taper=25 node=14 dot=0 \
	list=listagem_square4.0.3 epscg=5. lapl=1 renorm=0 \
	mmov=square4.mmov.born.0.3a.H rmov=square4.rmov.born.0.3a.H err=square4.err.born.0.3a.H

sq4dso.0.3:
	../Tese/bin/OW_renorm01.x sou=square.csou.H rec=square4.crec.bpf.0.3.H \
	vel=square1.bslow.0.3.H Velout=square4.vout.dso.0.3.H \
	zmin=0 zmax=2500 nh=25 oh=-240 jh=1 niter=40 nl_iter=1 cgsolv=reg dso=1 inversion=0 areal=0 \
	extrapolator=ffd padtraces=0 traces_in_taper=25 node=14 dot=0 \
	log=log_square4.0.3 list=listagem_square4.0.3 epscg=1. lapl=1 renorm=0 \
	mmov=square4.mmov.dso.0.3.H rmov=square4.rmov.dso.0.3.H err=square4.err.dso.0.3.H

sq4renorm.0.3a: # 
	Spike n1=401 d1=0.006 o1=-1.2 n2=1 o2=0 d2=1 n3=1 o3=0 d3=1 nsp=1 k1=201 | Bandpass flo=2 fhi=48 | Transf f_min=0 f_min1=4 \
	f_max1=32 f_max=38 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs |Smooth rect1=3 > 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 | Window3d squeeze=n f3=1 > square.csou.H
	Math file1=square4.crec.bpf.0.3.H exp="file1*1" | Window3d squeeze=n n4=1 f4=35 > r1.H
#	Math file1=square4.vout.born.0.3.H exp="file1-1/3000" > square4.dslow.born.0.3.H
	../Tese/bin/OWwemva_opers.x sou=square.csou.H rec=r1.H \
	vel=square1.bslow.H deltaS=square1.dslow.0.3.H \
	zmin=0 zmax=2500 nh=25 oh=-240 jh=1 adj=0 areal=0 extrapolator=ffd \
	padtraces=0 traces_in_taper=25 node=14 > img1.H
	../Tese/bin/OW_renorm01.x sou=square.csou.H rec=r1.H square4.crec.bpf.0.3.H vel=square1.bslow.0.3.H Velout=square4.vout.renorm.0.3.H \
	zmin=0 zmax=2500 nh=25 oh=-240 jh=1 niter=3 10 nl_iter=1 cgsolv=reg P_image=img1.H dso=1 inversion=0 areal=0 \
	Vrenorm=square3.Vrenorm.H deltaS= square4.dslow.born.0.3.H \
	extrapolator=ffd padtraces=0 traces_in_taper=25 node=14 dot=0 \
	epscg=0.0001 renorm=1 dkws=dkws dkwr=dkwr bkws=bkws bkwr=bkwr
#	Window3d < square3.Dimag.renorm.0.3.H | Transp plane=24|Stack3d| Transp plane=24 |Window3d> img1.H

####################
####################
sq4renorm:
	Spike n1=401 d1=0.005 o1=-1. n2=1 o2=0 d2=1 n3=1 o3=0 d3=1 nsp=1 k1=201|Bandpass flo=2 fhi=36| Transf f_min=0 f_min1=4 \
	f_max1=32 f_max=36 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs |Smooth rect1=3 > 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 | Window3d squeeze=n f3=1 > square.csou.H
#
	Math file1=square4.crec.bpf.0.3.H exp="file1/100"|Window3d squeeze=n n4=1 f4=25 > r1.H
#
	../Tese/bin/OW_renorm02.x sou=square.csou.H rec=r1.H square4.crec.bpf.0.3.H \
	vel=square1.bslow.0.3.H Velout=square4.vout.renorm.H dkim=square4.dkim.renorm.H \
	dslow=square1.dslow.0.3.H grad=square4.deltaS.renorm.H Vrenorm=square4.Vrenorm.H \
	P_image= square4.Dimag.renorm.0.3.H\
	zmin=0 zmax=2000 nh=25 oh=-240 jh=1 nitercg=2 30 nl_iter=1 cgsolv=reg dso=1 inversion=0 areal=0 \
	extrapolator=ffd padtraces=0 traces_in_taper=25 node=14 dot=0 \
	list=listagem_square4 epscg=10. lapl=0 renorm=0 \
	mmov=square4.mmov.renorm.H rmov=square4.rmov.renorm.H err=square4.err.renorm.H \
	dkws=dkwsr.4.H dkwr=dkwrr.4.H bkws=bkwsr.4.H bkwr=bkwrr.4.H
####################
####################


sq4bfgs.0.3:
	Spike n1=401 d1=0.004 o1=-.8 n2=1 o2=0 d2=1 n3=1 o3=0 d3=1 nsp=1 k1=126 | Bandpass flo=2 fhi=48 | Transf f_min=0 f_min1=4 \
	f_max1=40 f_max=48 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs |Smooth rect1=3 > 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 > square.csou.H
	Math file1=square1.slow.0.3.H exp="file1*1.2" > vvv.H
	../Tese/bin/OW_lbfgsc_areal.x sou=square.csou.H rec=square.crec.bpf.0.3.H \
	vel=vvv.H square1.bslow.H grad=square3.grad.0.3.H \
	Dimage=square3.dso.0.3.H bkgimg=square3.bkimg.0.3.H Velout=square3.vout.0.3.H \
	zmin=0 zmax=1000 nh=31 oh=-150 jh=1 niter=25 dso=1 inversion=1 areal=0 mmax=15 xv_min=-2500 xv_max=2500 \
	dxk=100 nxk=58 oxk=-2750 dzk=20 nzk=51 \
	log=log_bfgs_square3.0.3 list=listagem_bfgs_square3.0.3 \
	padtraces=0 traces_in_taper=25 node=14 bounds=1 vmin=2000 vmax=4000 cbounds=1 extrapolator=ffd


square4.window.H:
	Transp plane=13 < square4.bkimIPT40.0.3.H | Mute vmute=0 tmute=750 tramp=0 > 1.H
	Transp plane=13 < square4.bkimIPT40.0.3.H | Mute vmute=0 tmute=1200 tramp=0 > 2.H
	Transp plane=13 < square4.bkimIPT40.0.3.H | Mute vmute=0 tmute=1800 tramp=0 > 3.H
	Math file1=T.H file2=1.H exp=file1-file2 > H1.H
	Math file1=T.H file2=2.H file3=H1.H exp=file1-file2-file3 > H2.H
	Math file1=T.H file2=3.H file3=H1.H file4=H2.H exp=file1-file2-file3-file4 > H3.H
	Math file1=T.H file2=H1.H file3=H2.H file4=H3.H exp=file1-file2-file3-file4 > H4.H
	Cat H1.H H3.H axis=4 | Transp plane=13 > $@

sq4perm%:
	Gpow gpow=-1 < square1.bslow.0.3.H > square1.bvel.0.3.H
	../Tese/bin/OW_arealsht.x rec_cig=square4.window.H sou_cig=square4.window.H sou=square.csou.H vel=square1.bvel.0.3.H \
	rec_out=square4.crec.perm$*.H sou_out=square4.csou.perm$*.H extrapolator=ffd \
	padtraces=0 encode=1 encz=1 eps=1 random=1 injection=1 nreal=1 ngap=$* zmin=0 zmax=2500 node=14 \
	> /dev/null 

sq4invperm.%:
	Window3d squeeze=n min1=-4000 max1=4000 < square4.csou.perm$*.H > s1.H
	Window3d squeeze=n min1=-4000 max1=4000 < square4.crec.perm$*.H > r1.H
	../Tese/bin/OWwemva_opers.x sou=s1.H rec=r1.H \
	vel=square1.bslow.0.3.H deltaS=square1.dslow.0.3.H \
	zmin=0 zmax=2500 nh=25 oh=-240 jh=1 adj=0 areal=1 extrapolator=ffd born2=0 renorm=0 \
	padtraces=0 traces_in_taper=25 node=14 > img.perm.$*.H
	../Tese/bin/OW_renorm01.x sou=s1.H rec=r1.H \
	vel=square1.bslow.0.3.H Velout=square4.vout.perm.$*.H \
	zmin=0 zmax=2500 nh=25 oh=-240 jh=1 niter=40 nl_iter=1 cgsolv=reg P_image=img.perm.$*.H dso=1 inversion=0 areal=1 \
	extrapolator=ffd padtraces=0 traces_in_taper=25 node=14 dot=0 \
	list=listagem_square4.perm.$* epscg=1. lapl=1 renorm=0 \
	mmov=square4.mmov.perm.$*.H rmov=square4.rmov.perm.$*.H err=square4.err.perm.$*.H

#############################################
#
#
# Testing renormalization bkgvel=2000 anomaly = 4000
#
square5.slow.H:
	./bin/OW_sqrvel.x back_vel=3000 vel_pert=0.5 xcenter=0 zcenter=600 extentx=600 extentz=600 slow_out=1.H > /dev/null
	Window3d < 1.H|Transp|Window3d j2=2| Pad extend=1 end1=100 |Transp plane=12 reshape=1,3 > $@

square5.bslow.H:
	Math file1=square5.slow.H exp="file1*0+1/3000" > $@

square5.dslow.H:
	Math file1=square5.slow.H file2=square5.bslow.H exp="file1-file2" > $@

square5.model:
	Spike n2=1001 o2=-10000 d2=20 n1=301 o1=0 d1=10 > z.H;Math file1=z.H exp="file1*0+1" | \
	Mute vmute=0 tmute=0500 > 1.H; 
	Spike n2=1001 o2=-10000 d2=20 n1=301 o1=0 d1=10 > z.H;Math file1=z.H exp="file1*0+1" | \
	Mute vmute=0 tmute=1000 > 2.H; 
	Spike n2=1001 o2=-10000 d2=20 n1=301 o1=0 d1=10 > z.H;Math file1=z.H exp="file1*0+1" | \
	Mute vmute=0 tmute=1500 > 3.H;
	Math file1=1.H file2=2.H file3=3.H exp="file1+file2+file3+1" > z.H
#	Math file1=3.H exp="file1+1" > z.H
	Wavelet n1=401 d1=0.005 wavelet=ricker2 phase=0 fund=25 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=36 f_max=40 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs |Smooth rect1=7 > 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| Window3d squeeze=n f3=1 > square5.csou.H
#	Spike n1=401 d1=0.005 o1=-.8 n2=1 o2=0 d2=1 n3=1 o3=0 d3=1 nsp=1 k1=201 | Bandpass flo=2 fhi=48 | Transf f_min=0 f_min1=4 \
#	f_max1=40 f_max=48 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs |Smooth rect1=3 > 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| Window3d squeeze=n f3=1 > square5.csou.H
	Window3d < square5.slow.H |Gpow gpow=-1| Transp > square5.slow.tr.H
	../ShtPSPI/bin/OWmod2d_par.x sou=square5.csou.H vel=square5.slow.tr.H \
	vreflect=z.H shots=square5.crec.H extrapolator=ffd pspi vsal=5000 nrefvel=2 \
	traces_in_taper=50 padtraces=100 xmin=-9500 xmax=9500 \
	nrec=201 orec=-2000 drec=20 nsht=51 osht=-4000 dsht=160 zmin=0 zmax=1700 node=15 > /dev/null

square5.ikim:
	echo n6=1 o6=0 d6=1 >> r1.H
	./bin/OWmig2d_areal.x sou=square.csou.H rec=r1.H vel=square3.vout.born.0.3.H bkgimg=square3.ikim.0.3.H \
	extrapolator=ffd zmin=0 zmax=1000 nh=51 oh=-250 jh=1 areal=0 migration=1 \
	padtraces=0 traces_in_taper=25 node=14 > /dev/null

square5.tkim:
	echo n6=1 o6=0 d6=1 >> square5.crec.H
	./bin/OWmig2d_areal.x sou=square5.csou.H rec=square5.crec.H vel=square5.slow.H bkgimg=square5.tkim.H \
	extrapolator=ffd zmin=0 zmax=2000 nh=25 oh=-240 jh=1 areal=0 migration=1 \
	padtraces=0 traces_in_taper=25 node=14 > /dev/null

square5.bkim:
	./bin/OWmig2d_areal.x sou=square5.csou.H rec=square5.crec.H vel=square5.bslow.H bkgimg=square5.bkim.H \
	extrapolator=ffd zmin=0 zmax=2000 nh=25 oh=-240 jh=1 areal=0 migration=1 \
	padtraces=0 traces_in_taper=25 node=14 > /dev/null

square5.dkim:
	Math file1=square5.tkim.H file2=square5.bkim.H exp=file1-file2 > square5.dkim.H

square5.tkim1:
	echo n6=1 o6=0 d6=1 >> square5.crec.H
	Math file1=square5.crec.H exp="file1/100" | Window3d squeeze=n n4=1 f4=25 > r1.H
	./bin/OWmig2d_areal.x sou=square5.csou.H rec=r1.H square5.crec.H vel=square5.slow.H bkgimg=square5.tkim1.H \
	extrapolator=ffd zmin=0 zmax=2000 nh=25 oh=-240 jh=1 areal=0 migration=1 \
	padtraces=0 traces_in_taper=25 node=14 > /dev/null

square5.bkim1:
	./bin/OWmig2d_areal.x sou=square5.csou.H rec=r1.H square5.crec.H vel=square5.bslow.H bkgimg=square5.bkim1.H \
	extrapolator=ffd zmin=0 zmax=2000 nh=25 oh=-240 jh=1 areal=0 migration=1 \
	padtraces=0 traces_in_taper=25 node=14 > /dev/null

square5.dkim1:
	Math file1=square5.tkim1.H file2=square5.bkim1.H exp=file1-file2 > square5.dkim1.H

square5.Dimag.H:
	Math file1=square5.crec.H exp="file1/100" | Window3d squeeze=n n4=1 f4=25 > r1.H
	../Tese/bin/OWwemva_opers.x sou=square5.csou.H rec=square5.crec.H \
	vel=square5.bslow.H deltaS=square5.dslow.H \
	zmin=0 zmax=2000 nh=25 oh=-240 jh=1 adj=0 areal=0 extrapolator=ffd born2=0 renorm=0 \
	padtraces=0 traces_in_taper=25 node=14 dkws=dkws5 dkwr=dkwr5 bkws=bkws5 bkwr=bkwr5 > $@  

square5.Dslow.H:
	../Tese/bin/OWwemva_opers.x sou=square5.csou.H rec=square5.crec.H \
	vel=square5.bslow.H deltaI=square5.Dimag.H \
	zmin=0 zmax=2000 nh=25 oh=-240 jh=1 adj=1 areal=0 extrapolator=ffd born2=0 renorm=0 \
	padtraces=0 traces_in_taper=25 node=14 > $@ 

square5.Dimag.renorm.H: 
	Math file1=square5.crec.H exp="file1/100" | Window3d squeeze=n n4=1 f4=25 > r1.H
	../Tese/bin/OWwemva_opers.x sou=square5.csou.H rec=square5.crec.H \
	vel=square5.bslow.H deltaS=square5.dslow.H \
	zmin=0 zmax=2000 nh=25 oh=-240 jh=1 adj=0 areal=0 extrapolator=ffd born2=0 renorm=1 \
	padtraces=0 traces_in_taper=25 node=14 dkws=dkwsr5 dkwr=dkwrr5 bkws=bkwsr5 bkwr=bkwrr5 > $@ 

square5.Dslow.renorm.H:
	../Tese/bin/OWwemva_opers.x sou=square5.csou.H rec=square5.crec.H \
	vel=square5.bslow.H deltaI=square5.Dimag.renorm.H \
	zmin=0 zmax=2000 nh=25 oh=-240 jh=1 adj=1 areal=0 extrapolator=ffd born2=0 renorm=1 \
	padtraces=0 traces_in_taper=25 node=14 > $@ 

dottst.renorm:
	Math file1=square5.crec.H exp="file1/1000000" | Window3d squeeze=n n4=1 f4=25 > r1.H
	../Tese/bin/OWwemva_opers.x sou=square5.csou.H rec=r1.H square5.crec.H \
	vel=square5.bslow.H deltaI=square5.Dimag.renorm.H dot=1 \
	zmin=0 zmax=2000 nh=1 25 oh=0 -240 jh=1 adj=1 areal=0 extrapolator=ffd born2=0 renorm=1 \
	padtraces=0 traces_in_taper=25 node=14 

square5.rhorms.H:
	Math file1=square5.slow.H file2=square5.bslow.H exp="file2/file1" | ../Tese/bin/OW_vrms.x int2rms=1 > $@

square5.resmig.H:
	Window3d squeeze=n min1=-7500 n1=751 n3=201 < square5.rhorms.H | Smooth rect1=13 rect2=1 rect3=1 > square5.rhorms.ltd.H
	../Tese/bin/OW_resmig.x nrho=201 orho=0.95 drho=0.001 rhoxz=square5.rhorms.ltd.H bkgimg=square5.bkim.H Dimage=$@ \
	resmigx=1 node=14 xxx=xxx.H

####################
####################
sq5renorm:
	Math file1=square5.crec.H exp="file1/100" | Window3d squeeze=n n4=1 f4=25 > r1.H
	../Tese/bin/OW_renorm02.x sou=square5.csou.H rec=r1.H square5.crec.H \
	vel=square5.bslow.H Velout=square5.vout.renorm.H dkim=square5.dkim.renorm.H dimg=square5.dimg.renorm.H \
	dslow=square5.dslow.H grad=square5.deltaS.renorm.H Vrenorm=square5.Vrenorm.H P_image=square5.dkim1.H \
	nitercg1=180 nitercg2=20 epscg1=0.01 epscg2=0.01 nl_iter=1 cgsolv=reg \
	zmin=0 zmax=2000 nh=25 oh=-240 jh=1 dso=1 inversion=0 areal=0 \
	extrapolator=ffd padtraces=0 traces_in_taper=25 node=14 dot=0 \
	list=listagem_square6 lapl=0 renorm=0 imgfw=0 \
	mmov=square5.mmov.renorm.H rmov=square5.rmov.renorm.H err=square5.err.renorm.H \
	dkws=dkwsr.5.H dkwr=dkwrr.5.H bkws=bkwsr.5.H bkwr=bkwrr.5.H
####################
####################
sq5renormall:
	Math file1=square5.crec.H exp="file1/100" | Window3d squeeze=n n4= 1 f4= 25 > r1.H
	../Tese/bin/OW_renorm02.x sou=square5.csou.H rec=r1.H square5.crec.H \
	vel=square5.bslow.H Velout=square5.vout.renormall.H dkim=square5.dkim.renormall.H dimg=square5.dimg.renormall.H \
	dslow=square5.dslow.H grad=square5.deltaS.renormall.H Vrenorm=square5.Vrenormall.H \
	nitercg1=30 nitercg2=20 epscg1=0.01 epscg2=0.01 nl_iter=1 cgsolv=reg \
	zmin=0 zmax=2000 nh=25 oh=-240 jh=1 dso=1 inversion=0 areal=0 \
	extrapolator=ffd padtraces=0 traces_in_taper=25 node=14 dot=0 \
	list=listagem_square6 lapl=0 renorm=0 imgfw=0 \
	mmov=square5.mmov.renormall.H rmov=square5.rmov.renormall.H err=square5.err.renormall.H \
	dkws=dkwsr.5all.H dkwr=dkwrr.5all.H bkws=bkwsr.5all.H bkwr=bkwrr.5all.H
####################
####################
sq5ren_exp01:
	Math file1=square5.crec.H exp="file1/100" | Window3d squeeze=n n4=1 f4=25 > r1.H
	../Tese/bin/OW_renorm03.x sou=square5.csou.H rec=r1.H square5.crec.H \
	vel=square5.bslow.H dslow=square5.dslow.H Vrenorm=square5.VrenormW01.H \
	Velout=square5.vout.renormW01.H grad=square5.deltaS.renormW01.H \
	zmin=0 zmax=2000 nh=25 oh=-240 jh=1 dso=1 inversion=0 areal=0 \
	extrapolator=ffd padtraces=0 traces_in_taper=25 node=14 dot=0 \
	list=listagem_square6 renorm=0 imgfw=1 nitercg2=20 epscg2=0.01 \
	dkws=dkwsr.501.H dkwr=dkwrr.501.H bkws=bkwsr.501.H bkwr=bkwrr.501.H
####################
####################
sq5ren_exp02:
	Math file1=square5.crec.H exp="file1/100" | Window3d squeeze=n n4=1 f4=25 > r1.H
	../Tese/bin/OW_renorm04.x sou=square5.csou.H rec=r1.H square5.crec.H \
	vel=square5.bslow.H dslow=square5.dslow.H Vrenorm=square5.VrenormW02.H \
	Velout=square5.vout.renormW02.H grad=square5.deltaS.renormW02.H P_image=square5.dkim1.H \
	zmin=0 zmax=2000 nh=25 oh=-240 jh=1 dso=1 inversion=0 areal=0 \
	extrapolator=ffd padtraces=0 traces_in_taper=25 node=14 dot=0 \
	list=listagem_square6 renorm=0 imgfw=1 nitercg1=5 epscg1=0.01 nitercg2=20 epscg2=0.01 \
	dkws=dkwsr.502.H dkwr=dkwrr.502.H bkws=bkwsr.502.H bkwr=bkwrr.502.H
####################
####################
sq5ren_exp03:
	Math file1=square5.crec.H exp="file1/100" | Window3d squeeze=n n4=1 f4=25 > r1.H
	../Tese/bin/OW_renorm05.x sou=square5.csou.H rec=r1.H square5.crec.H \
	vel=square5.bslow.H dslow=square5.dslow.H Vrenorm=square5.Vrenorm03.H \
	Velout=square5.vout.renorm03.H grad=square5.deltaS.renorm03.H P_image= square5.dkim1.H \
	dkim=square5.exp03.dkim.H dimg=square5.exp03.dimg.H \
	mmov=square5.mmov.renorm03.H rmov=square5.rmov.renorm03.H err=square5.err.renorm03.H \
	zmin=0 zmax=2000 nh=25 oh=-240 jh=1 dso=1 inversion=0 areal=0 renorm=1 \
	extrapolator=ffd padtraces=0 traces_in_taper=25 node=14 dot=1 0 \
	list=listagem_square6 imgfw=0 nitercg1=35 epscg1=100.1 nitercg2=20 epscg2=0.01
####################
#################################################################
#
#
# Testing renormalization bkgvel=2000 anomaly = 4000
#
square6.slow.H:
	Math file1=square5.slow.H exp="file1*0+1/3000" > $@

square6.bslow.H:
	Math file1=square5.slow.H exp="file1*0+1/2700" > $@

square6.dslow.H:
	Math file1=square6.slow.H file2=square6.bslow.H exp="file1-file2" > $@

square6.model:
#	Spike n2=1001 o2=-10000 d2=20 n1=301 o1=0 d1=10 > z.H;Math file1=z.H exp="file1*0+1" | \
#	Mute vmute=0 tmute=0500 > 1.H; 
	Spike n2=1001 o2=-10000 d2=20 n1=301 o1=0 d1=10 > z.H;Math file1=z.H exp="file1*0+1" | \
	Mute vmute=0 tmute=1500 > 3.H;
#	Math file1=1.H file2=3.H exp="file1+file2+1" > z.H
	Math file1=3.H exp="file1+1" > z.H
	Wavelet n1=401 d1=0.005 wavelet=ricker2 phase=0 fund=25 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=40 f_max=48 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs |Smooth rect1=7 > 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| Window3d squeeze=n f3=1 > square6.csou.H
#	Spike n1=401 d1=0.005 o1=-.8 n2=1 o2=0 d2=1 n3=1 o3=0 d3=1 nsp=1 k1=201 | Bandpass flo=2 fhi=48 | Transf f_min=0 f_min1=4 \
#	f_max1=40 f_max=48 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs |Smooth rect1=3 > 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| Window3d squeeze=n f3=1 > square5.csou.H
	Math file1=square6.slow.H exp="1/file1" | Window3d | Transp > square6.slow.tr.H
	../ShtPSPI/bin/OWmod2d_par.x sou=square6.csou.H vel=square6.slow.tr.H \
	vreflect=z.H shots=square6.crec.H extrapolator=pspi ffd vsal=5000 nrefvel=1 \
	traces_in_taper=50 padtraces=100 xmin=-9500 xmax=9500 \
	nrec=201 orec=-2000 drec=20 nsht=51 osht=-2000 dsht=80 zmin=0 zmax=1700 node=15 > /dev/null

square6.tkim:
	echo n6=1 o6=0 d6=1 >> square6.crec.H
	./bin/OWmig2d_areal.x sou=square6.csou.H rec=square6.crec.H vel=square6.slow.H bkgimg=square6.tkim.H \
	extrapolator=ffd zmin=0 zmax=2000 nh=25 oh=-240 jh=1 areal=0 migration=1 \
	padtraces=0 traces_in_taper=25 node=14 > /dev/null

square6.bkim:
	./bin/OWmig2d_areal.x sou=square6.csou.H rec=square6.crec.H vel=square6.bslow.H bkgimg=square6.bkim.H \
	extrapolator=ffd zmin=0 zmax=2000 nh=25 oh=-240 jh=1 areal=0 migration=1 \
	padtraces=0 traces_in_taper=25 node=14 > /dev/null

square6.dkim:
	Math file1=square6.tkim.H file2=square6.bkim.H exp=file1-file2 > square6.dkim.H

square6.tkim1:
	echo n6=1 o6=0 d6=1 >> square6.crec.H
	Math file1=square6.crec.H exp="file1/100" | Window3d squeeze=n n4=1 f4=25 > r1.H
	./bin/OWmig2d_areal.x sou=square6.csou.H rec=r1.H square6.crec.H vel=square6.slow.H bkgimg=square6.tkim1.H \
	extrapolator=ffd zmin=0 zmax=2000 nh=25 oh=-240 jh=1 areal=0 migration=1 \
	padtraces=0 traces_in_taper=25 node=14 > /dev/null

square6.bkim1:
	./bin/OWmig2d_areal.x sou=square6.csou.H rec=r1.H square6.crec.H vel=square6.bslow.H bkgimg=square6.bkim1.H \
	extrapolator=ffd zmin=0 zmax=2000 nh=25 oh=-240 jh=1 areal=0 migration=1 \
	padtraces=0 traces_in_taper=25 node=14 > /dev/null

square6.dkim1:
	Math file1=square6.tkim1.H file2=square6.bkim1.H exp=file1-file2 > square6.dkim1.H

square6.Dimag.H:
	../Tese/bin/OWwemva_opers.x sou=square6.csou.H rec=square6.crec.H \
	vel=square6.bslow.H deltaS=square6.dslow.H \
	zmin=0 zmax=2000 nh=25 oh=-240 jh=1 adj=0 areal=0 extrapolator=ffd born2=0 renorm=0 \
	padtraces=0 traces_in_taper=25 node=14 dkws=dkws6 dkwr=dkwr6 bkws=bkws6 bkwr=bkwr6 > $@ 

square6.Dslow.H:
	../Tese/bin/OWwemva_opers.x sou=square6.csou.H rec=square6.crec.H \
	vel=square6.bslow.H deltaI=square6.Dimag.H \
	zmin=0 zmax=2000 nh=25 oh=-240 jh=1 adj=1 areal=0 extrapolator=ffd born2=0 renorm=0 \
	padtraces=0 traces_in_taper=25 node=14  > $@ 

square6.Dimag.renorm.H: 
	Math file1=square6.crec.H exp="file1/100" | Window3d squeeze=n n4=1 f4=25 > r1.H
	../Tese/bin/OWwemva_opers.x sou=square6.csou.H rec=square6.crec.H \
	vel=square6.bslow.H deltaS=square6.dslow.H \
	zmin=0 zmax=2000 nh=25 oh=-240 jh=1 adj=0 areal=0 extrapolator=ffd born2=0 renorm=1 \
	padtraces=0 traces_in_taper=25 node=14 dkws=dkwsr6 dkwr=dkwrr6 bkws=bkwsr6 bkwr=bkwrr6 > $@ 

square6.Dslow.from_renorm.H:
	../Tese/bin/OWwemva_opers.x sou=square6.csou.H rec=square6.crec.H \
	vel=square6.bslow.H deltaI=square6.Dimag.renorm.H \
	zmin=0 zmax=2000 nh=25 oh=-240 jh=1 adj=1 areal=0 extrapolator=ffd born2=0 renorm=0 \
	padtraces=0 traces_in_taper=25 node=14  > $@ 

square6.Dslow.from_dkim.H:
	../Tese/bin/OWwemva_opers.x sou=square6.csou.H rec=square6.crec.H \
	vel=square6.bslow.H deltaI=square6.dkim.H \
	zmin=0 zmax=2000 nh=25 oh=-240 jh=1 adj=1 areal=0 extrapolator=ffd born2=0 renorm=0 \
	padtraces=0 traces_in_taper=25 node=14  > $@ 
####################
####################
sq6renorm:
	Math file1=square6.crec.H exp="file1/100" | Window3d squeeze=n n4=1 f4=25 > r1.H
	../Tese/bin/OW_renorm02.x sou=square6.csou.H rec=r1.H square6.crec.H \
	vel=square6.bslow.H Velout=square6.vout.renorm.H dkim=square6.dkim.renorm.H dimg=square6.dimg.renorm.H \
	dslow=square6.dslow.H grad=square6.deltaS.renorm.H Vrenorm=square6.Vrenorm.H\
	nitercg1=180 nitercg2=20 epscg1=0.01 epscg2=0.01 nl_iter=1 cgsolv=reg \
	zmin=0 zmax=2000 nh=25 oh=-240 jh=1 dso=1 inversion=0 areal=0 \
	extrapolator=ffd padtraces=0 traces_in_taper=25 node=14 dot=0 \
	list=listagem_square6 lapl=0 renorm=0 imgfw=0 \
	mmov=square6.mmov.renorm.H rmov=square6.rmov.renorm.H err=square6.err.renorm.H \
	dkws=dkwsr.6.H dkwr=dkwrr.6.H bkws=bkwsr.6.H bkwr=bkwrr.6.H
####################
####################
sq6renorm1:
	Math file1=square6.crec.H exp="file1/100" | Window3d squeeze=n n4=1 f4=25 > r1.H
	../Tese/bin/OW_renorm02.x sou=square6.csou.H rec=r1.H square6.crec.H \
	vel=square6.bslow.H Velout=square6.vout.renormW.H dkim=square6.dkim.renormW.H dimg=square6.dimg.renormW.H \
	dslow=square6.dslow.H grad=square6.deltaS.renormW.H Vrenorm=square6.VrenormW.H P_image=square6.dkim1.H\
	nitercg1=130 nitercg2=20 epscg1=0.01 epscg2=0.01 nl_iter=1 cgsolv=reg \
	zmin=0 zmax=2000 nh=25 oh=-240 jh=1 dso=1 inversion=0 areal=0 \
	extrapolator=ffd padtraces=0 traces_in_taper=25 node=14 dot=0 1 \
	list=listagem_square6 epscg=100. lapl=0 renorm=0 imgfw=0 \
	mmov=square6.mmov.renormW.H rmov=square6.rmov.renormW.H err=square6.err.renormW.H \
	dkws=dkwsr.6W.H dkwr=dkwrr.6W.H bkws=bkwsr.6W.H bkwr=bkwrr.6W.H
####################
####################
sq6renormall:
	Math file1=square6.crec.H exp="file1/100" | Window3d squeeze=n n4= 1 f4= 25 > r1.H
	../Tese/bin/OW_renorm02.x sou=square6.csou.H rec=r1.H square6.crec.H \
	vel=square6.bslow.H Velout=square6.vout.renormall.H dkim=square6.dkim.renormall.H dimg=square6.dimg.renormall.H \
	dslow=square6.dslow.H grad=square6.deltaS.renormall.H Vrenorm=square6.Vrenormall.H \
	nitercg1=30 nitercg2=20 epscg1=0.01 epscg2=0.01 nl_iter=1 cgsolv=reg \
	zmin=0 zmax=1700 nh=25 oh=-240 jh=1 dso=1 inversion=0 areal=0 \
	extrapolator=ffd padtraces=0 traces_in_taper=25 node=14 dot=0 \
	list=listagem_square6 lapl=0 renorm=0 imgfw=0 \
	mmov=square6.mmov.renormall.H rmov=square6.rmov.renormall.H err=square6.err.renormall.H \
	dkws=dkwsr.6all.H dkwr=dkwrr.6all.H bkws=bkwsr.6all.H bkwr=bkwrr.6all.H
####################
####################
sq6ren_exp01:
	Math file1=square6.crec.H exp="file1/100" | Window3d squeeze=n n4=1 f4=25 > r1.H
	../Tese/bin/OW_renorm03.x sou=square6.csou.H rec=r1.H square6.crec.H \
	vel=square6.bslow.H dslow=square6.dslow.H Vrenorm=square6.VrenormW01.H \
	Velout=square6.vout.renormW01.H grad=square6.deltaS.renormW01.H \
	zmin=0 zmax=2000 nh=25 oh=-240 jh=1 dso=1 inversion=0 areal=0 \
	extrapolator=ffd padtraces=0 traces_in_taper=25 node=14 dot=0 \
	list=listagem_square6 renorm=0 imgfw=1 nitercg2=20 epscg2=0.01 \
	dkws=dkwsr.601.H dkwr=dkwrr.601.H bkws=bkwsr.601.H bkwr=bkwrr.601.H
####################
####################
sq6born2:
	../Tese/bin/OW_renorm01.x sou=square6.csou.H rec=square6.crec.H \
	vel=square6.bslow.H Velout=square6.vout.born.H \
	zmin=0 zmax=2000 nh=25 oh=-240 jh=1 niter=30 nl_iter=1 cgsolv=reg P_image=square6.Dimag.renorm.H dso=1 inversion=0 areal=0 \
	extrapolator=ffd padtraces=0 traces_in_taper=25 node=14 dot=0 \
	list=listagem_square6 epscg=1. lapl=0 renorm=0 \
	mmov=square6.mmov.born2.H rmov=square6.rmov.born2.H err=square6.err.born2.H

square6.rhorms.H:
	Math file1=square5.slow.H file2=square5.bslow.H exp="file2/file1" | ../Tese/bin/OW_vrms.x int2rms=1 > $@

square6.resmig.H:
	Window3d squeeze=n min1=-7500 n1=751 n3=201 < square5.rhorms.H | Smooth rect1=13 rect2=1 rect3=1 > square5.rhorms.ltd.H
	../Tese/bin/OW_resmig.x nrho=201 orho=0.95 drho=0.001 rhoxz=square5.rhorms.ltd.H bkgimg=square5.bkim.H Dimage=$@ \
	resmigx=1 node=14 xxx=xxx.H

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


###########################################################
####
#### Lab
####
cte.slow.H:
	./bin/OW_sqrvel.x back_vel=3150 vel_pert=0 slow_out=$@ > /dev/null

cte.bslow.H:
	./bin/OW_sqrvel.x back_vel=3000 vel_pert=0 slow_out=$@ > /dev/null

cte.dslow.H:
	Math file1=cte.slow.H file2=cte.bslow.H exp=file1-file2 > $@

cte.model:
	Spike n2=2001 o2=-10000 d2=10 n1=201 o1=0 d1=10 > z.H;Math file1=z.H exp="file1*0+2" | \
	Mute vmute=0 tmute=500 > y.H; Math file1=y.H exp="file1+1" > z.H
	Wavelet n1=251 d1=0.004 wavelet=ricker2 phase=0 fund=35 order=0.2 tdelay=.5 domain=time > j2.H;echo o1=-.5 >> j2.H
	<j2.H Transf f_min=0 f_min1=4 f_max1=42 f_max=48 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs |Smooth rect1=7 > 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 > cte.csou.H
	Math file1=cte.slow.H exp="1/file1" | Window3d | Transp > cte.slow.tr.H
	../ShtPSPI/bin/OWmod2d_par.x sou=cte.csou.H vel=cte.slow.tr.H \
	vreflect=z.H shots=cte.crec.H extrapolator=pspi \
	vsal=3500 nrefvel=1 traces_in_taper=150 padtraces=0 xmin=-9500 xmax=9500 \
	nrec=401 orec=-2000 drec=10 nsht=51 osht=-2000 dsht=80 zmin=0 zmax=700 node=15 > /dev/null
#
#
#######################################################3





square1.bkim:
	Wavelet n1=251 d1=0.004 wavelet=ricker2 phase=0 fund=25 order=0.2 tdelay=.5 domain=time > j2.H;echo o1=-.5 >> j2.H
	<j2.H Transf f_min=0 f_min1=4 f_max1=42 f_max=48 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs |Smooth rect1=7 > 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 > square.csou.H
	./bin/OWmig2d_areal.x sou=square.csou.H rec=square1.crec.H vel=square1.bslow.H bkgimg=square1.bkim.H \
	vsal=3500 nrefvel=1 zmin=0 zmax=1000 nh=51 oh=-250 jh=1 areal=0 migration=1 \
	padtraces=0 traces_in_taper=25 node=14 > /dev/null

square1.bkim.v:
	Window3d < square1.bkim.H min1=-2000 max1=2000 | Transp plane=12 reshape=2,3 | Grey eout=1 gainpanel=a > square1.bkim.T
	<square1.bkim.T Cubeplot flat=1 frame1=0 frame2=200 frame3=26 wantcoordlabel=-1 point1=1 point2=.8 title=" " label1="depth(m)" \
	label2="distance(m)" label3="offset(m)" titlefat=1 titlesz=8 > /dev/null out=$@
	pstexpen square1.bkim.v square1.bkim.ps ; epstopdf square1.bkim.ps

square1.slow.v:
	Window3d < square1.slow.H min1=-2000 max1=2000 max3=1000 | Transp | Grey newclip=1 color=j wantscalebar=1 \
	title=" " label1="depth(m)" label2="distance(m)" > /dev/null out=square1.slow.v
	pstexpen square1.slow.v square1.slow.ps color=y fat=1 fatmult=1.5 force=  invras=y ; epstopdf square1.slow.ps


############################
#
#
square_cg: # cgstep
	../Tese/bin/OW_cgwemva_areal.x sou=/homes/sep/claudio/sepwww/3DSI/GP280_lab6a/square.csou.H \
	rec=/homes/sep/claudio/sepwww/3DSI/GP280_lab6a/square.crec.H \
	vel=/homes/sep/claudio/sepwww/3DSI/GP280_lab6a/square.bslow.H \
	grad=square.grad_cg.H Dimage=square.dimg_cg.H bkgimg=square.bkim_cg.H Velout=square.vout_cg.H \
	zmin=0 zmax=1000 nh=31 oh=-150 jh=1 dso=1 inversion=1 areal=0 mmax=5 xv_min=500 xv_max=8500 \
	nl_iter=1 niter=1 log=log_bfgs_square_cg list=listagem_bfgs_square_cg \
	padtraces=50 traces_in_taper=25 node=12 bounds=1 vmin=2000 vmax=5200 \
	extrapolator=ffd

############################
#
# dso
square0.model:
	Spike n2=2001 o2=-10000 d2=10 n1=201 o1=0 d1=10 > z.H;Math file1=z.H exp="file1*0+2" | \
	Mute vmute=0 tmute=600 > y.H; Math file1=y.H exp="file1+1" > z.H
	Wavelet n1=1751 d1=0.004 wavelet=ricker2 phase=0 fund=15 order=0.2 tdelay=3.5 domain=time > j2.H;echo o1=-3.5 >> j2.H
	<j2.H Transf f_min=0 f_min1=4 f_max1=42 f_max=48 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs |Smooth rect1=7 > 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 > square0.csou.H
	Math file1=square1.slow.H exp="file1*0+3000" | Window3d | Transp > square1.slow.tr.H
	../ShtPSPI/bin/OWmod2d_par.x sou=square0.csou.H vel=square1.slow.tr.H \
	vreflect=z.H shots=square0.crec.H \
	extrapolator=ffd traces_in_taper=150 padtraces=50 xmin=-9500 xmax=9500 \
	nrec=801 orec=-4000 drec=10 nsht=51 osht=-2000 dsht=80 zmin=0 zmax=1500 node=15 > /dev/null

##############################
#
# phase tests
0square0.model:
	Spike n2=2001 o2=-10000 d2=10 n1=201 o1=0 d1=10 > z.H;Math file1=z.H exp="file1*0+2" | \
	Mute vmute=0 tmute=600 > y.H; Math file1=y.H exp="file1+1" > z.H
	Wavelet n1=1751 d1=0.004 wavelet=ricker2 phase=0 fund=15 order=0.2 tdelay=3.5 domain=time > j2.H;echo o1=-3.5 >> j2.H
	<j2.H Transf f_min=0 f_min1=4 f_max1=42 f_max=48 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs |Smooth rect1=7 > 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 > square0.csou.H
	Math file1=square1.slow.H exp="file1*0+3000" | Window3d | Transp > square1.slow.tr.H
	../ShtPSPI/bin/OWmod2d_par.x sou=square0.csou.H vel=square1.slow.tr.H \
	vreflect=z.H shots=phase.tests.H \
	extrapolator=ffd traces_in_taper=150 padtraces=50 xmin=-9500 xmax=9500 \
	nrec=101 orec=-500 drec=10 nsht=1 osht=-0 dsht=80 zmin=0 zmax=1500 node=15 > /dev/null

square0.obc:
	Spike n2=2001 o2=-10000 d2=10 n1=201 o1=0 d1=10 > z.H;Math file1=z.H exp="file1*0+2" | \
	Mute vmute=0 tmute=600 > y.H; Math file1=y.H exp="file1+1" > z.H
	Wavelet n1=451 d1=0.004 wavelet=ricker2 phase=0 fund=15 order=0.2 tdelay=.9 domain=time > j2.H;echo o1=-.9 >> j2.H
	<j2.H Transf f_min=0 f_min1=4 f_max1=32 f_max=38 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs |Smooth rect1=7 > 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 > square0.sou.H
	Math file1=square1.slow.H exp="file1*0+4000" | Window3d | Transp > square1.slow.tr.H
	../ShtPSPI/bin/OWmod2d_par.x sou=square0.sou.H vel=square1.slow.tr.H \
	vreflect=z.H shots=square0.crec.obc.H marine=0 \
	extrapolator=ffd traces_in_taper=150 padtraces=50 xmin=-9500 xmax=9500 \
	nrec=801 orec=-2000 drec=10 nsht=51 osht=-2000 dsht=80 zmin=0 zmax=700 node=15 > /dev/null

square.0.tkim.obc:
	Wavelet n1=451 d1=0.004 wavelet=ricker2 phase=0 fund=15 order=0.2 tdelay=.9 domain=time > j2.H;echo o1=-.9 >> j2.H
	<j2.H Transf f_min=0 f_min1=4 f_max1=32 f_max=38 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs |Smooth rect1=7 > 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 > square0.sou.H
	Math file1=square1.slow.H exp="file1*0+4000" |Pad extend=1 beg1=2000 end1=2000 |Window3d|Transp> square0.tslow.H
	< square0.crec.obc.H ../ShtPSPI/bin/OWmig2d_par.x sou=square0.sou.H vel=square0.tslow.H bkgimg=square0.tkim.obc.H \
	extrapolator=ffd zmin=0 zmax=1000 nh=101 oh=-500 dh=10 migration=1 marine=0 vsal=5000 nrefvel=1 \
	padtraces=50 traces_in_taper=50 node=14 > /dev/null

square.0.bkim:
	Wavelet n1=1751 d1=0.004 wavelet=ricker2 phase=0 fund=15 order=0.2 tdelay=3.5 domain=time > j2.H;echo o1=-3.5 >> j2.H
	<j2.H Transf f_min=0 f_min1=4 f_max1=42 f_max=48 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs |Smooth rect1=7 > 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 > square0.csou.H
	Math file1=square1.slow.H exp="1/(file1*0+2500)" |Pad extend=1 beg1=1000 end1=1000 > square0.bslow.H
	./bin/OWmig2d_areal.x sou=square0.csou.H rec=square0.crec.H vel=square0.bslow.H bkgimg=square0.bkim.H \
	extrapolator=ffd zmin=0 zmax=1500 nh=101 oh=-500 jh=1 areal=0 migration=1 \
	padtraces=125 traces_in_taper=150 node=14 > /dev/null

square.0.tkim:
	Wavelet n1=1751 d1=0.004 wavelet=ricker2 phase=0 fund=15 order=0.2 tdelay=3.5 domain=time > j2.H;echo o1=-3.5 >> j2.H
	<j2.H Transf f_min=0 f_min1=4 f_max1=42 f_max=48 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs |Smooth rect1=7 > 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 > square0.csou.H
	Math file1=square1.slow.H exp="1/(file1*0+3000)" |Pad extend=1 beg1=1000 end1=1000 > square0.tslow.H
	./bin/OWmig2d_areal.x sou=square0.csou.H rec=square0.crec.H vel=square0.tslow.H bkgimg=square0.tkim.H \
	extrapolator=ffd zmin=0 zmax=1500 nh=101 oh=-500 jh=1 areal=0 migration=1 \
	padtraces=125 traces_in_taper=150 node=14 > /dev/null

square0.perm:
	Wavelet n1=1751 d1=0.004 wavelet=ricker2 phase=0 fund=15 order=0.2 tdelay=3.5 domain=time > j2.H;echo o1=-3.5 >> j2.H
	<j2.H Transf f_min=0 f_min1=4 f_max1=24 42  f_max=30 48 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs |Smooth rect1=7 > 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 > square0.csou.H
	Window3d < square0.bkim.H squeeze=n min1=0 n1=1 | Pad beg1=450 end1=450 > sr1.H
	Math file1=square1.slow.H exp="1/(file1*0+2500/2)" |Pad extend=1 beg1=1000 end1=1000  > square0.bslow.H
	./bin/OW_arealsht.x rec_cig=sr1.H sou_cig=sr1.H sou=square0.csou.H vel=square0.bslow.H \
	rec_out=square0.crec.perm.H sou_out=square0.csou.perm.H extrapolator=ffd lloyd=1 \
	padtraces=450 traces_in_taper=150 encode=1 encz=1 eps=0 random=1 injection=1 nreal=1 ngap=1 zmin=0 zmax=1500 node=14 shaper=1 \
	> /dev/null 

square0.migperm:
	./bin/OWmig2d_areal.x sou=square0.csou.perm.H rec=square0.crec.perm.H \
	vel=square0.bslow.H migration=1 areal=1 \
	vsal=7000 nrefvel=1 zmin=0 zmax=1500 node=14 bkgimg=square0.migperm.H \
	nh=101 oh=-500 jh=1 traces_in_taper=150 padtraces=50 > /dev/null

square.00.bkim:
	Wavelet n1=251 d1=0.004 wavelet=ricker2 phase=0 fund=25 order=0.2 tdelay=.5 domain=time > j2.H;echo o1=-.5 >> j2.H
	<j2.H Transf f_min=0 f_min1=4 f_max1=42 f_max=48 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs |Smooth rect1=7 > 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 > square0.csou.H
	Math file1=square1.slow.H exp="1/(file1*0+3200)" > square00.bslow.H
	./bin/OWmig2d_areal.x sou=square0.csou.H rec=square0.crec.H vel=square00.bslow.H bkgimg=square00.bkim.H \
	extrapolator=ffd zmin=0 zmax=1000 nh=51 oh=-250 jh=1 areal=0 migration=1 \
	padtraces=25 traces_in_taper=25 node=14 > /dev/null

square0.dslow.dso.%.H:
	Wavelet n1=251 d1=0.004 wavelet=ricker2 phase=0 fund=25 order=0.2 tdelay=.5 domain=time > j2.H;echo o1=-.5 >> j2.H
	<j2.H Transf f_min=0 f_min1=4 f_max1=42 f_max=48 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs |Smooth rect1=7 > 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 > square0.csou.H
	< square0.bkim.H Window3d min1=0 n1=1 squeeze=n | Pad beg1=500 end1=500 | ./bin/dso.x a=$* > square0.dso$*.H
	../Tese/bin/OWwemva_opers.x sou=square0.csou.H rec=square0.crec.H \
	vel=square0.bslow.H deltaI=square0.dso$*.H \
	zmin=0 zmax=1000 nh=51 oh=-250 jh=1 adj=1 areal=0 extrapolator=ffd born2=0 renorm=0 \
	padtraces=25 traces_in_taper=25 node=14  > $@ 

square0.dslow.mco_%.H:
	Wavelet n1=251 d1=0.004 wavelet=ricker2 phase=0 fund=25 order=0.2 tdelay=.5 domain=time > j2.H;echo o1=-.5 >> j2.H
	<j2.H Transf f_min=0 f_min1=4 f_max1=42 f_max=48 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs |Smooth rect1=7 > 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 > square0.csou.H
	< square0.bkim.H Pad beg2=2 end2=2 | ./bin/dso.x mco=$* |Window3d f2=4 n2=47 > square0.dso.mco_$*.H
	../Tese/bin/OWwemva_opers.x sou=square0.csou.H rec=square0.crec.H \
	vel=square0.bslow.H deltaI=square0.dso.mco_$*.H \
	zmin=0 zmax=1000 nh=51 oh=-250 jh=1 adj=1 areal=0 extrapolator=ffd born2=0 renorm=0 \
	padtraces=25 traces_in_taper=25 node=14  > $@ 
#	< square0.bkim.H Window3d min1=0 n1=1 squeeze=n | Pad beg1=500 end1=500|./bin/dso.x mco=$* > square0.dso.mco_$*.H

square00.dslow.mco_%.H:
	Wavelet n1=251 d1=0.004 wavelet=ricker2 phase=0 fund=25 order=0.2 tdelay=.5 domain=time > j2.H;echo o1=-.5 >> j2.H
	<j2.H Transf f_min=0 f_min1=4 f_max1=42 f_max=48 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs |Smooth rect1=7 > 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 > square0.csou.H
	< square00.bkim.H ./bin/dso.x mco=$* > square00.dso.mco_$*.H
	../Tese/bin/OWwemva_opers.x sou=square0.csou.H rec=square0.crec.H \
	vel=square00.bslow.H deltaI=square00.dso.mco_$*.H \
	zmin=0 zmax=1000 nh=51 oh=-250 jh=1 adj=1 areal=0 extrapolator=ffd born2=0 renorm=0 \
	padtraces=25 traces_in_taper=25 node=14  > $@ 
#	< square0.bkim.H Window3d min1=0 n1=1 squeeze=n | Pad beg1=500 end1=500|./bin/dso.x mco=$* > square0.dso.mco_$*.H

square00.curve.H:
	< square00.bkim.H Window3d min1=-100 max1=100 | ./bin/curve.x > $@

square0.curve.H:
	< square0.bkim.H Window3d min1=-100 max1=100 | ./bin/curve.x > $@

3000marm2W.curve.H:
	< 3000marm.bkim2W.vsmoo2W.ffd.H Window3d min1=4000 max1=8000 j1=10 | ./bin/curve.x > $@

square0.dslow.zeronear.H:
	Wavelet n1=251 d1=0.004 wavelet=ricker2 phase=0 fund=25 order=0.2 tdelay=.5 domain=time > j2.H;echo o1=-.5 >> j2.H
	<j2.H Transf f_min=0 f_min1=4 f_max1=42 f_max=48 wei=y is2d=y > j1.H; <j1.H Window3d | Cabs |Smooth rect1=7 > 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 > square0.csou.H
	< square0.bkim.H Window3d min1=0 n1=1 squeeze=n | Pad beg1=500 end1=500|./bin/dso.x zeronear=y > square0.dso.zeronear.H
	../Tese/bin/OWwemva_opers.x sou=square0.csou.H rec=square0.crec.H \
	vel=square0.bslow.H deltaI=square0.dso.zeronear.H \
	zmin=0 zmax=1000 nh=51 oh=-250 jh=1 adj=1 areal=0 extrapolator=ffd born2=0 renorm=0 \
	padtraces=25 traces_in_taper=25 node=14  > $@ 

square0.Dimag.H:
	Math file1=square0.bslow.H exp="(file1*0+1/3000)-file1" > square0.dslow.H
	../Tese/bin/OWwemva_opers.x sou=square0.csou.H rec=square0.crec.H \
	vel=square0.bslow.H deltaS=square0.dslow.H \
	zmin=0 zmax=1000 nh=51 oh=-250 jh=1 adj=0 areal=0 extrapolator=ffd born2=0 renorm=0 \
	padtraces=25 traces_in_taper=25 node=14 > $@ 

square0.Dslow.H:
	< square0.Dimag.H Window3d min1=0 n1=1 squeeze=n | Pad beg1=500 end1=500 > sq0.dimg.H
	../Tese/bin/OWwemva_opers.x sou=square0.csou.H rec=square0.crec.H \
	vel=square0.bslow.H deltaI=sq0.dimg.H \
	zmin=0 zmax=1000 nh=51 oh=-250 jh=1 adj=1 areal=0 extrapolator=ffd born2=0 renorm=0 \
	padtraces=25 traces_in_taper=25 node=14  > $@ 
