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

proceeding

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: 1892
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent 2d4af60b
......@@ -3,7 +3,7 @@
*
* ----------------------------------------------------------------------------
*
* $Id: sffxx.h,v 1.23 2005-03-15 18:15:28 tforb Exp $
* $Id: sffxx.h,v 1.24 2005-07-21 07:40:17 tforb Exp $
* \author Thomas Forbriger
* \date 21/12/2003
*
......@@ -30,7 +30,7 @@
#define TF_SFFXX_H_VERSION \
"TF_SFFXX_H V1.3"
#define TF_SFFXX_H_CVSID \
"$Id: sffxx.h,v 1.23 2005-03-15 18:15:28 tforb Exp $"
"$Id: sffxx.h,v 1.24 2005-07-21 07:40:17 tforb Exp $"
#include<string>
#include<cmath>
......@@ -435,27 +435,50 @@ namespace sff {
/*----------------------------------------------------------------------*/
// compare WID2 headers
// --------------------
/*! \brief bit values to select WID2 fields to be compared
* \sa sff::WID2compare
*/
enum Ewid2field {
//! compare dates of first sample
Fdate =1<<0,
//! compare station IDs
Fstation =1<<1,
//! compare channel IDs
Fchannel =1<<2,
//! compare auxilliary IDs
Fauxid =1<<3,
//! compare numbers of samples
Fnsamples=1<<4,
//! compare sampling intervals
Fdt =1<<5,
//! compare calib fields
Fcalib =1<<6,
//! compare calper fields
Fcalper =1<<7,
//! compare instrument type strings
Finstype =1<<8,
//! compare hang fields
Fhang =1<<9,
//! compare vang fields
Fvang =1<<10
}; // enum Ewid2field
/*! \brief compares selected fields from two WID2 objects
* \sa sff::Ewid2field
*/
class WID2compare {
public:
/*! \brief create compare object for comparison of selected fields
*
* \sa sff::Ewid2field
*/
WID2compare(const int& flags=(Fstation | Fchannel | Fdt)):
Mflags(flags), Mdttolerance(0.), Mdatetolerance(0.) { }
void set(const int& flags) { Mflags=Mflags | flags; }
void clear(const int& flags) { Mflags=Mflags & (0xffffffff ^ flags); }
//! tolerance when comparing dt (as a fraction of the sampling interval)
void setdttolerance(const double& tol) { Mdttolerance=tol; }
//! tolerance when comparing date (as a fraction of the sampling interval)
void setdatetolerance(const double& tol) { Mdatetolerance=tol; }
bool operator()(const WID2& hd1, const WID2& hd2) const;
int flags() const { return(Mflags); }
......
# this is <Makefile>
# ----------------------------------------------------------------------------
# $Id: Makefile,v 1.34 2005-07-19 08:06:43 tforb Exp $
# $Id: Makefile,v 1.35 2005-07-21 07:40:18 tforb Exp $
#
# Copyright (c) 2005 by Thomas Forbriger (BFO Schiltach)
#
......@@ -128,9 +128,12 @@ lp1.t.xxx.fil lp1.s.xxx.fil: ; echo -e "DBG 0\nlp1 0.2\nend" > $@
hp1.t.xxx.fil hp1.s.xxx.fil: ; echo -e "DBG 0\nhp1 0.2\nend" > $@
fac.t.xxx.fil fac.s.xxx.fil: ; echo -e "DBG 0\nfac -10.\nend" > $@
add.t.xxx.fil add.s.xxx.fil: ; echo -e "DBG 0\nadd -1.e2\nend" > $@
add1.t.xxx.fil add1.s.xxx.fil: ; echo -e "DBG 0\nadd -1.e-1\nend" > $@
add2.t.xxx.fil add2.s.xxx.fil: ; echo -e "DBG 0\nadd +1.e-1\nend" > $@
rev.t.xxx.fil rev.s.xxx.fil: ; echo -e "DBG 0\nrev 200\nend" > $@
dif.t.xxx.fil dif.s.xxx.fil: ; echo -e "DBG 0\ndif 0.01\nend" > $@
int.t.xxx.fil int.s.xxx.fil: ; echo -e "DBG 0\nint .1\nend" > $@
# 0.2/(2*pi)=0.031830989
dif.t.xxx.fil dif.s.xxx.fil: ; echo -e "DBG 0\ndif 0.031830989\nend" > $@
int.t.xxx.fil int.s.xxx.fil: ; echo -e "DBG 0\nint 0.031830989\nend" > $@
avg.t.xxx.fil avg.s.xxx.fil: ; echo -e "DBG 0\navg 30\nend" > $@
tre.t.xxx.fil tre.s.xxx.fil: ; echo -e "DBG 0\ntre 100\nend" > $@
han.t.xxx.fil: ; echo -e "DBG 0\nhan 0\nend" > $@
......@@ -160,7 +163,7 @@ fbl.s.xxx.fil: ; echo -e "DBG 0\nfbl 200,20,600\nend" > $@
) > $@
FILTERS=lp2 hp2 lp1 hp1 fac add rev dif int avg tre hpb lpb han bp2 he2 le2 \
he1 le1 tid first fbl
he1 le1 tid first fbl add1 add2
ifdef filters
include $(addsuffix .xxx.rules,$(FILTERS))
......@@ -181,6 +184,22 @@ control.%.ps: control.%.xxx.out
report.%.ps: cmp.%.rw.ps control.%.ps
a2ps -A virtual -o $@ -1 $^
#----------------------------------------------------------------------
# test equivalence of lp2, hp2 and bp2
sig1.xxx.sff:
siggen 5 $@ -v -o -f1 0.01 -f2 10. -n 50 -T 10. -d 0.001
eq2.ps: sig1.bp2.t.xxx.sff sig1.lp2.t.dif.t.xxx.sff sig1.hp2.t.int.t.xxx.sff \
sig1.lp2.t.dif.t.add1.t.xxx.sff sig1.hp2.t.int.t.add2.t.xxx.sff
stuplo -d $@/cps -C -t -s x -i -c fT -l 3,2,1 -h 1.,1.2,1.4,1.2 \
-Y 0.8 -V -X "Zeit (s)" \
$(word 5,$^) $(wordlist 1,5,$^) \
nc: $(word 4,$^) $(wordlist 1,4,$^) \
nc: $(word 3,$^) $(wordlist 1,3,$^) \
nc: $(word 2,$^) $(wordlist 1,2,$^) \
nc: $(word 1,$^) $(wordlist 1,1,$^)
#----------------------------------------------------------------------
%.psp: %.ps; gv $<; /bin/rm -fv $<
%.pdf: %.ps; ps2pdf $<
%.rw.ps: %.ps; gs -sDEVICE=pswrite -dNOPAUSE -dBATCH -sOutputFile=$@ $<
......
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