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

prepared new option - rearranged help output

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: 2127
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent b09641fc
c this is file <grepg.f>
c======================================================================
c $Id: grepg.f,v 1.32 2006-05-12 08:53:29 tforb Exp $
c $Id: grepg.f,v 1.33 2006-06-02 11:26:25 tforb Exp $
c
c GREPG.F
c
......@@ -96,6 +96,7 @@ c create a master and copy array dimensions include file
c only the master is in CVS, but the copy is loaded here
c so we may change the current dimension without
c affecting the CVS
c V2.38 provide adaptive scaling over time axis
c
c======================================================================
program grepg
......@@ -109,11 +110,11 @@ c
character titleformat*130
c program version:
character*79 version
parameter(version='GREPG V2.37a plot green amplitudes')
parameter(version='GREPG V2.38 plot green amplitudes')
character*120 CVS_VERSION
parameter(CVS_VERSION=
& '$Id: grepg.f,v 1.32 2006-05-12 08:53:29 tforb Exp $')
& '$Id: grepg.f,v 1.33 2006-06-02 11:26:25 tforb Exp $')
c declare variables for io
character*80 filename
......@@ -161,7 +162,7 @@ c cursor routine
real pickdx
c commandline
integer maxopt, lastarg, iargc
parameter(maxopt=50)
parameter(maxopt=51)
character*3 optid(maxopt)
character*80 optarg(maxopt)
logical optset(maxopt), opthasarg(maxopt)
......@@ -174,6 +175,7 @@ c commandline
logical phasecolor,phaseswitch,conlab,moveavg,polytrend,avgtrend
logical inccontr, setforeground, setbackground, hlsinterpol
logical omsqrscale, phasereverse,fourierinput
logical adaptivetimescaling
real linelength, tracedx, charheight, contrth, contrord
real tenpower, scalingslim, normvalue, normlimit
real phaseshift,grayify, rgb_red, rgb_green, rgb_blue
......@@ -198,44 +200,44 @@ c phase function pi constant
real pi
parameter(pi=3.1415926535897931159979)
c here are the keys to our commandline options
data optid/2h-d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.,3hnil/
& 7hxyz.out,2h1.,2*1h-,5h5.,4.,5htitle,1h-,6hxlabel,6hylabel,
& 3h-1.,9hamplitude,2h0.,1h-,9hphase (),6h0.,10.,7h20,10,2,1h9,
& 3h6,1,1h-,6h4.,0.3,1h3,2*8h0.,0.,0.,1h-,2h0.,1h-,'0.,0.,0.,1',
& '1.','NSP',1h5,1h4,1h-,2h3.,3hnil,1h-/
c======================================================================
c give basic information
print *,version
print *,
&'Usage: grepg filename [-d dev] [-i] [-c] [-r L,dx] [-R|I] [-L]'
print *,
&' [-q] [-p p] [-g] [-l width] [-s] [-P] [-S]'
print *,
&' [-m lim] [-G file] [-H ch] [-F file] [-v]'
print *,
&' [-N c,w] [-T title] [-X label] [-Y label] [-W]'
print *,
&' [-n value] [-A label] [-M lim] [-C] [-B label]'
print *,
&' [-O i,m,s] [-a a,g] [-f n] [-t n,m] [-Q] [-e lim]'
print *,
&' [-K o,t] [-b width] [-x R,G,B] [-y R,G,B] [-h]'
print *,
&' [-Fc r,g,b,w] [-Ah h] [-t n,m] [-Ta anno]'
print *,
&' [-FC n] [-Fl n] [-Pr] [-Ww w]'
print *,
&' [-ff filename]'
print *,' ',
&' [-q] [-p p] [-g] [-l width] [-s] [-P] [-S]'
print *,' ',
&' [-m lim] [-G file] [-H ch] [-F file] [-v]'
print *,' ',
&' [-N c,w] [-T title] [-X label] [-Y label] [-W]'
print *,' ',
&' [-n value] [-A label] [-M lim] [-C] [-B label]'
print *,' ',
&' [-O i,m,s] [-a a,g] [-f n] [-t n,m] [-Q] [-e lim]'
print *,' ',
&' [-K o,t] [-b width] [-x R,G,B] [-y R,G,B] [-h]'
print *,' ',
&' [-Fc r,g,b,w] [-Ah h] [-t n,m] [-Ta anno]'
print *,' ',
&' [-FC n] [-Fl n] [-Pr] [-Ww w]'
print *,' ',
&' [-ff filename] [-st]'
print *,
&'or: grepg -help'
if (iargc().lt.1) stop 'ERROR: missing arguments'
......@@ -247,12 +249,18 @@ c give basic information
print *,' filename any tf-type file'
print *,' you may read files with the following'
print *,' ''magic'' signatures:'
print *,' ''1234'' complex omega,p-spectra (aka green)'
print *,' ''123S'' real weight values to be used as'
print *,' inversion weights or taper factors'
print *,' ''123P'' complex grereso coefficients which'
print *,' use a test-slowness as abscissa'
print *,' ''123G'' complex gabor matrix coefficients'
print *,' ',
& ' ''1234'' complex omega,p-spectra (aka green)'
print *,' ',
& ' ''123S'' real weight values to be used as'
print *,' ',
& ' inversion weights or taper factors'
print *,' ',
& ' ''123P'' complex grereso coefficients which'
print *,' ',
& ' use a test-slowness as abscissa'
print *,' ',
& ' ''123G'' complex gabor matrix coefficients'
print *,' which use a time as abscissa'
print *,' '
print *,'data modification options'
......@@ -266,16 +274,21 @@ c give basic information
print *,' -t n,m remove polynomial trend from data using'
print *,' Legendre polynomials up to order ''n'' '
print *,' the mode value ''m'' is a sum of:'
print *,' 1: remove polynomial trend from real part'
print *,' 2: remove polynomial trend from imag part'
print *,' ',
& ' 1: remove polynomial trend from real part'
print *,' ',
& ' 2: remove polynomial trend from imag part'
print *,' -Q remove moving average'
print *,' -K o,t increase contrast by order o and threshold t'
print *,' -K o,t ',
& ' increase contrast by order o and threshold t'
print *,' -E scale all coefficients with 1/omega**2'
print *,' '
print *,' normalize data'
print *,' '
print *,' -s scale frequencies individually'
print *,' using maximum amplitude value'
print *,' -st scale individually, but use time axis'
print *,' (useful for gabor plots)'
print *,' -N c,w Use a gaussian taper when calculating'
print *,' normalization factors in order to scale'
print *,' frequencies individually. c will be the'
......@@ -284,32 +297,46 @@ c give basic information
print *,' where the taper is 0.1 (also in s/km).'
print *,' -n value normalize maximum amplitude to value'
print *,' -M lim use only coefficients for slowness being'
print *,' greater than lim to find normalizing value'
print *,' that is used to rescale data per frequency'
print *,' ',
& ' greater than lim to find normalizing value'
print *,' ',
& ' that is used to rescale data per frequency'
print *,' (all coefficients will be scaled)'
print *,' (default is ',optarg(28)(1:3),').'
print *,' -f n apply a smooth weighting function when'
print *,' scaling frequencies individually - this is'
print *,' -f n ',
& ' apply a smooth weighting function when'
print *,' ',
& ' scaling frequencies individually - this is'
print *,' done by applying a moving average to the'
print *,' the weight, where ''n'' is the filter length'
print *,' ',
& ' the weight, where ''n'' is the filter length'
print *,' '
print *,' scaling'
print *,' '
print *,' -e lim use coefficients for slowness values being'
print *,' greater than ''lim'' to find maximum value'
print *,' -e lim ',
& ' use coefficients for slowness values being'
print *,' ',
& ' greater than ''lim'' to find maximum value'
print *,' for amplitude plot scale'
print *,' using this feature may result in amplitude'
print *,' ',
& ' using this feature may result in amplitude'
print *,' clipping'
print *,' the value of ''lim'' defaults to the value'
print *,' ',
& ' the value of ''lim'' defaults to the value'
print *,' given by ''-M'' '
print *,' -m lim use only coefficients for slowness being'
print *,' greater than ''lim'' to find maximum value'
print *,' that ist used to evaluate the normalizing'
print *,' -m lim ',
& ' use only coefficients for slowness being'
print *,' ',
& ' greater than ''lim'' to find maximum value'
print *,' ',
& ' that ist used to evaluate the normalizing'
print *,' factor for the whole dataset'
print *,' (default is ',optarg(16)(1:3),').'
print *,' -p p the depth of the amplitude grayscale will be'
print *,' -p p ',
& ' the depth of the amplitude grayscale will be'
print *,' p powers of ten'
print *,' -L use linear amplitude scaling rather than log10'
print *,' -L ',
& ' use linear amplitude scaling rather than log10'
print *,' -Pr plot phase for different Fourier sign'
print *,' convention'
print *,' greda and other define the Fourier'
......@@ -324,11 +351,15 @@ c give basic information
print *,' '
print *,' -C colorfull plot with phase information'
print *,' -a a,g just plot phase information as grayscale'
print *,' a: (real value; 0.<= a <=360.) phase angle to'
print *,' ',
& ' a: (real value; 0.<= a <=360.) phase angle to'
print *,' shift grayscale (given in degrees)'
print *,' g: (real value; 0.<= g <=1.) grayify factor'
print *,' values differing from 1. will result in'
print *,' a grayscale that does not use all values'
print *,' ',
& ' g: (real value; 0.<= g <=1.) grayify factor'
print *,' ',
& ' values differing from 1. will result in'
print *,' ',
& ' a grayscale that does not use all values'
print *,' from black to white'
print *,' -i plot isolines'
print *,' amplitude values are still available to'
......@@ -352,12 +383,18 @@ c give basic information
print *,' -H ch character height for plot'
print *,' -W plot black on white'
print *,' ATTENTION: be sure to use this option'
print *,' together with a postscript output device'
print *,' as those don''t know about ''white on black'''
print *,' -b width for grayscale plots: plot all picked curves'
print *,' with color index 1 - place them on top of a'
print *,' curve of width ''width'' and color index 0'
print *,' -Fc r,g,b,w plot dispersion curves with width ''w'' and'
print *,' ',
& ' together with a postscript output device'
print *,' ',
& ' as those don''t know about ''white on black'''
print *,' -b width ',
& ' for grayscale plots: plot all picked curves'
print *,' ',
& ' with color index 1 - place them on top of a'
print *,' ',
& ' curve of width ''width'' and color index 0'
print *,' -Fc r,g,b,w',
& ' plot dispersion curves with width ''w'' and'
print *,' color (r,g,b,).'
print *,' -c plot colored resolution marks and'
print *,' and colored grid'
......@@ -365,13 +402,18 @@ c give basic information
print *,' -T title define title string for plot'
print *,' -X label define x-label for plot'
print *,' -Y label define y-label for plot'
print *,' -A label define amplitude wedge annotation label for plot'
print *,' -Ta anno define subtitle annotations'
print *,' -Ah h set amplitude wedge label character height'
print *,' -A label ',
& ' define amplitude wedge annotation label for plot'
print *,' -Ta anno ',
& ' define subtitle annotations'
print *,' -Ah h ',
& ' set amplitude wedge label character height'
print *,' to ''h'' '
print *,' -B label define phase wedge annotation label for plot'
print *,' -B label ',
& ' define phase wedge annotation label for plot'
print *,' -x R,G,B set foreground color to RGB-value'
print *,' -y R,G,B set background color for color ramp to RGB-value'
print *,' -y R,G,B ',
& ' set background color for color ramp to RGB-value'
print *,' -h use HLS interpolation for color ramp'
print *,' -FC n cycle curve color with period n'
print *,' -Fl n cycle curve linestyle with period n'
......@@ -393,7 +435,8 @@ c give basic information
print *,' -d dev select output-device (see below for'
print *,' a list of possible devices)'
print *,' -G file writes one-column xyz-data to file'
print *,' this file may be converted using xyz2grd.sh'
print *,' ',
& ' this file may be converted using xyz2grd.sh'
print *,' -F file read dispersion curve picks from file'
print *,' -ff filename'
print *,' read Fourier data for phasor walkout'
......@@ -408,18 +451,28 @@ c give basic information
print *,'some inside-information:'
print *,'------------------------'
print *,' '
print *,' After modifying the read dataset the complex coefficients'
print *,' my be smoothed. The raw or smoothed data is split into'
print *,' a set of amplitude values (linear or logarithmic) and a set'
print *,' of phase values. In case you decide to plot the phase or'
print *,' the full colored complex information the amplitude values'
print *,' are still available and may be used for a contour map.'
print *,' After modifying the read',
& ' dataset the complex coefficients'
print *,' my be smoothed. The raw or',
& ' smoothed data is split into'
print *,' a set of amplitude values',
& ' (linear or logarithmic) and a set'
print *,' of phase values. In case',
& ' you decide to plot the phase or'
print *,' the full colored complex',
& ' information the amplitude values'
print *,' are still available and',
& ' may be used for a contour map.'
print *,' '
print *,'picking:'
print *,' <left button>, <P>, <p>: pick one point of active curve'
print *,' <mid button>, <D>, <d>: delete nearest pint of active curve'
print *,' <H>, <h>: pick a u/f-pair for hyperbola'
print *,' <B>, <b>: pick a u/f-pair for flexural wave'
print *,' <left button>, <P>, <p>: ',
& ' pick one point of active curve'
print *,' <mid button>, <D>, <d>: ',
& ' delete nearest pint of active curve'
print *,' <H>, <h>: ',
& ' pick a u/f-pair for hyperbola'
print *,' <B>, <b>: ',
& ' pick a u/f-pair for flexural wave'
print *,' dispersion'
print *,' <SPACE>, <r>: replot'
print *,' <right button>, <X>, <x>: exit'
......@@ -428,7 +481,8 @@ c give basic information
print *,' <l>: read dispersion curves'
print *,' <s>: save dispersion curves'
print *,' <1>, <2>, <3>, <4>, <5>,'
print *,' <6>, <7>, <8>, <9>, <0>: select dispersion curve to pick'
print *,' <6>, <7>, <8>, <9>, <0>: ',
& ' select dispersion curve to pick'
print *,' '
print *,'=================================================='
print *,'possible output devices: '
......@@ -541,6 +595,8 @@ c campatibility to version prior V2.23
read(optarg(49), *, err=99, end=98) wedgewidth
fourierinput=optset(50)
fourierfile=optarg(50)
c option -st
adaptivetimescaling=optset(51)
c print *,subtitlestring
c print *,optarg(45)
......@@ -716,6 +772,8 @@ c endif
scaling(ifreq)=1./maxvalue
enddo
endif
c
c moving average is applied when scaing frequencies independently
if (moveavg) then
avglength=min(avglength,nfreq)
print *,' apply moving average of length ',avglength,
......
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