###########################
#       My stuffs         #
###########################
Prog=/net/koko/brad/bin/LINUX/ShotMig

prep.H: 
#	Cp  ${SIGDIR}/nfs-splitspread-shots.H  splitspread_shots.H
	<splitspread_shots.H /net/koko/bob/SEP_BOB/bin/Transf shotmig=y is2d=y wei=y f_min=2 f_min1=6 f_max1=36 f_max=42  maxsize=1000 \
	 Transp reshape=1,3,5 plane=23 > $@

prep-fs.H: ${SIGDIR}/fs-splitspread-shots.H
	Cp  ${SIGDIR}/fs-splitspread-shots.H  fs-splitspread_shots.H
	<fs-splitspread_shots.H /net/koko/bob/SEP_BOB/bin/Transf shotmig=y is2d=y wei=y f_min=2 f_min1=6 f_max1=36 f_max=42  maxsize=1000 > $@

prep_mult.H:
	Math file1=fs-splitspread_shots.H file2=splitspread_shots.H exp="file1-file2" > mult-splitspread_shots.H
	<mult-splitspread_shots.H Window n1=800 n3=1 f3=200 | /net/koko/bob/SEP_BOB/bin/Transf shotmig=y is2d=y wei=y f_min=2 f_min1=6 \
	f_max1=36 f_max=42 maxsize=1000 > $@

source01.H:
	<splitspread_shots.H Window3d min1=4.88 max1=5.12 f3=5 n3=1 f2=673 n2=1 | Pad end1=1470 > j1.H 
	echo o1=-0.112 n4=1 o4=1 d4=1 n5=1 o5=1 d5=1 >> j1.H
	<j1.H /net/koko/bob/SEP_BOB/bin/Transf shotmig=y is2d=y wei=y f_min=2 f_min1=6 f_max1=36 f_max=42  maxsize=1000 | Transp reshape=1,3,5 plane=23 > $@

prep_pos.H:
	< prep.H Window3d min1=0 squeeze=n | Pad beg1=347 end1=347 >$@

prep_neg.H:
	< prep.H Window3d max1=0 squeeze=n | Pad n1=695 >$@

prep_spl.H:
	< prep.H Window3d squeeze=n | Pad beg1=347 end1=347 >$@

prep_spl-fs.H:
	< prep-fs.H Window3d squeeze=n | Pad beg1=347 end1=347 >$@

prep_mult2.H: prep_mult.H
	< prep_mult.H Window3d squeeze=n | Pad beg1=347 end1=347 >$@

vel_pad1.H:
	< ${SIGSMULT_DATA}/sigsbee2b_migration_velocity.H Window> j.H
	echo "hff=-1 gff=-1 d1=25 o2=10025 d2=37.5"      >>j.H
	< j.H Window3d n1=701 j2=2|Pad beg2=2000 n2out=10000 extend=1|Transp> vel_pad1.H
	/net/koko/alejandro/plib/pcs2/bin/Wedge.x vel_pad1.H axis=2 nn=1 no=0. nd=75. 
	echo  "  label1="x" label2="y" label3="z" " >> vel_pad1.H

vel_pad.H:
	< ${SIGSMULT_DATA}/sigsbee2b_migration_velocity.H Window> j.H
	echo "hff=-1 gff=-1 d1=25 o2=10025 d2=37.5"      >>j.H
	< j.H Window3d n1=1201 j2=2|Pad beg2=2000 n2out=10000 extend=1|Transp> vel_pad.H
	/net/koko/alejandro/plib/pcs2/bin/Wedge.x vel_pad.H axis=2 nn=1 no=0. nd=75.
	echo  "  label1="x" label2="y" label3="z" " >> vel_pad.H


mig_Sis_Parallel_16000.H:  data_f.H wave.H vel_pad.H ${PARDIR}/go_sis.P 
	@date
	nohup Parallel command=/net/koko/brad/bin/LINUX/ShotMig files="data_f.H,wave.H,vel_pad.H,$@"  \
	tags="D,D_d,V,R" usage="INPUT,INPUT,INPUT,OUTPUT" nblock=60 axis=4,4,5,5 pverb=2  \
	file_type="DISTRIBUTE,COPY,COPY,COPY"  mach_mfile=machinefile_all nx_shots=327 ox_shots=10925. \
	par=${PARDIR}/go_sis.P  taper=y  taper_pcent=2 marine=y watercolumn=6000 #restart=y

