#define DEBUG
#define BINDIR /r3/martin/bin/MTYPE
#define FIGDIR ../Fig
#include <SEP.defs>
#define REALLOG  ../RealLog
#define VELAN  ../Velan
#define GRAPHMINMAX min2=1400 max2=4400 min1=0 max1=3
#define GRAPHSMALL min2=1400 max2=3400 min1=0 max1=3
#define GRAPHTINY min2=1400 max2=2600 min1=0 max1=3
#define COLOR  color=F


vreg.H:
	Reglog2time <REALLOG/velrmsp.direct.h |Real >jj1
	Reglog2time <REALLOG/velrmsp.direct.h |Imag >jj2
	Merge jj1 jj2 space=n axis=2 >jj
	Interpwell nzo=900 dzo=0.004 zo1=0. <jj >jj2
	Window <jj2 f2=1 n2=1 >vreg.H

vfield.H:  vreg.H 
	echo "7 8" > jmid
	atoF <jmid >xmidpts.H
	Cp vreg.H vreg2.H
	Merge vreg.H vreg2.H axis=2 space=n >vfile.H
	Vgrid vfile=vfile.H xmidpts=xmidpts.H n1=900 d1=1 o1=1 n2=11 >vfield.H nmid=2 option=3 

nmo.H:  vfield.H 
	Window n1=900 <VELAN/cdp.h | Tpow tpow=1.5 | NMO velfile=vfield.H >nmo.H

stack.H:  nmo.H 
	 Stack <nmo.H >stack.H


stack641.H: /* vreg.H */
	Window n1=900 <VELAN/cdp641.h | NMO velfile=vreg.H | Stack >stack641.H

/*	Vgrid vfile=jj n1=900 nmid=1 >test.H*/

/*FIGDIR/summarize.v: picks.641.h  REALLOG/velrmsp.direct.h REALLOG/velzp.direct.h REALLOG/velxpnmo.pi.h*/


FIGDIR/sembdmo.v: sembdmo641.v picks.641.v tvelxpnmo.pi.v  tvelrmsp.direct.v
	vppen erase=once scale=.5 sembdmo641.v picks.641.v tvelxpnmo.pi.v tvelrmsp.direct.v >FIGDIR/sembdmo.v


sembdmo641.v: if exist VELAN/sembdmo641.h
        Window <VELAN/sembdmo641.h n1=750 >jj
        Byte <jj allpos=y pclip=95 gpow=1. |Ta2vplot color=F out=sembdmo641.v  head=/dev/null title="Semblance 2D DMO corrected" label1="Velocity [m/sec]" label2="time [sec]"

semb641.v: if exist VELAN/semball.h
        Window <VELAN/semball.h f3=7 n3=1 n1=750 >semb641.h
        Byte <semb641.h allpos=y pclip=95 gpow=1. |Ta2vplot color=F out=semb641.v  head=/dev/null
/*        Contour <semb641.h out=semb641.v  head=/dev/null*/

tvel%rms.1500.v: if exist REALLOG/vel%.1500.h

C2vpick: C2vpick.x

clean&: jclean
	-RM_CMD   *.x j*  *.o *.f *.v a.out core

veryclean&: clean
	-RM_CMD  *.h  j*  

#include <SEP.idoc.rules>
#include <SEP.obj.rules>
#include <SEP.prog.rules>
