Waveform filter programs

◆ padseries()

void FourierProcessor::padseries ( const unsigned int &  n)
private

pad input series and calculate Fourier coefficients

Definition at line 203 of file cross.cc.

References Mdebug, Mdt, MFFT, Minsize, Mpadded, Mseries, Mspecavail, and Mspectrum.

Referenced by FourierProcessor(), and operator()().

204 {
205  TFXX_debug(this->Mdebug,
206  "FourierProcessor::padseries(const Tconsttimeseries& n)",
207  TFXX_value(n));
208  TFXX_assert(Minsize<=n,
209  "desired series size would truncate original series");
210  bool refft=((Mpadded.size() != n) || (!Mspecavail));
211  if (n>Mseries.size())
212  {
213  Mseries=Tseries(n);
214  Mseries=0.;
215  Mseries.copyin(Mpadded);
216  refft=true;
217  }
218  if (refft)
219  {
220  Mpadded=aff::subarray(Mseries)(Mseries.f(),Mseries.f()+n-1);
221  Mspectrum=MFFT(Mpadded, this->Mdt);
222  Mspecavail=true;
223  }
224 } // void FourierProcessor::padseries(const unsigned int& n)
Tseries Mpadded
series addressing part of workspace
Definition: cross.cc:133
Tspectrum Mspectrum
resulting Fourier coefficients
Definition: cross.cc:135
unsigned int Minsize
size of original input series
Definition: cross.cc:139
bool Mdebug
debug flag
Definition: cross.cc:143
Tfft::Tseries Tseries
type of time series data
Definition: cross.cc:93
double Mdt
sampling interval
Definition: cross.cc:141
Tseries Mseries
workspace for input series must have at least desired size
Definition: cross.cc:131
Tfft MFFT
FFT processor.
Definition: cross.cc:129
bool Mspecavail
indicate available Fourier coefficients
Definition: cross.cc:137
Here is the caller graph for this function: