37 #define TF_FFTWAFFAR_CC_VERSION \ 38 "TF_FFTWAFFAR_CC V1.1" 43 #include <aff/Carray.h> 44 #include <aff/slice.h> 45 #include <aff/shaper.h> 53 : Mseriesarray(
TAseries(aff::Shaper(0,nsamp-1)(0,nseis-1))),
55 Mplanr2c(0), Mplanc2r(0)
64 : Mseriesarray(series), Mspectrumarray(spec),
65 Mplanr2c(0), Mplanc2r(0)
71 : Mseriesarray(e.Mseriesarray), Mspectrumarray(e.Mspectrumarray),
72 Mplanr2c(0), Mplanc2r(0)
78 : Mseriesarray(
TAseries(aff::Shaper(0,4-1)(0,0))),
80 Mplanr2c(0), Mplanc2r(0)
142 "ERROR: sample size inconsistent");
144 "ERROR: inconsistent number of signals");
146 "ERROR: two-dimensional arrays only");
148 "ERROR: two-dimensional arrays only");
166 const unsigned flags=FFTW_ESTIMATE;
170 aff::CArray<TAseries::Tvalue> Cseriesarray(
Mseriesarray);
174 const int istride=Cseriesarray.stride(0);
176 const int idist=Cseriesarray.stride(1);
178 double* in=Cseriesarray.castedpointer<
double>();
186 const int ostride=Cspectrumarray.stride(0);
188 const int odist=Cspectrumarray.stride(1);
190 fftw_complex* out=Cspectrumarray.castedpointer<fftw_complex>();
193 Mplanr2c=fftw_plan_many_dft_r2c(rank, &n, howmany,
194 in, inembed, istride, idist,
195 out, onembed, ostride, odist,
216 const unsigned flags=FFTW_ESTIMATE;
224 const int istride=Cspectrumarray.stride(0);
226 const int idist=Cspectrumarray.stride(1);
228 fftw_complex* in=Cspectrumarray.castedpointer<fftw_complex>();
232 aff::CArray<TAseries::Tvalue> Cseriesarray(
Mseriesarray);
236 const int ostride=Cseriesarray.stride(0);
238 const int odist=Cseriesarray.stride(1);
240 double* out=Cseriesarray.castedpointer<
double>();
243 Mplanc2r=fftw_plan_many_dft_c2r(rank, &n, howmany,
244 in, inembed, istride, idist,
245 out, onembed, ostride, odist,
313 "ERROR: signal index is out of range");
324 "ERROR: signal index is out of range");
#define FOURIER_assert(C, M)
Check an assertion and report by throwing an exception.
unsigned int nsamples() const
return the number of samples in time series
Tsample scale_spectrum(const Tsample &dt) const
Return appropriate scaling factor for sampling interval dt.
aff::Array< Tsample > TAseries
engine to transfrom several signals at once (prototypes)
aff::Array< Tcoeff > TAspectrum
error handling for libfourier (prototypes)
~DRFFTWAFFArrayEngine()
delete plan.
TAseries series() const
return a reference to the time series arrays
void r2c()
execute r2c plan
unsigned int nfrequencies() const
return the number of positive frequencies used
Tsample scale_series(const Tsample &dt) const
Return appropriate scaling factor for sampling interval dt.
DRFFTWAFFArrayEngine & operator=(const DRFFTWAFFArrayEngine &e)
TAspectrum Mspectrumarray
unsigned int nseries() const
return the number of series in the arrays
TAspectrum spectrum() const
return a reference to the Fourier coefficient arrays
static unsigned int ncoeff(const unsigned int &nsamples)
return number of coefficients for given number of samples
Engine to transform several signals at once. References to workspace are passed to the contstructor...
void c2r()
execute c2r plan
void delete_plans()
delete plans.