35 #define TF_LISOUSI_APPLYTAPER_CC_VERSION \ 36 "TF_LISOUSI_APPLYTAPER_CC V1.0 " 42 const double& factor,
const double& dt,
43 const double& offset,
const Options& opt)
47 cout <<
" apply taper function" 48 <<
" with delay: " << dt*int(opt.
tapdel/dt) <<
"s" 51 TFXX_debug(opt.
debug,
"applytaper",
"apply taper to time series\n" 53 <<
"size of series: " << input.size() <<
"; " 54 <<
"size of taper: " <<
taper.size());
56 double taperdelay=opt.
tapdel;
59 taperdelay=taperdelay<opt.
tapslo*offset ? taperdelay : opt.
tapslo*offset;
62 Tseries retval(0,input.size()-1);
63 retval=Tseries::Tvalue(0.);
65 aff::Browser<Tseries::Tcoc> IT(
taper);
66 aff::Browser<Tseries::Tcoc> II(input);
67 aff::Iterator<Tseries> IS(retval);
70 while (IT.valid() && IS.valid() && II.valid())
73 (*IS) = (*II) * (*IT) * factor;
76 if (t >= taperdelay) { ++IT; }
Ttimeseries::Tseries Tseries
prototypes and structs for lisousi (prototypes)
lisousi functions (prototypes)
Tseries applytaper(const Tseries::Tcoc &input, const Tseries::Tcoc &taper, const double &factor, const double &dt, const double &offset, const Options &opt)