48 TFXX_debug(opt.
debug,
"tdtapertransformation",
49 "transformation with time domain taper");
55 cout <<
" apply reflected wave approximation for wave " 56 <<
"velocity: " << opt.
velocity <<
" km/s" << endl;
64 cout <<
" apply direct wave approximation for travel " 65 <<
"distance: " << par.
offset <<
" m" << endl;
74 if (
taper.size() < series.size())
83 cout <<
" apply sqrt(t) taper" << endl;
87 aff::Iterator<Tseries> I(
taper);
88 for (
unsigned int i=0; i<
taper.size(); ++i)
90 *I=sqrt(
double(i)*par.
dt);
99 TFXX_debug(opt.
debug,
"tdtapertransformation",
"apply taper");
111 cout <<
" apply 1/sqrt(t) filter in the time domain" << endl;
114 convresult=ts::convolve(series,
filter) * par.
dt;
117 convresult.setlastindex(convresult.f()+series.size()-1);
124 " apply 1/sqrt(t) filter from discrete Fourier transform" 128 TFourier::Tspectrum scoeff=
Fourier(series, par.
dt);
131 aff::Browser<TFourier::Tspectrum> IF(fcoeff);
132 aff::Iterator<TFourier::Tspectrum> IS(scoeff);
133 while (IF.valid() && IS.valid())
147 " apply analytic Fourier transform of 1/sqrt(t)" 151 TFourier::Tspectrum coeff=
Fourier(series, par.
dt);
152 const TFourier::Tcoeff
IME(0.,1.);
153 const double df=1./par.
T;
154 for (
unsigned int i=coeff.f(); i<=coeff.l(); ++i)
156 double ifre=i-coeff.f();
158 if (f<df) { f=0.1*df; }
159 coeff(i) *= sqrt(M_PI/2.)*(1.-
IME)/sqrt(2.*M_PI*f);
170 TFXX_debug(opt.
debug,
"tdtapertransformation",
"apply taper");
176 retseries=convresult;
Ttimeseries::Tseries Tseries
const TFourier::Tcoeff IME
Tseries filterresponse(const int &size, const double &dt, const Options &opt)
double T
duration of total recording.
double offsetfactor
scaling factor to be applied at given offset.
double dt
sampling interval
double offset
either epicentral distance or hypocentral distance.
Tseries applytaper(const Tseries::Tcoc &input, const Tseries::Tcoc &taper, const double &factor, const double &dt, const double &offset, const Options &opt)