mig_Sis_Parallel_pad.H:  data_f.H wave.H vel_pad.H ${PARDIR}/go_sis.P 
	@date
	nohup Parallel command=./ShotMigNew files="data_f_pad.H,wave.H,vel_pad.H,$@"  \
	tags="D,D_d,V,R" usage="INPUT,INPUT,INPUT,OUTPUT" nblock=37 axis=4,4,5,5 pverb=2  \
	file_type="DISTRIBUTE,COPY,COPY,COPY"  mach_mfile=machinefile_half nx_shots=327 ox_shots=10925. \
	par=${PARDIR}/go_sis.P  taper=y  taper_pcent=2 marine=y watercolumn=6000 minx=10925 maxx=60000   #restart=y

Mig_pos.H: prep_pos.H source01.H vel_pad.H go_sis.P
	@date
	nohup Parallel command=./ShotMigNew files="prep_pos.H,source01.H,vel_pad.H,illumina_pos.H,$@"  \
	tags="D,D_d,V,N_d,R" usage="INPUT,INPUT,INPUT,OUTPUT,OUTPUT" nblock=496 axis=4,4,4,6,6 pverb=2  \
	file_type="DISTRIBUTE,COPY,COPY,COPY,COPY" mach_mfile=machinefile_200 \
	nx_shots=496 ox_shots=10925 \
	par=go_sis.P  taper=y  taper_pcent=2 marine=y watercolumn=5400 minx=12000 maxx=70000 >& Mig_pos.log &  #restart=y

Mig_post.H: prep_pos.H source01.H vel_pad.H go_sis.P
	@date
	nohup Parallel command=./ShotMigNew files="prep_pos.H,source01.H,vel_pad.H,illumina_post.H,$@"  \
	tags="D,D_d,V,N_d,R" usage="INPUT,INPUT,INPUT,OUTPUT,OUTPUT" nblock=496 axis=4,4,4,6,6 pverb=2  \
	file_type="DISTRIBUTE,COPY,COPY,COPY,COPY" mach_mfile=machinefile_200 \
	nx_shots=496 ox_shots=10925 \
	par=go_sis_ZO.P  taper=y  taper_pcent=2 marine=y watercolumn=5400 minx=12000 maxx=70000 >& Mig_post.log &  #restart=y

Mig_pos_paral.H: prep_pos.H source01.H vel_pad.H go_sis.P
	Window3d < prep_pos.H squeeze=n j4=50 n3=200> prep_pos_tmp.H
	Window3d < source01.H squeeze=n n3=200> source01_tmp.H
	Window3d < vel_pad.H squeeze=n n3=400 > vel_pad_tmp.H
	@date
	nohup Parallel command=./ShotMigNew files="prep_pos_tmp.H,source01_tmp.H,vel_pad_tmp.H,$@"  \
	tags="D,D_d,V,R" usage="INPUT,INPUT,INPUT,OUTPUT" nblock=10 axis=4,4,4,6 pverb=2  \
	file_type="DISTRIBUTE,COPY,COPY,COPY" mach_mfile=machinefile_200 \
	nx_shots=496 ox_shots=10925 \
	nref=2 taper=y  taper_pcent=2 marine=y watercolumn=5400 minx=12000 maxx=70000   #restart=y

Mig_fs.H: prep-fs1.H source02.H vel_pad.H go_sis.P
	@date
	nohup Parallel command=./ShotMigNew files="prep-fs1.H,source02.H,vel_pad.H,$@"  \
	tags="D,D_d,V,R" usage="INPUT,INPUT,INPUT,OUTPUT" nblock=10 axis=4,4,4,6 pverb=2  \
	file_type="DISTRIBUTE,COPY,COPY,COPY" mach_mfile=machinefile_200 \
	nx_shots=496 ox_shots=10925 \
	nref=2 taper=y  taper_pcent=2 marine=y watercolumn=5400 minx=12000 maxx=70000   #restart=y

Mig_serial.H: prep-fs1.H source02.H vel_pad.H go_sis.P
	./ShotMigNew D=prep-fs1.H D_d=source02.H V=vel_pad.H R=$@  \
	nx_shots=496 ox_shots=10925 par=go_sis.P \
	nref=2 taper=y  taper_pcent=2 marine=y watercolumn=5400 minx=11500 maxx=25000   #restart=y

