All examples for DBLIST
# Loading and spatial interpolation of a calibration database list for time-lapse dataset
# The following defines a dblist structure, loads it from different text files for every shot
# number (s_num) in input traces, and constructs interpolation surfaces for various attributes

*call	dblist	fb_ampl
pkey	r_num	
skey	year	

attrib	r_line	r_line		# coordinates for spatial interpolation
attrib	r_stnum	r_stnum

attrib	fbreak	fbreak		# attributes
attrib	acalib	acalib
attrib	tcalib	tcalib
attrib	phrot	phrot
attrib	spbal	spbal

loadtxt	DB/{s_num}.txt

reload	{s_num}		# reload this dblist for every new shot

	# create surfaces for interpolation:

surf2d	extrap	r_line	r_stnum	fbreak	fbreak_surf		# surface to interpolate baseline first arrivals
year 

surf2d	extrap	r_line	r_stnum	tcalib	tcalib_surf		# surface to interpolate baseline tcalib
year 

surf2d	extrap	r_line	r_stnum	acalib	acalib_surf		# surface to interpolate baseline acalib
year 

surf2d	extrap	r_line	r_stnum	phrot	phrot_surf		# surface to interpolate baseline phrot
year 

surf2d	extrap	r_line	r_stnum	spbal	spbal_surf		# surface to interpolate baseline spbal
year 

## This is how the corrections are interpolated and applied to traces (in the same job):

*call	hdrmath
eval	real fbreak1 = fbreak_surf.interp(year,r_line,r_stnum)
eval	real fbreak = fbreak_surf.interp(1999,r_line,r_stnum)
eval	real acalib = exp(acalib_surf.interp(year,r_line,r_stnum))
eval	real tcalib = tcalib_surf.interp(year,r_line,r_stnum)
eval	real phrot = phrot_surf.interp(year,r_line,r_stnum)
eval	real spbal = spbal_surf.interp(year,r_line,r_stnum)

eval	real tcalib1 = fbreak1 - fbreak + tcalib
eval	real refgain = refgain / acalib		# modify the gain scalar to reflect acalib

*call	static	tcalib	remove

*call	gain	remove	acalib

*call	filter
bslope			phrot