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

moved description texts to separate files

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: 5130
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent 632cbfa8
......@@ -72,10 +72,23 @@ clean: ;
-/bin/rm -vf flist *.o *.xxx.* *.ps *~ $(PROGRAMS)
TESTCASEMAKE=$(filter-out %.bak,$(wildcard testcases/Makefile*))
flist: $(wildcard *.f *.inc Makefile *.cc *.gpt) doxydoc.cfg README \
EDITFILES=Makefile README $(wildcard *.cfg) COPYING
EDITSRC=$(wildcard *.cc *.h *.c *.f *.txt *.gpt *.inc)
EDITTESTS=$(wildcard testcases/*.par) $(wildcard testcases/*.tpl) \
$(TESTCASEMAKE) $(wildcard testcases/*.gpt)
flist: $(wildcard *.txt *.c *.f *.inc Makefile *.cc *.gpt) doxydoc.cfg README \
$(wildcard testcases/*.par) $(wildcard testcases/*.tpl) \
$(TESTCASEMAKE) $(wildcard testcases/*.gpt)
echo $^ | tr ' ' '\n' | sort > $@
$(TESTCASEMAKE) $(wildcard testcases/*.gpt) $(TF_EDIT)
echo $(filter $(EDITFILES),$^) | tr ' ' '\n' | sort > $@
echo "----" >> $@
echo $(filter $(EDITSRC),$^) | tr ' ' '\n' | sort >> $@
echo "----" >> $@
echo $(sort $(filter $(EDITTESTS),$^)) | tr ' ' '\n' >> $@
echo "----" >> $@
echo $(filter-out $(EDITFILES) $(EDITSRC) $(EDITTESTS),$^) \
| tr ' ' '\n' | sort >> $@
.PHONY: edit
edit: flist; vim $<
......@@ -84,6 +97,33 @@ edit: flist; vim $<
%.o: %.f; $(FC) -c -o $@ $< $(FFLAGS)
#----------------------------------------------------------------------
# description and online texts
%.cc %.h: %.txt
echo "// DO NOT EDIT: this file is automatically derived from $<" \
> $(patsubst %.txt,%.h,$<)
echo "extern char $(patsubst %.txt,%,$<)[];" >> $(patsubst %.txt,%.h,$<)
echo "// DO NOT EDIT: this file is automatically derived from $<" \
> $(patsubst %.txt,%.cc,$<)
echo "#include \"$(patsubst %.txt,%.h,$<)\"" >> $(patsubst %.txt,%.cc,$<)
echo "char $(patsubst %.txt,%,$<)[]=" >> $(patsubst %.txt,%.cc,$<)
echo "{" >> $(patsubst %.txt,%.cc,$<)
cat $< | egrep -v '^#' | sed -e 's/"/\\"/g' \
| sed -e 's/$$/\\n"/' | sed -e 's/^/ "/'\
>> $(patsubst %.txt,%.cc,$<)
echo "};" >> $(patsubst %.txt,%.cc,$<)
#----------------------------------------------------------------------
# dependencies
%.d: %.cc
$(SHELL) -ec '$(CXX) -M $(CPPFLAGS) $< \
| sed '\''s,\($(notdir $*)\)\.o[ :]*,$(dir $@)\1.o $@ : ,g'\'' \
> $@; \
[ -s $@ ] || rm -f $@'
include $(patsubst %.txt,%.d,$(wildcard *.txt))
include $(patsubst %.cc,%.d,$(wildcard *.cc))
#----------------------------------------------------------------------
# tagrets
tsfilt: %: %.o
......@@ -101,8 +141,10 @@ siggenx: %x: %.o
-ldatrwxx -lsffxx \
-lgsexx -ltime++ -laff -lgsl -lm -lgslcblas
lisousi.cc: lisousi_description_text.h
lisousi.cc: lisousi_help_text.h
lisousi: \
%: %.o
%: %_description_text.o %_help_text.o %.o
$(CXX) -o $@ $^ -I$(LOCINCLUDEDIR) -lfourierxx -lfftw3 -lm \
-lsffxx -ldatrwxx -llinearxx -lgsl -lgslcblas \
-ltsxx -ltfxx -lsffxx -lgsexx -ltime++ -laff \
......
......@@ -84,6 +84,8 @@
#include <aff/subarray.h>
#include <tsxx/ovtaper.h>
#include <fourier/fftwaff.h>
#include "lisousi_help_text.h"
#include "lisousi_description_text.h"
using std::cout;
using std::cerr;
......@@ -230,227 +232,6 @@ int main(int iargc, char* argv[])
" or: lisousi --xhelp" "\n"
};
// define full help text
char help_text[]=
{
LISOUSI_CVSID
"\n"
"outfile name of output file to contain results" "\n"
"infile input file" "\n"
" t:T select traces T, where T may be any range" "\n"
" specification like \'3-4\' or \'5,6,7-12,20\'" "\n"
" f:F specifies an input file format differing from" "\n"
" the format selected by \"-type\"" "\n"
"\n"
"informational output:\n"
"-xhelp print detailed information regarding file formats" "\n"
"-v be verbose" "\n"
"-DEBUG produce debug output" "\n"
"\n"
"data file input and output:\n"
"-o overwrite output" "\n"
"-type type choose input file format (default: sff)" "\n"
"-Type type choose output file format (default: sff)" "\n"
"\n"
"filter alternatives:\n"
"default: Fourier domain application of analytic filter coefficents\n"
"-fdfilter apply numerically derived Fourier coefficients of 1/sqrt(t)\n"
"-tdfilter apply 1/sqrt(t) in the time domain by discrete convolution\n"
"-pad n in the case of Fourier domain processing, the time series\n"
" is padded with zeroes to factor n of the number of samples\n"
" of the input series prior to the Fourier transformation\n"
"\n"
"taper alternatives:\n"
"-taperlast tapers are applied prior to filtering by default;this\n"
" option selects to taper the time series after filtering\n"
" If this option is selected, the order of the processing" "\n"
" steps (which are not commutative) is reversed." "\n"
"-sqrttaper By default we use sqrt(2)*r/sqrt(t) as the taper and\n"
" scaling function. This is appropriate for direct" "\n"
" waves. In the case of reflected waves commonly the\n"
" propagation velocity is assumed to be known (see\n"
" option -velocity). Then the scaling function is\n"
" c*sqrt(2*t), where c is the assumed phase velocity.\n"
" The latter is selected by this option.\n"
"-tapdel t delay taper function by t seconds; this accounts for\n"
" the finite duration of a band limited source signal\n"
"-tapslo s delay taper by not more than s*offset, where s is a\n"
" slowness in s/m; serves as an upper limit for tapdel\n"
" at small offsets\n"
"\n"
"1/sqrt(t) construction:\n"
"the default operation to handle the singularity at t=0 is:\n"
" choose samples of 1/sqrt(t) such that they produce the\n"
" same mean values as the continuous function when being\n"
" integrated over one sampling interval\n"
"-integshift f shift time axis by a fraction f of the sampling interval\n"
" in order to adjust centroid of integration interval\n"
"the following options are for experimental purposes only:\n"
"-nointeg do not derive samples by integration; sample 1/sqrt(t)\n"
" directly and optionally use the following parameters to\n"
" control the bevahiour close to t=0\n"
" deprecated method\n"
"if -nointeg is selected:\n"
"-tshift f to avoid the singularity of 1/sqrt(t) at t=0, sampling time\n"
" is shifted by a fraction f of the sampling interval\n"
"-tlim f to avoid the singularity of 1/sqrt(t) at t=0, the sample\n"
" time for samples at times smaller than f*dt, where dt is\n"
" the sampling interval, is set to a given fraction of the\n"
" sampling interval (see option -tfac)\n"
"-tfac f to avoid the singularity of 1/sqrt(t) at t=0, the sample\n"
" time at small times (see options -tlim) is set to a\n"
" fraction f of the sampling interval\n"
"\n"
"Single velocity transformation:\n"
"-fredomain apply transformation in the frequency domain for a\n"
" single direct wave velocity.\n"
"-exact apply exact transformation for single velocity approach\n"
" (default is: far-field approximation)\n"
"\n"
"-velocity v set assumed wave velocity in km/s\n"
"\n"
"-transition r1,r2 mix both approaches; up to offset r1 the \"single\n"
" velocity transformation\" is used; for offsets larger than\n"
" r2 the \"direct wave transformation\" is used; in between\n"
" both are mixed with continously varying percentage\n"
" from one to the other\n"
"\n"
"-limitlength some convolution schemes return a larger number of samples\n"
" than present in the input series (due to padding for\n"
" example); this option limits to numer of output samples\n"
" to the number of input samples\n"
};
// online users documentation
char description_text[]=
{
"This program takes seismograms from the input file which are\n"
"expected to be vertical or radial components of the surface\n"
"displacement (or particle velocity) excited by a point source\n"
"(vertical single force or explosion) at the surface. The program\n"
"is able to apply transformation procedures to the data which\n"
"simulate equivalent waveforms as being excited by a line source\n"
"perpendicular to the direction of wave propagation. Different\n"
"approaches are offered. All of them operate on single traces\n"
"and just require the offset of the trace as additional parameter\n"
"(in contrast to a Fourier-Bessel transformation, which requires\n"
"a complete common source gather).\n"
"\n"
"All approaches are based on the ratio of the 2D and the 3D Greens\n"
"function in the frequency domain. This ratio can be understood as\n"
"a convolution with 1/sqrt(t) in the time domain and appropriate\n"
"scaling (tapering) of the samples in the time domain. The appropriate\n"
"scaling factor depends of wave travel time and wave travel distance.\n"
"In the case of this program, we assume direct waves, such that the\n"
"offset equals the travel distance. The sample time is taken as\n"
"travel time. This way the waveforms must be tapered by 1/sqrt(t)\n"
"and scaled by the offset times sqrt(2).\n"
"This differs from approaches used in reflection seismic analysis,\n"
"where waveforms are tapered by sqrt(t). The latter is offered as an\n"
"option.\n"
"\n"
"The program offers options to select different ways of constructing\n"
"the 1/sqrt(t) filter and the way this filter is applied. Application\n"
"of the filter (convolution with 1/sqrt(t)) and the application of\n"
"the scaling (tapering with 1/sqrt(t)) are not commutative in a\n"
"mathematical sense and the results may change for a different\n"
"order of the operations.\n"
"\n"
"Available approaches:\n"
"---------------------\n"
"\n"
"Default:\n"
" Convolution with 1/sqrt(t) and tapering with 1/sqrt(t).\n"
" So-called \"direct wave transformation\"\n"
"\n"
" Application of filter:\n"
" 1) Frequency domain application:\n"
" recommended approach\n"
" default; fastest approach\n"
" Convolution with the 1/sqrt(t) filter response is done in the\n"
" Fourier domain by multiplication with the analytically derived\n"
" Fourier coefficients of the filter response function.\n"
"\n"
" 2) Frequency domain application of dicrete Fourier transform:\n"
" select option: -fdfilter\n"
" The 1/sqrt(t) filter response is constructed in the time\n"
" domain. Convolution with the time series is done in the\n"
" frequency domain after FFT.\n"
"\n"
" 3) Time domain application:\n"
" slowest approach\n"
" select option: -tdfilter\n"
" The 1/sqrt(t) filter response is constructed in the time\n"
" domain. Convolution with the time series is done in the\n"
" time domain by discrete convolution.\n"
"\n"
" Options:\n"
" For the frequency domain applications (1 and 2) the following\n"
" options are available:\n"
" -pad n padding of time series\n"
"\n"
" The 1/sqrt(t) filter response becomes singular for t=0. This\n"
" requires special measures for the approaches which construct\n"
" the filter response in the time domain (2 and 3) in order to\n"
" create a response which behaves equivalent to its analytical\n"
" counterpart. The following options are available:\n"
" -integshift t\n"
" -notinteg\n"
" If -nointeg is selected, the following options are available:\n"
" -tshift f\n"
" -tlim f\n"
" -tfac f\n"
"\n"
" Application of the taper:\n"
" By default a 1/sqrt(t) taper is used.\n"
"\n"
" Option -sqrttaper selects sqrt(t) as taper function and scales\n"
" seismograms additionally by a factor sqrt(2)*velocity.\n"
"\n"
" Tapers are applied prior to filtering by default. Option -taperlast\n"
" selects to taper the time series after filtering.\n"
"\n"
" Tapers are always constructed in the time domain. The default\n"
" 1/sqrt(t) taper is singular at t=0. This requires special\n"
" measures to set up the taper appropriately, such that it behaves\n"
" equivalent to its analytical counterpart. The following options\n"
" are available:\n"
" -integshift t\n"
" -notinteg\n"
" If -nointeg is selected, the following options are available:\n"
" -tshift f\n"
" -tlim f\n"
" -tfac f\n"
" They have a lesser (or even unnoticeable) impact when compared\n"
" to their impact whne constructing the filter resonse. This is\n"
" because the time series to be tapered usually are small or\n"
" vanish close to t=0.\n"
"\n"
" Sampling time is taken as travel time in order to determine the\n"
" appropriate scaling (taper) factor. Since a finite bandwidth\n"
" wavelet appears slightly after the ray-theoretical arrival\n"
" in the seismogram, scaling factors are typically too small\n"
" for near offset traces, where pulse duration is close to\n"
" pulse travel time. The program offers the option -tapdel to\n"
" apply a correction for this effect. -tapslo can be used to\n"
" set an upper limit for tapdel at small offsets.\n"
"\n"
"Single velocity transformation:\n"
" select by option: -fredomain\n"
" additional options:\n"
" -velocity v\n"
" -pad n\n"
"\n"
" Operation:\n"
" A Fourier transform of the waveform is divided by the Fourier\n"
" transform of the 3D Greens function and multiplied by the 2D\n"
" Greens function. This approach works only for waves of a single\n"
" given wave velocity. It is hence only appropriate for the\n"
" impulse response in homogeneous full space, but also performs\n"
" surprisingly well when applied to dispersive wavefields.\n"
"\n"
};
// define commandline options
using namespace tfxx::cmdline;
static Declare options[]=
......@@ -553,9 +334,9 @@ int main(int iargc, char* argv[])
if (cmdline.optset(0))
{
cerr << usage_text << endl;
cerr << help_text << endl;
cerr << lisousi_help_text << endl;
cerr << endl;
cerr << description_text << endl;
cerr << lisousi_description_text << endl;
datrw::supported_data_types(cerr);
exit(0);
}
......
# this is <lisousi_description_text.txt>
# ============================================================================
# description of lisousi processing concepts
# ------------------------------------------
# $Id$
# ============================================================================
#
$Id$
This program takes seismograms from the input file which are
expected to be vertical or radial components of the surface
displacement (or particle velocity) excited by a point source
(vertical single force or explosion) at the surface. The program
is able to apply transformation procedures to the data which
simulate equivalent waveforms as being excited by a line source
perpendicular to the direction of wave propagation. Different
approaches are offered. All of them operate on single traces
and just require the offset of the trace as additional parameter
(in contrast to a Fourier-Bessel transformation, which requires
a complete common source gather).
All approaches are based on the ratio of the 2D and the 3D Greens
function in the frequency domain. This ratio can be understood as
a convolution with 1/sqrt(t) in the time domain and appropriate
scaling (tapering) of the samples in the time domain. The appropriate
scaling factor depends of wave travel time and wave travel distance.
In the case of this program, we assume direct waves, such that the
offset equals the travel distance. The sample time is taken as
travel time. This way the waveforms must be tapered by 1/sqrt(t)
and scaled by the offset times sqrt(2).
This differs from approaches used in reflection seismic analysis,
where waveforms are tapered by sqrt(t). The latter is offered as an
option.
The program offers options to select different ways of constructing
the 1/sqrt(t) filter and the way this filter is applied. Application
of the filter (convolution with 1/sqrt(t)) and the application of
the scaling (tapering with 1/sqrt(t)) are not commutative in a
mathematical sense and the results may change for a different
order of the operations.
Available approaches:
---------------------
Default:
Convolution with 1/sqrt(t) and tapering with 1/sqrt(t).
So-called "direct wave transformation"
Application of filter:
1) Frequency domain application:
recommended approach
default; fastest approach
Convolution with the 1/sqrt(t) filter response is done in the
Fourier domain by multiplication with the analytically derived
Fourier coefficients of the filter response function.
2) Frequency domain application of dicrete Fourier transform:
select option: -fdfilter
The 1/sqrt(t) filter response is constructed in the time
domain. Convolution with the time series is done in the
frequency domain after FFT.
3) Time domain application:
slowest approach
select option: -tdfilter
The 1/sqrt(t) filter response is constructed in the time
domain. Convolution with the time series is done in the
time domain by discrete convolution.
Options:
For the frequency domain applications (1 and 2) the following
options are available:
-pad n padding of time series
The 1/sqrt(t) filter response becomes singular for t=0. This
requires special measures for the approaches which construct
the filter response in the time domain (2 and 3) in order to
create a response which behaves equivalent to its analytical
counterpart. The following options are available:
-integshift t
-notinteg
If -nointeg is selected, the following options are available:
-tshift f
-tlim f
-tfac f
Application of the taper:
By default a 1/sqrt(t) taper is used.
Option -sqrttaper selects sqrt(t) as taper function and scales
seismograms additionally by a factor sqrt(2)*velocity.
Tapers are applied prior to filtering by default. Option -taperlast
selects to taper the time series after filtering.
Tapers are always constructed in the time domain. The default
1/sqrt(t) taper is singular at t=0. This requires special
measures to set up the taper appropriately, such that it behaves
equivalent to its analytical counterpart. The following options
are available:
-integshift t
-notinteg
If -nointeg is selected, the following options are available:
-tshift f
-tlim f
-tfac f
They have a lesser (or even unnoticeable) impact when compared
to their impact whne constructing the filter resonse. This is
because the time series to be tapered usually are small or
vanish close to t=0.
Sampling time is taken as travel time in order to determine the
appropriate scaling (taper) factor. Since a finite bandwidth
wavelet appears slightly after the ray-theoretical arrival
in the seismogram, scaling factors are typically too small
for near offset traces, where pulse duration is close to
pulse travel time. The program offers the option -tapdel to
apply a correction for this effect. -tapslo can be used to
set an upper limit for tapdel at small offsets.
Single velocity transformation:
select by option: -fredomain
additional options:
-velocity v
-pad n
Operation:
A Fourier transform of the waveform is divided by the Fourier
transform of the 3D Greens function and multiplied by the 2D
Greens function. This approach works only for waves of a single
given wave velocity. It is hence only appropriate for the
impulse response in homogeneous full space, but also performs
surprisingly well when applied to dispersive wavefields.
# ----- END OF lisousi_description_text.txt -----
# this is <lisousi_help_text.txt>
# ============================================================================
# description of lisousi program options
# --------------------------------------
# $Id$
# ============================================================================
#
$Id$
outfile name of output file to contain results
infile input file
t:T select traces T, where T may be any range
specification like '3-4' or '5,6,7-12,20'
f:F specifies an input file format differing from
the format selected by "-type"
informational output:
-xhelp print detailed information regarding file formats
-v be verbose
-DEBUG produce debug output
data file input and output:
-o overwrite output
-type type choose input file format (default: sff)
-Type type choose output file format (default: sff)
filter alternatives:
default: Fourier domain application of analytic filter coefficents
-fdfilter apply numerically derived Fourier coefficients of 1/sqrt(t)
-tdfilter apply 1/sqrt(t) in the time domain by discrete convolution
-pad n in the case of Fourier domain processing, the time series
is padded with zeroes to factor n of the number of samples
of the input series prior to the Fourier transformation
taper alternatives:
-taperlast tapers are applied prior to filtering by default;this
option selects to taper the time series after filtering
If this option is selected, the order of the processing
steps (which are not commutative) is reversed.
-sqrttaper By default we use sqrt(2)*r/sqrt(t) as the taper and
scaling function. This is appropriate for direct
waves. In the case of reflected waves commonly the
propagation velocity is assumed to be known (see
option -velocity). Then the scaling function is
c*sqrt(2*t), where c is the assumed phase velocity.
The latter is selected by this option.
-tapdel t delay taper function by t seconds; this accounts for
the finite duration of a band limited source signal
-tapslo s delay taper by not more than s*offset, where s is a
slowness in s/m; serves as an upper limit for tapdel
at small offsets
1/sqrt(t) construction:
the default operation to handle the singularity at t=0 is:
choose samples of 1/sqrt(t) such that they produce the
same mean values as the continuous function when being
integrated over one sampling interval
-integshift f shift time axis by a fraction f of the sampling interval
in order to adjust centroid of integration interval
the following options are for experimental purposes only:
-nointeg do not derive samples by integration; sample 1/sqrt(t)
directly and optionally use the following parameters to
control the bevahiour close to t=0
deprecated method
if -nointeg is selected:
-tshift f to avoid the singularity of 1/sqrt(t) at t=0, sampling time
is shifted by a fraction f of the sampling interval
-tlim f to avoid the singularity of 1/sqrt(t) at t=0, the sample
time for samples at times smaller than f*dt, where dt is
the sampling interval, is set to a given fraction of the
sampling interval (see option -tfac)
-tfac f to avoid the singularity of 1/sqrt(t) at t=0, the sample
time at small times (see options -tlim) is set to a
fraction f of the sampling interval
Single velocity transformation:
-fredomain apply transformation in the frequency domain for a
single direct wave velocity.
-exact apply exact transformation for single velocity approach
(default is: far-field approximation)
-velocity v set assumed wave velocity in km/s
-transition r1,r2 mix both approaches; up to offset r1 the "single
velocity transformation" is used; for offsets larger than
r2 the "direct wave transformation" is used; in between
both are mixed with continously varying percentage
from one to the other
-limitlength some convolution schemes return a larger number of samples
than present in the input series (due to padding for
example); this option limits to numer of output samples
to the number of input samples
# ----- END OF lisousi_help_text.txt -----
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