40 #define TSTEST_VERSION \    41   "TSTEST   V1.5   test time series modules"    43 #include <tfxx/commandline.h>    67 int main(
int iargc, 
char* argv[])
    74     "usage: tstest [-c1] [-c2] [-r] [-drop] [-tap] [-ovtap f]" "\n"    75     "   or: tstest --help|-h" "\n"    81     "-c1          convolution test 1" "\n"    82     "-c2          convolution test 2" "\n"    83     "-r           random noise test" "\n"    84     "-drop        drop container test" "\n"    85     "-tap         test tapers" "\n"    86     "-ovtap f     test OffsetVariableTaper by reading taper from file f" "\n"    91   using namespace tfxx::cmdline;
    92   static Declare options[]= 
   109     {
"ovtap",arg_yes,
"-"},
   116     cerr << usage_text << endl;
   121   Commandline cmdline(iargc, argv, options);
   124   if (cmdline.optset(0))
   126     cerr << usage_text << endl;
   127     cerr << help_text << endl;
   149     aff::Series<double> a(-2,2), b(-3,3), c, d;
   151     cout << 
"convolution test 1" << endl;
   152     for (
int i=a.f(); i<=a.l(); ++i) { a(i)=i; }
   153     for (
int i=b.f(); i<=b.l(); ++i) { b(i)=i; }
   171     aff::Series<double> a(-2,2), b(-3,3);
   173     cout << 
"convolution test 2" << endl;
   174     for (
int i=a.f(); i<=a.l(); ++i) { a(i)=1; }
   175     for (
int i=b.f(); i<=b.l(); ++i) { b(i)=1; }
   185     cout << 
"test random noise generation" << endl;
   196     cout << 
"test drop containers" << endl;
   197     aff::Series<int> a(1,108);
   198     for (
int i=a.f(); i<=a.l(); ++i) { a(i)=i; }
   204     cout << 
"downsampling with gain " << d1.
gain() << endl;
   205     d1.
attach(d2)->attach(d3)->attach(pass)->attach(d1);
   207     cout << 
"downsampling with gain " << d1.
gain() << endl;
   210     cout << 
"downsampling with gain " << d1.
gain() << endl;
   211     for (
int i=a.f(); i<=a.l(); ++i) { d1.
drop(a(i)); }
   218     aff::Series<double> b(1,1000);
   219     for (
int i=b.f(); i<=b.l(); ++i) { b(i)=i; }
   224     for (
int i=b.f(); i<=b.l(); ++i) { d4.
drop(b(i)); }
   232     cout << 
"test taper" << endl;
   233     aff::Series<double> a(-5,5);
   241     aff::Series<double> b(-50,50);
   244     for (
int i=b.f(); i<=b.l(); ++i)
   246       cout << i << 
" " << b(i) << endl;
   257     const double xmax=90.; 
   258     const double dx=xmax/n;
   260     for (
int i=0; i<n; ++i)
   263       cout << 
"x=" << x << 
" t=" << picks.
time(x) << 
"\n";
   267     aff::Series<double> b(-50,50);
   270     for (
int i=b.f(); i<=b.l(); ++i)
   272       cout << i << 
" " << b(i) << endl;
 Tdseries dugauss(const int &n)
return gaussian uniform noise (standard dev=1, zero mean) 
 
double time(const double &offset) const
return time for interpolated pick at given offset 
 
void apply(C c) const
apply taper to series container c. 
 
int main(int iargc, char *argv[])
 
ts::tapers::FourPoint taper(const double &offset, const double &T0, const double &T) const
 
aff::Series< T > convolve(const aff::ConstSeries< T > &a, const aff::ConstSeries< T > &b)
Calculate convolution of two series. 
 
some time series filter classes (prototypes) 
 
virtual PDropContainer attach(const DropContainer &c)
 
virtual int downsampling_factor() const
 
Offset variable taper (refract taper). 
 
void read(std::istream &is)
 
a container to drop samples into it (prototypes) 
 
offset variable taper (prototypes) 
 
virtual const Tseries::Tcoc & container() const
 
virtual void drop(const Tvalue &v)
this function accepts samples 
 
virtual Tvalue gain() const
 
void help(std::ostream &os)
 
ovtaper::Picks t3() const
 
void print_help(std::ostream &os)
print usage information 
 
virtual void initialize(const int &n)
initialize for n samples input 
 
basic modules of time series library in C++ (prototypes) 
 
aff::Series< double > Tdseries
 
create a random series (prototypes) 
 
provide all needed to use BasicFilter with seife code (prototypes) 
 
virtual void drop(const Tvalue &v)
this function accepts samples 
 
void print_help(std::ostream &os)
print usage information 
 
Provides a 4-point taper. 
 
convolve to series (prototypes) 
 
provide signal tapers (prototypes) 
 
Provides a Hanning taper (no parameters):