Commit d549f38f authored by thomas.forbriger's avatar thomas.forbriger Committed by thomas.forbriger
Browse files

use field offset for scaling purposes, not plot offset

This is a legacy commit from before 2015-03-01.
It may be incomplete as well as inconsistent.
See COPYING.legacy and README.history for details.


SVN Path:     http://gpitrsvn.gpi.uni-karlsruhe.de/repos/TFSoftware/trunk
SVN Revision: 4860
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent a15b629d
......@@ -28,6 +28,7 @@ c 19/06/03 V1.1 remember trace number in file
c 14/11/11 V1.2 store minimum and maximum offset too
c 12/11/12 V1.3 store offset shift
c 20/11/12 V1.4 provide file specific variable area plot flag
c store field offset explicitely
c
c==============================================================================
c
......@@ -46,7 +47,13 @@ c
character*6 instype(maxtraces)
integer usevarplot(maxtraces)
real toffset(maxtraces), dt(maxtraces)
real roffset(maxtraces), offsetshift(maxtraces)
c
c roffset: to locate trace in plot panel
c fieldoffset: offset of receiver in field profile
c
c both values will be equal, except if trace is shifted intentionally
real roffset(maxtraces), fieldoffset(maxtraces)
c
real maxval(maxtraces), average(maxtraces), minval(maxtraces)
real maxoffset, minoffset
c
......@@ -57,7 +64,7 @@ c must expect to need maxsamples of time values (tos)
c
common /refract_data/ nsamples, firstsample, filename, source,
& station, channel, auxid, instype,
& toffset, roffset, offsetshift,
& toffset, roffset, fieldoffset,
& dt, fileindex, traceinfile, usevarplot,
& maxval, average, minval, data, timeofsample,
& nfiles, ntraces, firstinchain, chain, revchain,
......
......@@ -35,6 +35,7 @@ c 26/11/2010 V1.7 provide means to select file formats
c 14/11/2011 V1.8 remember whether minoff is forced
c 12/11/2012 V1.9 new option -Sn
c 13/11/2012 V1.10 new option -Ef and -TL
c 20/11/2012 V1.11 new option -Eu
c
c==============================================================================
c
......@@ -64,7 +65,7 @@ c CVS Id
& '$Id$')
c commandline
integer maxopt
parameter(maxopt=63)
parameter(maxopt=64)
character*3 optid(maxopt)
character*120 optarg(maxopt)
logical optset(maxopt), opthasarg(maxopt)
......@@ -103,6 +104,9 @@ c elements and style options
data optid(62) /'-Ef'/
data opthasarg(62) /.FALSE./
data optarg(62) /'-'/
data optid(64) /'-Eu'/
data opthasarg(64) /.FALSE./
data optarg(64) /'-'/
c file reading
data (optid(i), i=40,43) /'-Fp','-Fa','-Ft','-Fm'/
data (opthasarg(i), i=40,43) /4*.TRUE./
......@@ -177,6 +181,7 @@ c elements and style
plflag_tracenum=optset(58)
plflag_tracename=optset(59)
elem_vpframe=optset(62)
plflag_subscale=optset(64)
c
c file reading
opt_Fpicks=optarg(40)
......
......@@ -30,6 +30,8 @@ c 03/07/98 V1.1 ok - after puzzling hard I admit that there is no way
c do find a global reference scale to a global reference
c offset for scaling mode 3 as the actual offset
c dependency is unknown
c 20/11/12 V1.2 use field offset for scaling purposes, not plot
c offset
c
c==============================================================================
cS
......@@ -66,13 +68,13 @@ c
c scaling mode 2: least offset trace is reference
c -----------------------------------------------
elseif (plpar_mode.eq.2) then
c find trace with least roffset
c find trace with least fieldoffset
tref=1
trefoff=roffset(1)
trefoff=fieldoffset(1)
do j=1,ntraces
if (roffset(j).lt.trefoff) then
if (fieldoffset(j).lt.trefoff) then
tref=j
trefoff=roffset(j)
trefoff=fieldoffset(j)
endif
enddo
c calculate reference scale
......@@ -82,10 +84,10 @@ c calculate reference scale
else
maxamp=max(abs(maxval(tref)),abs(minval(tref)))
endif
refmpc=plpar_amp/(roffset(tref)**plpar_expo)/maxamp
refmpc=plpar_amp/(fieldoffset(tref)**plpar_expo)/maxamp
c set mpc factors
do j=1,ntraces
trv_mpc(j)=refmpc*(roffset(j)**plpar_expo)
trv_mpc(j)=refmpc*(fieldoffset(j)**plpar_expo)
enddo
c
c scaling mode 3: least offset trace in dataset is reference
......@@ -93,17 +95,17 @@ c ----------------------------------------------------------
elseif (plpar_mode.eq.3) then
c go for files
do i=1,nfiles
c find trace with least roffset within file
c find trace with least fieldoffset within file
tref=0
do j=1,ntraces
if (fileindex(j).eq.i) then
if (tref.eq.0) then
tref=j
trefoff=roffset(j)
trefoff=fieldoffset(j)
else
if (roffset(j).lt.trefoff) then
if (fieldoffset(j).lt.trefoff) then
tref=j
trefoff=roffset(j)
trefoff=fieldoffset(j)
endif
endif
endif
......@@ -116,11 +118,11 @@ c calculate reference scale with respect to total reference
else
maxamp=max(abs(maxval(tref)),abs(minval(tref)))
endif
refmpc=plpar_amp/(maxamp*(roffset(tref)**plpar_expo))
refmpc=plpar_amp/(maxamp*(fieldoffset(tref)**plpar_expo))
c set mpc factors within file
do j=1,ntraces
if (fileindex(j).eq.i) then
trv_mpc(j)=refmpc*(roffset(j)**plpar_expo)
trv_mpc(j)=refmpc*(fieldoffset(j)**plpar_expo)
endif
enddo
enddo
......
......@@ -39,6 +39,7 @@ c will close the file upon reading the last trace
c 14/11/2011 V1.8 store minimum and maximum offset
c 12/11/2012 V1.9 store offset shift
c 20/11/2012 V1.10 read variable offset flag
c store field offset, not offset shift
c
c==============================================================================
c
......@@ -263,8 +264,8 @@ c extract info
roffset(ntraces)=
& sffu_offset(scs,sc1,sc2,0.,rcs,rc1,rc2,0.)
endif
fieldoffset(ntraces)=roffset(ntraces)
roffset(ntraces)=roffset(ntraces)+offshift
offsetshift(ntraces)=offshift
if (ntraces.eq.1) then
minoffset=roffset(ntraces)
maxoffset=roffset(ntraces)
......
......@@ -65,7 +65,7 @@ c
c the baseline of the curve must be 0. or average
c
logical result
real vppm, ttmin, ttmax, offshift
real vppm, ttmin, ttmax, theoffset
real realtime
c
c factor "world coordinates -> normalized device coordinates"
......@@ -123,10 +123,10 @@ c
c now check TIME SCALE
ttmin=toffset(i)
ttmax=toffset(i)+(nsamples(i)-1)*dt(i)
offshift=0.
if (plflag_osnoreduce) offshift=offsetshift(i)
trv_tmin=realtime(tov_tmin, roffset(i)-offshift)
trv_tmax=realtime(tov_tmax, roffset(i)-offshift)
theoffset=roffset(i)
if (plflag_osnoreduce) theoffset=fieldoffset(i)
trv_tmin=realtime(tov_tmin, theoffset)
trv_tmax=realtime(tov_tmax, theoffset)
if ((ttmin.ge.trv_tmax).or.(ttmax.le.trv_tmin)) result=.false.
endif
c
......
......@@ -34,6 +34,7 @@ c 26/11/2010 V1.5 provide help regarding file formats
c 17.12.2010 V1.6 format selection was missing in quick help
c 12/11/2012 V1.7 new option -Sn
c 20/11/2012 V1.8 new file specific flag v:
c new option -Eu
c
c==============================================================================
c
......@@ -51,7 +52,7 @@ c go
print *,' [-TL n] [-Lw width] [-Lc] [-Lm max] [-Lt width]'
print *,' [-Cb r,g,b] [-Cf r,g,b] [-CW] [-Cc] [-Cm max]'
print *,' [-Eg] [-Ev] [-Eb] [-EP T|F] [-ES T|F] [-ET T|F]'
print *,' [-En] [-Es] [-Ew T|F] [-Et T|F] [-Ep T|F]'
print *,' [-En] [-Es] [-Ew T|F] [-Et T|F] [-Ep T|F] [-Eu]'
print *,' [-Fp file] [-Fa file] [-Ft file] [-Fm file]'
print *,' [-Sx x1,x2] [-St t1,t2] [-Se exp] [-Sa lev]'
print *,' [-Sc lev] [-Sm mode] [-Sr vel] [-Si] [-SM]'
......@@ -161,6 +162,7 @@ c
print *,'-Ep T|F plot picks (T:yes; F:no)'
print *,'-En label each trace with its number'
print *,'-Es label each trace with its station name'
print *,'-Eu plot scales for each trace'
print *,' '
print *,'File reading'
print *,'------------'
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment