const.perm.%:
	< const.bkim.rall.H Window3d n3=126 | Pad end3=175 > R1.H
#	< const.bkim.rall.H Window3d f3=125 n3=50 | Pad beg3=125 end3=126 > R2.H
#	< const.bkim.rall.H Window3d f3=175 n3=40 | Pad beg3=175 end3=86 > R3.H
#	< const.bkim.rall.H Window3d f3=215 | Pad beg3=215 > R4.H
#	Cat axis=4 R1.H R4.H | Window3d min1=-3000 max1=3000 > const.Rall.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
	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/OW_arealsht.x rec_cig=const.R1.H sou_cig=const.R1.H sou=const.11111.H vel=const.vel.H \
	rec_out=const.LS01.crec$*.perm.H sou_out=const.LS01.csou$*.perm.H extrapolator=ffd \
	padtraces=50 traces_in_taper=50 encode=1 encz=1 eps=1 random=1 injection=1 nreal=10 ngap=$* zmin=0 zmax=1300 node=14

const.migperm.%:
	Window3d squeeze=n n4=$* < const.LS01.csou$*.perm.H > s1.H
	Window3d squeeze=n n4=$* < const.LS01.crec$*.perm.H > r1.H
	../Tese/bin/OWmig2d_areal.x sou=s1.H rec=r1.H \
	vel=const.vel.H bkgimg=const.bkim.perm$*.H \
	zmin=0 zmax=3000 nh=21 oh=-100 migration=1 areal=1 \
	padtraces=25 traces_in_taper=25 node=14 extrapolator=ffd


const.LS01.%:
	Math file1=const.LS01.csou$*.perm.H exp="file1/100" | Window3d squeeze=n n3= 10 f3= 70 > s1.H
	Math file1=const.LS01.crec$*.perm.H exp="file1/100" | Window3d squeeze=n n3= 10 f3= 70 > r1.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
	../Tese/bin/steepest_ls1.x sou=s1.H const.LS01.csou$*.perm.H rec=r1.H const.LS01.crec$*.perm.H \
	vel=const.vel.H grad=const.LS01.inv_grad$*.perm.H \
	Dimage=const.LS01.inv_dso$*.perm.H bkgimg=const.LS01.inv_bkim$*.perm.H Velout=const.LS01.inv_vout$*.perm.H \
	zmin=0 zmax=3000 nh=31 oh=-150 jh=1 max_iters=5 dso=1 inversion=1 areal=1 xv_min=-4000 xv_max=4000 \
	dxk= 2000 nxk= 13 oxk= -2875 dzk= 25 nzk= 121 dxkmin= 2000 \
	extrapolator=ffd traces_in_taper=50 node=14 bounds=1 p_lo=40 p_up=40 

const1.perm.%:
	< const.bkim.H Transp plane=13 < const.bkim.H | Interp d2out=10 | Window3d min2=-400 n2=81 min3=-4000 max3=4000 | Transp plane=13 > R1.H
	Math file1=twin.vel.H exp="file1*0+1/1500"|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=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/OW_arealsht.x rec_cig=R1.H sou_cig=R1.H sou=const.11111.H vel=const.vel.H \
	rec_out=const1.LS01.crec$*.perm.H sou_out=const1.LS01.csou$*.perm.H extrapolator=ffd \
	padtraces=50 traces_in_taper=50 encode=1 encz=1 eps=1 random=1 injection=1 nreal=10 ngap=$* zmin=0 zmax=1300 node=14

const1.migperm.%:
	Window3d squeeze=n n4=$* < const1.LS01.csou$*.perm.H > s1.H
	Window3d squeeze=n n4=$* < const1.LS01.crec$*.perm.H > r1.H
	../Tese/bin/OWmig2d_areal.x sou=s1.H rec=r1.H \
	vel=const.vel.H bkgimg=const1.bkim.perm$*.H \
	zmin=0 zmax=1300 nh=81 oh=-400 migration=1 areal=1 \
	padtraces=25 traces_in_taper=25 node=14 extrapolator=ffd


const1.LS01.%:
	echo n4=$* n5=10 >> const1.LS01.crec$*.perm.H
	echo n4=$* n5=10 >> const1.LS01.csou$*.perm.H
	Math file1=const1.LS01.csou$*.perm.H exp="file1/100" | Window3d squeeze=n n3= 10 f3= 70 > s1.H
	Math file1=const1.LS01.crec$*.perm.H exp="file1/100" | Window3d squeeze=n n3= 10 f3= 70 > r1.H
	Math file1=twin.vel.H exp="file1*0+1/1500"|Pad extend=1 end1=200 end2=1000 beg2=1000|Transp plane=12 reshape=1,3> const1.vel.H
	../Tese/bin/steepest_ls1.x sou=s1.H const1.LS01.csou$*.perm.H rec=r1.H const1.LS01.crec$*.perm.H \
	vel=const1.vel.H grad=const1.LS01.inv_grad$*.perm.H \
	Dimage=const1.LS01.inv_dso$*.perm.H bkgimg=const1.LS01.inv_bkim$*.perm.H Velout=const1.LS01.inv_vout$*.perm.H \
	zmin=0 zmax=1300 nh=81 oh=-400 jh=1 max_iters=5 dso=1 inversion=1 areal=1 xv_min=-2000 xv_max=2000 \
	dxk=250 nxk=43 oxk=-5400 dzk=20 nzk=66 dxkmin=250 \
	extrapolator=ffd traces_in_taper=50 node=14 bounds=1 p_lo=60 p_up=60 