Mig_pos_serial.H: prep_pos.H source01.H vel_pad.H go_sis.P
	@date
	Window3d < prep_pos.H squeeze=n j4=50 n3=200> prep_pos_tmp.H
	Window3d < source01.H squeeze=n n3=200> source01_tmp.H	
	Window3d < vel_pad.H squeeze=n n3=400 > vel_pad_tmp.H
	./ShotMigNew D=prep_pos_tmp.H D_d=source01_tmp.H V=vel_pad_tmp.H R=$@  \
	nref=2 taper=y  taper_pcent=2 marine=y watercolumn=5400  minx=12000 maxx=70000  

Mig_neg.H: prep_neg.H source01.H vel_pad.H go_sis.P
	@date
	nohup Parallel command=./ShotMigNew files="prep_neg.H,source01.H,vel_pad.H,$@"  \
	tags="D,D_d,V,R" usage="INPUT,INPUT,INPUT,OUTPUT" nblock=496 axis=4,4,4,6 pverb=2  \
	file_type="DISTRIBUTE,COPY,COPY,COPY" mach_mfile=machinefile_200 \
	nx_shots=496 ox_shots=10925 \
	par=go_sis.P  taper=y  taper_pcent=2 marine=y watercolumn=5400 minx=12000 maxx=70000 restart=y

Mig_spl1.H:  
	@date
	nohup Parallel command=./ShotMigNew files="prep.H,source01.H,vel_pad.H,illumina.H,$@"  \
	tags="D,D_d,V,N_d,R" usage="INPUT,INPUT,INPUT,OUTPUT,OUTPUT" nblock=496 axis=4,4,4,6,6 pverb=2  \
	file_type="DISTRIBUTE,COPY,COPY,COPY,COPY" mach_mfile=machinefile_200 \
	nx_shots=496 ox_shots=10925 \
	par=go_sis.P  taper=y  taper_pcent=2 marine=y watercolumn=5400 minx=12000 maxx=70000 #restart=y

Mig_spl.H: prep_spl.H source01.H vel_pad.H go_sis.P 
	@date
	nohup Parallel command=./ShotMigNew files="prep_spl.H,source01.H,vel_pad.H,illumina.H,$@"  \
	tags="D,D_d,V,N_d,R" usage="INPUT,INPUT,INPUT,OUTPUT,OUTPUT" nblock=496 axis=4,4,4,6,6 pverb=2  \
	file_type="DISTRIBUTE,COPY,COPY,COPY,COPY" mach_mfile=machinefile_200 \
	nx_shots=496 ox_shots=10925 \
	par=go_sis.P  taper=y  taper_pcent=2 marine=y watercolumn=5400 minx=12000 maxx=70000 >& Mig_spl.log & #restart=y

Mig_spl-fs.H: prep_spl-fs.H source01.H vel_pad.H go_sis.P
	@date
	nohup Parallel command=./ShotMigNew files="prep_spl-fs.H,source01.H,vel_pad.H,$@"  \
	tags="D,D_d,V,R" usage="INPUT,INPUT,INPUT,OUTPUT" nblock=496 axis=4,4,4,6 pverb=2  \
	file_type="DISTRIBUTE,COPY,COPY,COPY" mach_mfile=machinefile_200 \
	nx_shots=496 ox_shots=10925 \
	par=go_sis.P  taper=y  taper_pcent=2 marine=y watercolumn=5400 minx=12000 maxx=70000 #restart=y

Mig_mult.H: prep-mult.H source01.H vel_pad.H go_sis.P
	@date
	nohup Parallel command=./ShotMigNew files="prep-mult.H,source01.H,vel_pad.H,$@"  \
        tags="D,D_d,V,R" usage="INPUT,INPUT,INPUT,OUTPUT" nblock=496 axis=4,4,4,6 pverb=2  \
        file_type="DISTRIBUTE,COPY,COPY,COPY" mach_mfile=machinefile_200 \
        nx_shots=496 ox_shots=10925 \
        par=go_sis.P  taper=y  taper_pcent=2 marine=y watercolumn=5400 minx=12000 maxx=70000 #restart=y

