#include #include #include "dxf.hh" #include "cpx.hh" #include "vu2.hh" using namespace std ; using namespace dxf4 ; using namespace cpx4 ; using namespace vu24 ; int main() { using dtype = float ; int NN = 10000 ; // ... define + fill vec with data auto vec = new vu2>[NN] ; // ... define output vectors auto csx = new vu2>[NN] ; auto snx = new vu2>[NN] ; // ... call filter dxf filter(0.30, 0.02, vec, csx, snx, NN, "GX") ; // filter frequency f0 from the data, with a sigma = s0 // // 0.30 = f0 * delta_sampling // 0.02 = s0 * delta_sampling // // use - apodisation method FoxLima GX // - input vector = vec of vu2>, complex SU(2) // vectors // - output vector = csx ... cos component // snx ... sin component // ____________________________________________________________ // // the parameters of the different apodisations are: // // apodis./space spec.leak sgm lobe // ______________ _________ ___ ____ // classical // PS Poisson /TIME : -6dB/oct|1.10|-20dB // GX mod.Gauss-"- : -6 -"- |1.50|-42dB // HM Hamming -"- : -6 -"- |1.50|-42dB // O4 O4 -"- : -6 -"- |1.70|-52dB // BA Blackman -"- : -18 -"- |1.90|-60dB // ____________________________________ // FoxLima // F0 F0 / NATIVE : -6dB/oct|1.00|-13dB // F1 F1 / FOURIER : -12 -"- |1.30|-22dB // F2 F2 / -"- : -18 -"- |1.60|-28dB // F3 F3 / -"- : -24 -"- |1.80|-34dB // F4 F4 / -"- : -30 -"- |2.00|-40dB // F5 F5 / -"- : -36 -"- |2.20|-44dB // F6 F6 / -"- : -42 -"- |2.40|-48dB // F7 F7 / -"- : -48 -"- |2.60|-52dB // F8 F8 / -"- : -54 -"- |2.80|-56dB // F9 F9 / -"- : -60 -"- |3.00|-60dB // ____________________________________ }