Commit 4bb7012a authored by thomas.forbriger's avatar thomas.forbriger
Browse files

croposp: move croposp to its own directory

parent 92540dc4
this is <COPYING>
============================================================================
ts/wf: time series waveform filters
============================================================================
Copyright (C) 1996, 2011 by Thomas Forbriger
----
These programs are free software; you can redistribute them and/or modify
them 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.
These programs are distributed in the hope that they 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 <Makefile>
# ----------------------------------------------------------------------------
#
# Copyright (c) 2005 by Thomas Forbriger (BFO Schiltach)
#
# time series waveform filters
#
# ----
# 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
# ----
#
#
# Makefile fuer tools /src/ts/wf
#
# 22/01/2001 introduced smoos and did some "tidy up"
# 24/10/2001 introduced siggen
# 24/05/2001 introduced tsfilt
#
# REVISIONS and CHANGES
# 11/07/2005 V1.0 Thomas Forbriger (thof)
# 07/12/2007 V1.1 default Fortran compiler now is g77
# 17/12/2007 V1.2 moved to gfortran
# 08/10/2010 V1.3 migrate to new SVN environment
# - discard f2c fallback
# - use FFTW3
# 10/02/2011 V1.4 distinguish between compilation and installation
# 24/06/2011 V1.5 moved tests to distinguished Makefiles
# 25/05/2012 V1.6 link siggen against libfapidxx (damb)
# 03/06/2012 V1.7 to be consistent with other programs: distinguish
# siggen and siggenx (being linked against libsff and
# libfapidxx, respectively)
# 11/01/2013 V1.8 added sigscale to program targets
# 17/04/2013 V1.9 lisousi has its own place now (moved source code)
# 28/10/2013 V1.10 implemented libfapidxx-version of suseix
# 02/01/2014 V1.11 removed signal generators, added tisli suspect
# 01/02/2014 thof: rewrite all linker rules with libraries in
# proper order
# 19/03/2016 thof: tidofi requires libgsl for filter GaussianNoise
# 25/12/2018 thof: add new program croposp
#
# ============================================================================
PROGRAMS=tsfilt stufi rotate coro xyz2uvw susei suseix evelo \
smoos dise foutra teseco resaseda gatherdiff \
autocorr cross tidofi sigfit noisymize sigval fidasexx soutifu \
deconv geophone sigscale tisli suspect evelox croposp
.PHONY: all
all: install doc
.PHONY: list-programs
list-programs:
echo $(PROGRAMS) | tr ' ' '\n' | sort
.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 TF_LINK_PGPLOT)
FORTRANLIB=$(TF_LINK_FORTRAN)
# use STATIC=-static to produce statically linked binaries
STATIC=
FLAGS += $(MYFLAGS)
CPPFLAGS=$(addprefix -I,$(LOCINCLUDEDIR) $(subst :, ,$(SERVERINCLUDEDIR))) \
$(FLAGS)
FFLAGS += -ff2c -Wall -ffixed-line-length-0 -fno-backslash $(FLAGS)
CXXFLAGS+=-Wall $(FLAGS)
LDFLAGS=$(addprefix -L,$(LOCLIBDIR) $(subst :, ,$(SERVERLIBDIR))) $(STATIC)
#----------------------------------------------------------------------
# standard edit targets
.PHONY: clean
clean: ;
-find . -name \*.bak | xargs --no-run-if-empty /bin/rm -v
-find . -name \*.d | xargs --no-run-if-empty /bin/rm -v
-/bin/rm -vf flist *.o *.xxx *.ps *~ $(PROGRAMS)
TESTCASEMAKE=$(filter-out %.bak,$(wildcard testcases/Makefile*))
# the frame of doxygen documentation is placed in text files
DOXYTXT=$(wildcard doxygen*.txt */doxygen*txt)
EDITFILES=Makefile README $(wildcard *.cfg) COPYING $(DOXYTXT) \
$(filter-out %.bak,$(wildcard */README*))
EDITSRC=$(wildcard *.cc *.h *.c *.f *.gpt *.inc)
EDITTESTS=$(wildcard testcases/*.par) $(wildcard testcases/*.tpl) \
$(TESTCASEMAKE) $(wildcard testcases/*.gpt)
flist: $(wildcard *.txt *.c *.f *.h *.inc *_text.txt Makefile *.cc *.gpt) \
doxydoc.cfg README COPYING $(DOXYTXT) $(EDITFILES) \
$(wildcard testcases/*.par) $(wildcard testcases/*.tpl) \
$(TESTCASEMAKE) $(wildcard testcases/*.gpt) $(TF_EDIT)
echo $(filter $(EDITFILES),$^) | tr ' ' '\n' | sort > $@
echo "---- source code ----" >> $@
echo $(filter $(EDITSRC),$^) | tr ' ' '\n' | sort >> $@
echo "---- Fortran source files only ----" >> $@
echo $(sort $(filter %.f,$^)) | tr ' ' '\n' >> $@
echo "---- C++ source files only ----" >> $@
echo $(sort $(filter %.cc,$^)) | tr ' ' '\n' >> $@
echo "---- test cases ----" >> $@
echo $(sort $(filter $(EDITTESTS),$^)) | tr ' ' '\n' >> $@
echo "----" >> $@
echo $(filter-out $(EDITFILES) $(EDITSRC) $(EDITTESTS),$^) \
| tr ' ' '\n' | sort >> $@
.PHONY: edit
edit: flist; vim $<
#----------------------------------------------------------------------
# pattern rules
%.o: %.f; $(FC) -c -o $@ $< $(FFLAGS)
#----------------------------------------------------------------------
# description and online texts
%.cc %.h: %_help.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 *_help.txt))
include $(patsubst %.cc,%.d,$(wildcard *.cc))
#----------------------------------------------------------------------
# typical combinations of libraries
LIBDATRWXX=-ldatrwxx -lsffxx -ltime++ -lgsexx -laff
LIBFAPIDXX=-lfapidxx $(LIBDATRWXX)
LIBTSIOXX=-ltsioxx -ltsxx -ltfxx $(LIBDATRWXX) -lgsl -lgslcblas
#----------------------------------------------------------------------
# binary executable targets
# -------------------------
#
# Fortran programs
# ----------------
#
xyz2uvw tisli susei smoos rotate evelo coro: %: %.o
$(LINK.f) $^ $(LOADLIBES) $(LDLIBS) -o $@ \
-lsff -ltf
tsfilt stufi: %: %.o
$(LINK.f) $^ $(LOADLIBES) $(LDLIBS) -o $@ \
-lseife -lsff -ltf
suspect dise: %: %.o
$(LINK.f) $^ $(LOADLIBES) $(LDLIBS) -o $@ \
-lsffu -ltime -lsff -ltf
# Fortran programs with libfapidxx support
# ----------------------------------------
evelox suseix: %x: %.o
$(LINK.f) $^ $(LOADLIBES) $(LDLIBS) -o $@ \
-ltf $(LIBFAPIDXX)
#
# C++ programs
# ------------
sigval sigscale geophone gatherdiff autocorr: \
%: %.o
$(LINK.cpp) $^ $(LOADLIBES) $(LDLIBS) -o $@ \
$(LIBDATRWXX) -ltfxx
tidofi: \
%: %.o
$(LINK.cpp) $^ $(LOADLIBES) $(LDLIBS) -o $@ \
-ltsxx -lcseife $(LIBDATRWXX) -ltfxx -lgsl -lgslcblas
fidasexx: \
%: %.o
$(LINK.cpp) $^ $(LOADLIBES) $(LDLIBS) -o $@ \
-llinearxx -lpgplotxx -lcpgplot \
$(LIBDATRWXX) -ltfxx \
$(TF_LINK_PGPLOT) $(TF_LINK_FORTRAN) \
-llapack
sigfit: \
%: %.o
$(LINK.cpp) $^ $(LOADLIBES) $(LDLIBS) -o $@ \
-llinearxx \
$(LIBDATRWXX) -ltfxx \
-llapack
resaseda: \
%: %.o
$(LINK.cpp) $^ $(LOADLIBES) $(LDLIBS) -o $@ \
-ltsxx $(LIBDATRWXX) -ltfxx
teseco: \
%: %.o
$(LINK.cpp) $^ $(LOADLIBES) $(LDLIBS) -o $@ \
$(LIBTSIOXX)
noisymize: \
%: %.o
$(LINK.cpp) $^ $(LOADLIBES) $(LDLIBS) -o $@ \
$(LIBTSIOXX)
cross fregra foutra deconv: \
%: %.o
$(LINK.cpp) $^ $(LOADLIBES) $(LDLIBS) -o $@ \
-lfourierxx $(LIBTSIOXX) -lfftw3
croposp: \
%: %.o
$(LINK.cpp) $^ $(LOADLIBES) $(LDLIBS) -o $@ \
-lpsdxx -lfourierxx $(LIBTSIOXX) -lfftw3
soutifu: \
%: %.o
$(LINK.cpp) $^ $(LOADLIBES) $(LDLIBS) -o $@ \
-lstfinv -lfourierxx $(LIBTSIOXX) -lfftw3
#======================================================================
# 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)/tswf
.PHONY: doxyclean doxyview doxydoc doxyconf
doxyclean: ;/bin/rm -rfv $(DOXYWWWPATH)
DOXYSRC=$(DOXYTXT) $(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:$< &
# ----- END OF Makefile -----
this is <README>
============================================================================
ts/wf: time series waveform filters
============================================================================
This is a collection of various filter programs which can be used to
manipulate time series data. The area of application ranges from long period
seismology to shallow seismics.
Some of the programs support only SFF data files. See usage information (by
calling the program with option '-help') for details. Some Fortran programs
support linking against libfapidxx. They commonly are provided in form of two
binary executables (e.g. susei: SFF support only; suseix: supports all
libdatrwxx formats). See variable PROGRAMS in Makefile.
Currently maintained programs:
Waveform filters
----------------
Programs provide frequency filters (high-pass, low-pass, etc), average and
trend removal, time domain tapers, etc.
stufi filter SFF data files (uses seife filters by E. Wielandt)
tidofi filter data files in various formats
tsfilt filter two-column ASCII files (uses seife filters by E. Wielandt)
Vector signal component rotation
--------------------------------
coro select a spatial vector component from three component data
rotate rotate horizontal components
xyz2uvw rotate to internal STS-2 components and vice versa
Multi-signal
------------
dise calculate waveform residuals of selected traces from two input files
gatherdiff calculate waveform residuals of full shot gathers
sigfit find linear regression coefficients for a set of trial signals
susei stack seismograms from two or more files
suspect stack seismograms after shifting to source origin time
teseco apply signal corrections (like barometric pressure correction)
Transformation
--------------
evelo calculate Hilbert transform, signal envelope, etc.
foutra apply Fourier transformation (optionally calculates PSD)
fregra spectrogram for unevenly sampled frequencies (not finished)
Correlation and Convolution
---------------------------
autocorr calculate autocorrelation of signals
cross cross-correlate signals
deconv deconvolve one signal with another
noisymize convolve signals with random noise
Resampling
----------
resaseda apply signal interpolation in the time domain
smoos apply signal interpolation by spectral extension
Miscellaneous
-------------
fidasexx scale shot gathers to compile homogeneous data set
geophone derive geophone response and create filter control file
sigscale scale SG056 auxilliary data to physical units
sigval extract waveform properties like rms and write to table
soutifu find optimal source wavelet correction filter
tisli extract time slices from multi-receiver data
Test signals
------------
Test signal generators formerly present in this directory have been moved to
src/synt/misc. They may as well still be necessary for the filter test
procedures defined in subdirectory testcases
============================================================================
Test cases
----------
In subdirectory 'testcases' test cases for several filter programs are
provided. These are not yet documented in detail. Please check Makefile in
testcases, which serves as an entry point to the other Makefiles. Several of
the test cases can be controlled by make variables to be passed on the command
line. Test cases may require other external programs in order to create test
waveforms. These programs can include programs for synthesis of full
seismograms. At least the program suite from src/synt/misc is required in most
cases.
============================================================================
Installation
------------
This software is part of the project Seitosh. See README.1st in the root
directory of the collection or https://git.scc.kit.edu/Seitosh/Seitosh for
general installation instructions.
The Makefile supports program compilation and linking. Some binary libraries
are required.
The command
make all
will compile and install the binary executables as well as the doxygen
documentation.
Environment variables control where the results are stored and where
libraries and library header files are expected:
LOCLIBDIR defines location of binary libraries
LOCINCLUDEDIR defines location of C/C++ header files (prototypes)
LOCBINDIR defines location of binary executables
TF_WWWBASEDIR defines location of doxygen output
Dependencies:
Compilers required to build the programs:
Fortran compiler
C++ compiler
C/C++ preprocessor
doxygen (required to process source code documentation)
extern libraries/packages needed to compile the code
PGPLOT (libpgplot, libcpgplot)
liblapack: linear algebra package
libblas: basic linear algebra functions
libgsl: GNU scientific library (libgsl, libgslcblas)
The header files for these libraries are required as well. Under OpenSuSE
you have to install the respective devel packages.
Seitosh libraries required to compile the code:
libaff
libdatrwxx
libfapidxx
libfourier (libfourier, libfourierxx)
libgsexx
liblinearxx
libpgplotxx
libseife (libcseife, libseife)
libsff
libsffu
libsffxx
libstfinv
libtf
libtfxx
libtime (libtime, libtime++)
libtsxx
============================================================================
The home of this software suite is
https://git.scc.kit.edu/Seitosh/Seitosh/tree/master/src/ts/wf
Please send bug reports and suggestions to
Thomas.Forbriger@kit.edu
----- END OF README -----
# Doxyfile 1.6.3
#---------------------------------------------------------------------------
# Project related configuration options
#---------------------------------------------------------------------------
DOXYFILE_ENCODING = UTF-8
PROJECT_NAME = "Waveform filter programs"
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 *.f \
*.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