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

adjusted names for local directory

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: 5133
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent 2b4c80b6
this is <COPYING>
============================================================================
libtfxx C++ software library
----------------------------
$Id: COPYING 4960 2013-02-01 09:02:16Z tforb $
============================================================================
The source code in this directory is part of libtfxx which
compiles libtfxx.a
Copyright (C) 2002, 2013 by Thomas Forbriger
----
libtfxx is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
----
----- END OF COPYING -----
This is a legacy version of the repository. It may be incomplete as well as
inconsistent. See README.history for details. For the old stock of the
repository copyright and licence conditions apply as specified for versions
commited after 2015-03-01. Use recent versions as a base for new development.
The legacy version is only stored to keep a record of history.
# this is <Makefile>
# ----------------------------------------------------------------------------
# $Id$
#
# Copyright (c) 2013 by Thomas Forbriger (BFO Schiltach)
#
# lisousi: Line Source Simulation
#
# REVISIONS and CHANGES
# 17/04/2013 V1.0 Thomas Forbriger
#
# ============================================================================
#
PROGRAMS=lisousi
.PHONY: all
all: install doc
.PHONY: doc
doc: doxydoc
.PHONY: install
install: $(addprefix $(LOCBINDIR)/,$(PROGRAMS))
$(LOCBINDIR)/%: %
mkdir -pv $(LOCBINDIR)
/bin/mv -fv $< $(LOCBINDIR)
CHECKVAR=$(if $($(1)),,$(error ERROR: missing variable $(1)))
CHECKVARS=$(foreach var,$(1),$(call CHECKVAR,$(var)))
$(call CHECKVARS,LOCINCLUDEDIR LOCLIBDIR LOCBINDIR)
$(call CHECKVARS,TF_LINK_FORTRAN)
FORTRANLIB=$(TF_LINK_FORTRAN)
FLAGS += $(MYFLAGS)
CFLAGS += -O2 -I${SERVERINCLUDEDIR} -I${LOCINCLUDEDIR} $(FLAGS)
FFLAGS += -ff2c -Wall -ffixed-line-length-0 -fno-backslash $(FLAGS)
# use STATIC=-static to produce statically linked binaries
STATIC=
CXXFLAGS+=-Wall $(FLAGS)
LDFLAGS+=$(addprefix -L,$(LOCLIBDIR) $(subst :, ,$(SERVERLIBDIR)))
CPPFLAGS+=-I$(LOCINCLUDEDIR) $(FLAGS)
#----------------------------------------------------------------------
# standard edit targets
.PHONY: clean
clean: ;
-find . -name \*.bak | xargs --no-run-if-empty /bin/rm -v
-/bin/rm -vf flist *.o *.xxx.* *.ps *~ $(PROGRAMS)
EDITFILES=Makefile README $(wildcard *.cfg) COPYING doxygen.txt
DESCRIPTIONTXT=$(filter-out $(EDITFILES),$(wildcard *.txt))
EDITSRC=$(filter-out $(EDITFILES),$(wildcard *.cc *.h *.c *.f *.txt *.gpt *.inc))
flist: $(wildcard *.txt *.c *.f *.h *.inc Makefile *.cc *.gpt) \
doxydoc.cfg README \
$(wildcard testcases/*.par) $(wildcard testcases/*.tpl) \
$(TESTCASEMAKE) $(wildcard testcases/*.gpt) $(TF_EDIT)
echo $(filter $(EDITFILES),$^) | tr ' ' '\n' | sort > $@
echo "----" >> $@
echo $(filter $(EDITSRC),$^) | tr ' ' '\n' | sort >> $@
echo "----" >> $@
echo $(filter $(DESCRIPTIONTXT),$^) | tr ' ' '\n' | sort >> $@
echo "----" >> $@
echo $(filter-out $(EDITFILES) $(DESCRIPTIONTXT) $(EDITSRC),$^) \
| tr ' ' '\n' | sort >> $@
.PHONY: edit
edit: flist; vim $<
#----------------------------------------------------------------------
# pattern rules
%.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,$(DESCRIPTIONTXT))
include $(patsubst %.cc,%.d,$(wildcard *.cc))
#----------------------------------------------------------------------
lisousi.cc: description_text.h
lisousi.cc: help_text.h
lisousi: \
%: description_text.o help_text.o %.o \
filterresponse.o \
applytaper.o
$(CXX) -o $@ $^ -I$(LOCINCLUDEDIR) -lfourierxx -lfftw3 -lm \
-lsffxx -ldatrwxx -llinearxx -lgsl -lgslcblas \
-ltsxx -ltfxx -lsffxx -lgsexx -ltime++ -laff \
-lsffxx $(FOTRANLIB) -lm\
-L$(LOCLIBDIR) $(CXXFLAGS) $(FLAGS) $(LDFLAGS)
#======================================================================
# documentation part
# ------------------
#
# targets commonly used:
# ----------------------
#
# make doxyclean removes all documentation
# make doxydoc creates doxygen documentation in the DOXYWWWPATH
# make doxyview creates doxygen documentation and launches netscape to
# browse in the documentation
# make doxyconf edit the doxygen configuration file
#
# If you launch "make doxydoc" the documentation will be written to
# DOXYWWWPATH (see below). This is meant to export the documentation through
# your homepage. The doxyfull directory is just a symbolic link to this
# directory.
#
$(call CHECKVARS,TF_WWWBASEDIR TF_BROWSER)
DOXYWWWPATH=$(TF_WWWBASEDIR)/lisousi
.PHONY: doxyclean doxyview doxydoc doxyconf
doxyclean: ;/bin/rm -rfv $(DOXYWWWPATH)
DOXYSRC=README $(wildcard *.h *.cc *.f)
# create doxygen intermediate configuration
PWD=$(shell env pwd)
doxydoc.xxx: doxydoc.cfg
sed 's,<OUTPUTDIRECTORY>,$(DOXYWWWPATH),g;s,<STRIPFROMPATH>,$(PWD),g' \
$< > $@
# create commented version of doxygen configuration
doxycomm.xxx: doxydoc.cfg
/bin/cp -vf $< $@; doxygen -u $@
$(DOXYWWWPATH)/html/index.html: doxydoc.xxx $(DOXYSRC)
mkdir -vp $(DOXYWWWPATH)
doxygen $<
doxydoc: $(DOXYWWWPATH)/html/index.html
doxyview: $(DOXYWWWPATH)/html/index.html
$(TF_BROWSER) file:$< &
#======================================================================
# create package
# --------------
# is delegated to Makefile.packages
# pass PACKAGESRCONLY=yes for a source code package
ifdef TF_MAKEPKG
.PHONY: package
package: $(TF_MAKEPKG)
$(MAKE) -f $< \
PACKAGE=lisousi \
PACKAGEEXPORT="trunk/src/ts/wf:src" \
PACKAGETARGETS="src:all" \
PACKAGELIBS="-"
.PHONY: fullpackage
#fullpackage: $(TF_MAKEPKG)
# $(MAKE) -f $< \
# PACKAGE=tswfwithlibs \
# PACKAGEEXPORT="trunk/src/ts/wf:src" \
# PACKAGETARGETS="src:all" \
# PACKAGELIBS="libtime:libaff:libgsexx:libsffxx:libdatrwxx:libtsxx:libtfxx"
endif
# ----- END OF Makefile -----
this is <README>
============================================================================
C++ library libtfxx
-------------------
$Id$
============================================================================
A collection of miscellaneous code frequently used by C++ programs in
TFSoftware. See the Makefile for installation instructions.
The home of this software suite is
http://gpitrsvn.gpi.uni-karlsruhe.de:8000/TFSoftware/wiki/trunk/src/libs/libtfxx
Please send bug reports and suggestions to
Thomas.Forbriger@kit.edu
----- END OF README -----
/*! \file lisousi_applytaper.cc
* \brief apply a taper to the time series (implementation)
*
* ----------------------------------------------------------------------------
*
* $Id$
* \author Thomas Forbriger
* \date 17/04/2013
*
* apply a taper to the time series (implementation)
*
* Copyright (c) 2013 by Thomas Forbriger (BFO Schiltach)
*
* ----
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* ----
*
*
* REVISIONS and CHANGES
* - 17/04/2013 V1.0 Thomas Forbriger
*
* ============================================================================
*/
#define TF_LISOUSI_APPLYTAPER_CC_VERSION \
"TF_LISOUSI_APPLYTAPER_CC V1.0 "
#define TF_LISOUSI_APPLYTAPER_CC_CVSID \
"$Id$"
#include "lisousi.h"
Tseries applytaper(const Tseries::Tcoc& input, const Tseries::Tcoc& taper,
const double& factor, const double& dt,
const double& offset, const Options& opt)
{
if (opt.verbose)
{
cout << " apply taper function"
<< " with delay: " << dt*int(opt.tapdel/dt) << "s"
<< endl;
}
// calculate taper delay
double taperdelay=opt.tapdel;
if (opt.tapsloset)
{
taperdelay=taperdelay<opt.tapslo*offset ? taperdelay : opt.tapslo*offset;
}
// prepare return value
Tseries retval(0,input.size()-1);
retval=0.;
// prepare iterators
aff::Browser<Tseries::Tcoc> IT(taper);
aff::Browser<Tseries::Tcoc> II(input);
aff::Iterator<Tseries> IS(retval);
unsigned int i=0;
// apply taper
while (IT.valid() && IS.valid() && II.valid())
{
double t=i*dt;
(*IS) = (*II) * (*IT) * factor;
++IS;
++II;
if (t >= taperdelay) { ++IT; }
++i;
}
return(retval);
}
/* ----- END OF lisousi_applytaper.cc ----- */
# 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 -----
# Doxyfile 1.6.3
#---------------------------------------------------------------------------
# Project related configuration options
#---------------------------------------------------------------------------
DOXYFILE_ENCODING = UTF-8
PROJECT_NAME = "LISOUSI: Line Source Simulation"
PROJECT_NUMBER =
OUTPUT_DIRECTORY = <OUTPUTDIRECTORY>
CREATE_SUBDIRS = NO
OUTPUT_LANGUAGE = English
BRIEF_MEMBER_DESC = YES
REPEAT_BRIEF = YES
ABBREVIATE_BRIEF =
ALWAYS_DETAILED_SEC = YES
INLINE_INHERITED_MEMB = YES
FULL_PATH_NAMES = YES
STRIP_FROM_PATH = <STRIPFROMPATH>
STRIP_FROM_INC_PATH =
SHORT_NAMES = NO
JAVADOC_AUTOBRIEF = YES
QT_AUTOBRIEF = NO
MULTILINE_CPP_IS_BRIEF = YES
INHERIT_DOCS = YES
SEPARATE_MEMBER_PAGES = YES
TAB_SIZE = 8
ALIASES =
OPTIMIZE_OUTPUT_FOR_C = NO
OPTIMIZE_OUTPUT_JAVA = NO
OPTIMIZE_FOR_FORTRAN = NO
OPTIMIZE_OUTPUT_VHDL = NO
EXTENSION_MAPPING =
BUILTIN_STL_SUPPORT = YES
CPP_CLI_SUPPORT = NO
SIP_SUPPORT = NO
IDL_PROPERTY_SUPPORT = YES
DISTRIBUTE_GROUP_DOC = NO
SUBGROUPING = YES
TYPEDEF_HIDES_STRUCT = NO
SYMBOL_CACHE_SIZE = 0
#---------------------------------------------------------------------------
# Build related configuration options
#---------------------------------------------------------------------------
EXTRACT_ALL = YES
EXTRACT_PRIVATE = YES
EXTRACT_STATIC = YES
EXTRACT_LOCAL_CLASSES = YES
EXTRACT_LOCAL_METHODS = YES
EXTRACT_ANON_NSPACES = YES
HIDE_UNDOC_MEMBERS = NO
HIDE_UNDOC_CLASSES = NO
HIDE_FRIEND_COMPOUNDS = NO
HIDE_IN_BODY_DOCS = NO
INTERNAL_DOCS = YES
CASE_SENSE_NAMES = YES
HIDE_SCOPE_NAMES = NO
SHOW_INCLUDE_FILES = YES
FORCE_LOCAL_INCLUDES = NO
INLINE_INFO = YES
SORT_MEMBER_DOCS = YES
SORT_BRIEF_DOCS = NO
SORT_MEMBERS_CTORS_1ST = NO
SORT_GROUP_NAMES = NO
SORT_BY_SCOPE_NAME = NO
GENERATE_TODOLIST = YES
GENERATE_TESTLIST = YES
GENERATE_BUGLIST = YES
GENERATE_DEPRECATEDLIST= YES
ENABLED_SECTIONS =
MAX_INITIALIZER_LINES = 30
SHOW_USED_FILES = YES
SHOW_DIRECTORIES = NO
SHOW_FILES = YES
SHOW_NAMESPACES = YES
FILE_VERSION_FILTER =
LAYOUT_FILE =
#---------------------------------------------------------------------------
# configuration options related to warning and progress messages
#---------------------------------------------------------------------------
QUIET = NO
WARNINGS = YES
WARN_IF_UNDOCUMENTED = YES
WARN_IF_DOC_ERROR = YES
WARN_NO_PARAMDOC = NO
WARN_FORMAT = "$file:$line: $text"
WARN_LOGFILE =
#---------------------------------------------------------------------------
# configuration options related to the input files
#---------------------------------------------------------------------------
INPUT =
INPUT_ENCODING = UTF-8
FILE_PATTERNS = *.cc \
*.h \
doxygen.txt
RECURSIVE = NO
EXCLUDE =
EXCLUDE_SYMLINKS = NO
EXCLUDE_PATTERNS = *.bak
EXCLUDE_SYMBOLS =
EXAMPLE_PATH = .
EXAMPLE_PATTERNS =
EXAMPLE_RECURSIVE = NO
IMAGE_PATH =
INPUT_FILTER =
FILTER_PATTERNS =
FILTER_SOURCE_FILES = NO
#---------------------------------------------------------------------------
# configuration options related to source browsing
#---------------------------------------------------------------------------
SOURCE_BROWSER = YES
INLINE_SOURCES = YES
STRIP_CODE_COMMENTS = YES
REFERENCED_BY_RELATION = YES
REFERENCES_RELATION = YES
REFERENCES_LINK_SOURCE = YES
USE_HTAGS = NO
VERBATIM_HEADERS = YES
#---------------------------------------------------------------------------
# configuration options related to the alphabetical class index
#---------------------------------------------------------------------------
ALPHABETICAL_INDEX = YES
COLS_IN_ALPHA_INDEX = 5
IGNORE_PREFIX =
#---------------------------------------------------------------------------
# configuration options related to the HTML output
#---------------------------------------------------------------------------
GENERATE_HTML = YES
HTML_FOOTER_DESCRIPTION= NO
HTML_OUTPUT = html
HTML_FILE_EXTENSION = .html
HTML_HEADER =
HTML_FOOTER =
HTML_STYLESHEET =
HTML_TIMESTAMP = YES
HTML_ALIGN_MEMBERS = YES
HTML_DYNAMIC_SECTIONS = NO
GENERATE_DOCSET = NO
DOCSET_FEEDNAME = "Doxygen generated docs"
DOCSET_BUNDLE_ID = org.doxygen.Project
GENERATE_HTMLHELP = NO
CHM_FILE =
HHC_LOCATION =
GENERATE_CHI = NO
CHM_INDEX_ENCODING =
BINARY_TOC = NO
TOC_EXPAND = NO
GENERATE_QHP = NO
QCH_FILE =
QHP_NAMESPACE = org.doxygen.Project
QHP_VIRTUAL_FOLDER = doc
QHP_CUST_FILTER_NAME =
QHP_CUST_FILTER_ATTRS =
QHP_SECT_FILTER_ATTRS =
QHG_LOCATION =
GENERATE_ECLIPSEHELP = NO
ECLIPSE_DOC_ID = org.doxygen.Project
DISABLE_INDEX = NO
ENUM_VALUES_PER_LINE = 4
GENERATE_TREEVIEW = ALL
USE_INLINE_TREES = NO
TREEVIEW_WIDTH = 250
FORMULA_FONTSIZE = 10
SEARCHENGINE = NO
SERVER_BASED_SEARCH = NO
#---------------------------------------------------------------------------
# configuration options related to the LaTeX output
#---------------------------------------------------------------------------
GENERATE_LATEX = NO
LATEX_OUTPUT = latex
LATEX_CMD_NAME = latex
MAKEINDEX_CMD_NAME = makeindex
COMPACT_LATEX = NO
PAPER_TYPE = a4wide
EXTRA_PACKAGES =
LATEX_HEADER =