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

seife function call interface

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: 1801
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent 67473380
# this is <Makefile>
# ----------------------------------------------------------------------------
# $Id: Makefile,v 1.5 2005-06-30 12:47:41 tforb Exp $
# $Id: Makefile,v 1.6 2005-07-04 14:16:48 tforb Exp $
#
# Copyright (c) 2003 by Thomas Forbriger (BFO Schiltach)
#
......@@ -14,7 +14,7 @@
HEADERS=$(shell find . -name \*.h)
#SRC=misc/fortranio.cc misc/commandline.cc misc/ioswap.cc misc/error.cc \
# misc/blitzfortranio.cc hacks/hack_blitztogrepg.cc
LIBSRC=tsxx.cc filter.cc
LIBSRC=tsxx.cc filter.cc seifexx.cc
INCINSTALLPATH=$(LOCINCLUDEDIR)/tsxx
LIBINSTALLPATH=$(LOCLIBDIR)
......
......@@ -3,7 +3,7 @@
*
* ----------------------------------------------------------------------------
*
* $Id: filter.h,v 1.2 2005-06-30 14:02:23 tforb Exp $
* $Id: filter.h,v 1.3 2005-07-04 14:16:48 tforb Exp $
* \author Thomas Forbriger
* \date 30/06/2005
*
......@@ -23,20 +23,20 @@
#define TF_FILTER_H_VERSION \
"TF_FILTER_H V1.0 "
#define TF_FILTER_H_CVSID \
"$Id: filter.h,v 1.2 2005-06-30 14:02:23 tforb Exp $"
"$Id: filter.h,v 1.3 2005-07-04 14:16:48 tforb Exp $"
namespace ts {
/* base class for any filter */
class BasicFilter {
public:
int i;
}; // class BasicFilter
/* function that returns a handle to any filter after parsing the
* parameters
*/
class
}
#endif // TF_FILTER_H_VERSION (includeguard)
......
......@@ -3,11 +3,15 @@
*
* ----------------------------------------------------------------------------
*
* $Id: seifexx.cc,v 1.3 2005-06-28 16:05:48 tforb Exp $
* $Id: seifexx.cc,v 1.4 2005-07-04 14:16:49 tforb Exp $
* \author Thomas Forbriger
* \date 14/01/2005
*
* make seife functions available for C++ (implementation)
*
* The function calls provided here are very simple. They could easily be
* inlined. However, we do not (which introduces some runtime overhead), since
* we like to hide cseife.h from the user of seifexx.h
*
* Copyright (c) 2005 by Thomas Forbriger (BFO Schiltach)
*
......@@ -19,14 +23,85 @@
#define TF_SEIFEXX_CC_VERSION \
"TF_SEIFEXX_CC V1.0 "
#define TF_SEIFEXX_CC_CVSID \
"$Id: seifexx.cc,v 1.3 2005-06-28 16:05:48 tforb Exp $"
"$Id: seifexx.cc,v 1.4 2005-07-04 14:16:49 tforb Exp $"
#include <seifexx.h>
#include <tsxx/seifexx.h>
extern "C" {
#include <cseife.h>
} // extern "C"
namespace ts {
namespace seife {
}
/*! Butterworth lowpass (period t0, order o) */
void lpb(Tseries s, double dt, double t0, int o)
{ seife_lpb(&s(s.first()), s.size(), dt, t0, o); }
/*! Butterworth highpass (period t0, order o) */
void hpb(Tseries s, double dt, double t0, int o)
{ seife_hpb(&s(s.first()), s.size(), dt, t0, o); }
/*! 2nd order lowpass (period t0, damping h) */
void lp2(Tseries s, double dt, double t0, double h)
{ seife_lp2(&s(s.first()), s.size(), dt, t0, h); }
/*! 2nd order highpass (period t0, damping h) */
void hp2(Tseries s, double dt, double t0, double h)
{ seife_hp2(&s(s.first()), s.size(), dt, t0, h); }
/*! 2nd order bandpass (period t0, damping h) */
void bp2(Tseries s, double dt, double t0, double h)
{ seife_bp2(&s(s.first()), s.size(), dt, t0, h); }
/*! 1st order lowpass (period t0) */
void lp1(Tseries s, double dt, double t0)
{ seife_lp1(&s(s.first()), s.size(), dt, t0); }
/*! 1st order highpass (period t0) */
void hp1(Tseries s, double dt, double t0)
{ seife_hp1(&s(s.first()), s.size(), dt, t0); }
/*! integration (time constant t0) */
void integrate(Tseries s, double dt, double t0)
{ seife_int(&s(s.first()), s.size(), dt, t0); }
/*! 1st order highpass equalizer (former period t0s, new period t0) */
void he1(Tseries s, double dt, double t0s, double t0)
{ seife_he1(&s(s.first()), s.size(), dt, t0s, t0); }
/*! 1st order lowpass equalizer (former period t0s, new period t0) */
void le1(Tseries s, double dt, double t0s, double t0)
{ seife_le1(&s(s.first()), s.size(), dt, t0s, t0); }
/*! 2nd order highpass equalizer (former: period t0s and damping hs,
* new: period t0 and damping h)
*/
void he2(Tseries s, double dt,
double t0s, double hs, double t0, double h)
{ seife_he2(&s(s.first()), s.size(), dt, t0s, hs, t0, h); }
/*! 2nd order lowpass equalizer (former: period t0s and damping hs,
* new: period t0 and damping h)
*/
void le2(Tseries s, double dt,
double t0s, double hs, double t0, double h)
{ seife_le2(&s(s.first()), s.size(), dt, t0s, hs, t0, h); }
/*! detide with synthetic tides interpolated over ni samples */
void tid(Tseries s, double dt, int ni)
{ seife_tid(&s(s.first()), s.size(), dt, ni); }
/*! derivative (time constant t0) */
void dif(Tseries s, double dt, double t0)
{ seife_dif(&s(s.first()), s.size(), dt, t0); }
/*! set baseline to first value */
void first(Tseries s)
{ seife_first(&s(s.first()), s.size()); }
} // namespace seife
} // namespace ts
/* ----- END OF seifexx.cc ----- */
......@@ -3,7 +3,7 @@
*
* ----------------------------------------------------------------------------
*
* $Id: seifexx.h,v 1.3 2005-06-28 16:05:48 tforb Exp $
* $Id: seifexx.h,v 1.4 2005-07-04 14:16:49 tforb Exp $
* \author Thomas Forbriger
* \date 14/01/2005
*
......@@ -23,11 +23,56 @@
#define TF_SEIFEXX_H_VERSION \
"TF_SEIFEXX_H V1.0 "
#define TF_SEIFEXX_H_CVSID \
"$Id: seifexx.h,v 1.3 2005-06-28 16:05:48 tforb Exp $"
"$Id: seifexx.h,v 1.4 2005-07-04 14:16:49 tforb Exp $"
#include<aff/series.h>
namespace ts {
namespace seife {
//! seife functions use double precision
typedef double Tvalue;
//! series to be passed to seife functions
typedef aff::Series<Tvalue> Tseries;
/*! Butterworth lowpass (period t0, order o) */
void lpb(Tseries s, double dt, double t0, int o);
/*! Butterworth highpass (period t0, order o) */
void hpb(Tseries s, double dt, double t0, int o);
/*! 2nd order lowpass (period t0, damping h) */
void lp2(Tseries s, double dt, double t0, double h);
/*! 2nd order highpass (period t0, damping h) */
void hp2(Tseries s, double dt, double t0, double h);
/*! 2nd order bandpass (period t0, damping h) */
void bp2(Tseries s, double dt, double t0, double h);
/*! 1st order lowpass (period t0) */
void lp1(Tseries s, double dt, double t0);
/*! 1st order highpass (period t0) */
void hp1(Tseries s, double dt, double t0);
/*! integration (time constant t0) */
void integrate(Tseries s, double dt, double t0);
/*! 1st order highpass equalizer (former period t0s, new period t0) */
void he1(Tseries s, double dt, double t0s, double t0);
/*! 1st order lowpass equalizer (former period t0s, new period t0) */
void le1(Tseries s, double dt, double t0s, double t0);
/*! 2nd order highpass equalizer (former: period t0s and damping hs,
* new: period t0 and damping h)
*/
void he2(Tseries s, double dt,
double t0s, double hs, double t0, double h);
/*! 2nd order lowpass equalizer (former: period t0s and damping hs,
* new: period t0 and damping h)
*/
void le2(Tseries s, double dt,
double t0s, double hs, double t0, double h);
/*! detide with synthetic tides interpolated over ni samples */
void tid(Tseries s, double dt, int ni);
/*! derivative (time constant t0) */
void dif(Tseries s, double dt, double t0);
/*! set baseline to first value */
void first(Tseries s);
} // namespace seife
} // namespace ts
......
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