Waveform filter programs

◆ speccorr()

FourierProcessor::Tspectrum speccorr ( const FourierProcessor::Tspectrum::Tcoc &  sref,
const FourierProcessor::Tspectrum::Tcoc &  ssig 
)

Definition at line 254 of file cross.cc.

Referenced by main().

256 {
257  TFXX_assert(sref.size() == ssig.size(),
258  "inconsistent sets of coefficients");
259  // imaginary unit time pi (shift factor)
260  const std::complex<double> expfac(0.,M_PI);
261  FourierProcessor::Tspectrum result(sref.size());
263  aff::Browser<FourierProcessor::Tspectrum::Tcoc> BR(sref);
264  aff::Browser<FourierProcessor::Tspectrum::Tcoc> BD(ssig);
265  aff::Iterator<FourierProcessor::Tspectrum> IR(result);
266  int l=0;
267  while (BR.valid() && BD.valid() && IR.valid())
268  {
269  // cross correlation in the Fourier domain and simultaneous time shift to
270  // place origin of time scale in center of corresponding time series
271  *IR = conj(*BR) * (*BD) * std::exp(double(l)*expfac);
272  ++IR;
273  ++BR;
274  ++BD;
275  ++l;
276  }
277  return(result);
278 } // FourierProcessor::Tspectrum
Tfft::Tspectrum Tspectrum
type of Fourier coefficient data
Definition: cross.cc:95
double Tvalue
Definition: fidasexx.cc:136
Here is the caller graph for this function: