Commit 68295a73 authored by thomas.forbriger's avatar thomas.forbriger

grepg [FEATURE]: provide option to select plot axis range

parent fbb6dfe3
......@@ -657,10 +657,23 @@ c option -f
fourierfile=optarg(50)
c option -st
adaptivetimescaling=optset(51)
read(optarg(52), *, err=99, end=98) xlbound,xubound
read(optarg(53), *, err=99, end=98) ylbound,yubound
c print *,subtitlestring
c print *,optarg(45)
c
c ----------------------------------------------------------------------
c check parameter consistency
if (xlbound.ge.xubound) then
stop 'ERROR: parameters given by -Xb must be l<u'
endif
c
if (ylbound.ge.yubound) then
stop 'ERROR: parameters given by -Yb must be l<u'
endif
c ----------------------------------------------------------------------
c
c covariances
if (replot) implot=.false.
if (phasecolor) phaseswitch=.false.
......@@ -696,26 +709,43 @@ c report
df=(om(2)-om(1))*1.e3
minf=om(1)*1.e3
maxf=minf+(nfreq-1)*df
pminf=max(xlbound,minf)
pmaxf=min(xubound,maxf)
print *,'test slowness range: ',minf,'s/km - ',maxf,
& 's/km du=',df,'s/km'
print *,'plot range: ',pminf,'s/km - ',pmaxf,'s/km'
else
df=(om(2)-om(1))/pi2
minf=om(1)/pi2
maxf=minf+(nfreq-1)*df
pminf=max(xlbound,minf)
pmaxf=min(xubound,maxf)
print *,'frequency range: ',minf,'Hz - ',maxf,'Hz df=',df,'Hz'
print *,'plot range: ',pminf,'Hz - ',pmaxf,'Hz'
endif
du=(slo(2)-slo(1))*1.e3
mins=slo(1)*1.e3
maxs=mins+du*(nslo-1)
pmins=max(ylbound,mins)
pmaxs=min(yubound,maxs)
if (isgabor) then
print *,' time range: ',mins,'s - ',maxs,'s dt=',du,'s'
print *,' plot range: ',pmins,'s - ',pmaxs,'s'
elseif (iskspec) then
print *,' wavenumber range: ',mins,'1/km - ',maxs,
& '1/km dk=',du,'1/km'
& '1/km du=',du,'1/km'
print *,' plot range: ',pmins,'1/km - ',pmaxs,'1/km'
else
print *,' slowness range: ',mins,'s/km - ',maxs,
& 's/km du=',du,'s/km'
print *,' plot range: ',pmins,'s/km - ',pmaxs,'s/km'
endif
c
if (pmaxf.le.pminf)
& stop 'ERROR: plot range is empty; check parameters for -Xb'
if (pmaxs.le.pmins)
& stop 'ERROR: plot range is empty; check parameters for -Yb'
c
print *,' '
c----------------------------------------------------------------------
c initialize
......@@ -1209,7 +1239,7 @@ c
c plot box and box title and labels
c ---------------------------------
c
call pgenv(minf,maxf,mins,maxs,0,-2)
call pgenv(pminf,pmaxf,pmins,pmaxs,0,-2)
call pgqvp(0,pg_vpl,pg_vpr,pg_vpb,pg_vpt)
pg_vpr=1.-(1.-pg_vpr)*par_wedgeheight
call pgsvp(pg_vpl,pg_vpr,pg_vpb,pg_vpt)
......
......@@ -46,8 +46,11 @@ c
c
c original parameters
real mins, minf, maxs, maxf
c plot range parameters
real pmins, pminf, pmaxs, pmaxf
c
common /grepg_mainpara/ mins, maxs, minf, maxf
common /grepg_mainpara/ mins, maxs, minf, maxf,
& pmins, pmaxs, pminf, pmaxf
c
c define normalizing taper
real norm_center, norm_width
......
Markdown is supported
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