Mig_mult2.H: prep_mult2.H source01.H vel_pad.H go_sis.P
	@date
	nohup Parallel command=./ShotMigNew files="prep_mult2.H,source01.H,vel_pad.H,$@"  \
        tags="D,D_d,V,R" usage="INPUT,INPUT,INPUT,OUTPUT" nblock=200 axis=4,4,4,6 pverb=2  \
        file_type="DISTRIBUTE,COPY,COPY,COPY" mach_mfile=machinefile_200 \
        jhx=2 nx_shots=200 ox_shots=10925 \
	par=go_sismult.P  taper=y  taper_pcent=2 marine=y watercolumn=5400 minx=12000 maxx=70000 #restart=y

Mig_spl_hi.H: prep_spl.H source01.H vel_pad_hi.H go_sis.P
	@date
	nohup Parallel command=./ShotMigNew files="prep_spl.H,source01.H,vel_pad_hi.H,$@"  \
	tags="D,D_d,V,R" usage="INPUT,INPUT,INPUT,OUTPUT" nblock=496 axis=4,4,4,6 pverb=2  \
	file_type="DISTRIBUTE,COPY,COPY,COPY" mach_mfile=machinefile_200 \
	nx_shots=496 ox_shots=10925 \
	par=go_sis.P  taper=y  taper_pcent=2 marine=y watercolumn=5400 minx=12000 maxx=70000 #restart=y

Mig_spl_lo.H: prep_spl.H source01.H vel_pad_lo.H go_sis.P
	@date
	nohup Parallel command=./ShotMigNew files="prep_spl.H,source01.H,vel_pad_lo.H,$@"  \
	tags="D,D_d,V,R" usage="INPUT,INPUT,INPUT,OUTPUT" nblock=496 axis=4,4,4,6 pverb=2  \
	file_type="DISTRIBUTE,COPY,COPY,COPY" mach_mfile=machinefile_200 \
	nx_shots=496 ox_shots=10925 \
	par=go_sis.P  taper=y  taper_pcent=2 marine=y watercolumn=5400 minx=12000 maxx=70000 #restart=y

ADCIG_spl-fs.H:Mig_spl-fs.H
	< Mig_spl-fs.H Transp reshape=2,4,5 plane=13 | Pad beg2=43 end2=44 | /net/koko/bob/SEP_BOB/bin/OFF2ANG verb=y eps=1 maxmem=1000 >$@

ADCIG_spl.H:Mig_spl.H
	< Mig_spl.H Transp reshape=2,4,5 plane=13 | Pad beg2=43 end2=44 | /net/koko/bob/SEP_BOB/bin/OFF2ANG verb=y eps=1 maxmem=1000 >$@

ADCIG_spl_lo.H:Mig_spl_lo.H
	< Mig_spl_lo.H Transp reshape=2,4,5 plane=13 | Pad beg2=43 end2=44 | /net/koko/bob/SEP_BOB/bin/OFF2ANG verb=y eps=1 maxmem=1000 >$@

ADCIG_spl_hi.H:Mig_spl_hi.H
	< Mig_spl_hi.H Transp reshape=2,4,5 plane=13 | Pad beg2=43 end2=44 | /net/koko/bob/SEP_BOB/bin/OFF2ANG verb=y eps=1 maxmem=1000 >$@

ADCIG_pos.H:Mig_pos.H
	< Mig_pos.H Transp reshape=2,4,5 plane=13 | Pad beg2=43 end2=44 end1=100| /net/koko/bob/SEP_BOB/bin/OFF2ANG verb=y eps=30 maxmem=1000 >$@

IllADCIG_pos.H:Mig_pos.H
	< Mig_vs_illum_pos.H Transp reshape=2,4,5 plane=13 | Pad beg2=43 end2=44 end1=100| /net/koko/bob/SEP_BOB/bin/OFF2ANG verb=y eps=30 maxmem=1000 >$@

ADCIG_neg.H:Mig_neg.H
	< Mig_neg.H Transp reshape=2,4,5 plane=13 | Pad beg2=43 end2=44 | /net/koko/bob/SEP_BOB/bin/OFF2ANG verb=y eps=1 maxmem=1000 >$@

Vo_pos:
	< Mig_pos.H Window3d | Transp plane=13 | Transp plane=23 | Grey eout=1 gainpanel=a pclip=95 | Ricksep &

Va_pos:
	Window3d < ang_pos.H | Transp plane=23 | Grey eout=1 gainpanel=a pclip=95 | Ricksep &

