Fourier library: Operations in the Fourier domain

◆ process()

void process ( int  n,
int  m,
const bool &  verbose,
const bool &  debug 
)

Definition at line 68 of file cxxfftwtest.cc.

References fill().

Referenced by main().

69 {
70  cout << "test with " << n << " samples" << endl;
71  cout << "test with frequency " << m << endl;
72  Tseries a(n);
73  fill(a, n, m);
74  if (verbose) { cout << "array is filled " << endl; }
75  DRFFTWAFF fftprocessor(n);
76  if (verbose) { cout << "processor is created " << endl; }
77  Tspectrum b=fftprocessor(a, debug);
78  if (verbose) { cout << "forward transform is finished" << endl; }
79  Tseries c=fftprocessor(b, debug);
80  if (verbose) { cout << "backward transform is finished" << endl; }
81  cout << "time series:" << endl;
82  for (int i=0; i<n ; ++i)
83  {
84  cout.width(4);
85  cout << i << " ";
86  cout.width(15);
87  cout.precision(6);
88  cout << a(i) << " ";
89  cout.width(15);
90  cout.precision(6);
91  cout << c(i) << endl;
92  }
93  cout << "power spectrum:" << endl;
94  for (int i=0; i<b.size() ; ++i)
95  {
96  cout.width(4);
97  cout << i << " " << abs(b(i)*conj(b(i))) << endl;
98  }
99 }
DRFFTWAFF::Tspectrum Tspectrum
Definition: cxxfftwtest.cc:49
aff::Series< Tvalue > Tseries
void fill(Tseries &a, int n, int m)
Definition: cxxfftwtest.cc:51
Here is the call graph for this function:
Here is the caller graph for this function: