3#include "gsl/gsl_fft_real.h"
4#include "gsl/gsl_fft_halfcomplex.h"
8 number_frequencies_m(N)
13 gsl_fft_halfcomplex_wavetable *hc;
14 gsl_fft_real_wavetable *
real = gsl_fft_real_wavetable_alloc(M);
15 gsl_fft_real_workspace *work = gsl_fft_real_workspace_alloc(M);
16 double *LD =
new double[M];
17 for (
int i = 0; i < M; ++ i) {
20 gsl_fft_real_transform(LD, 1, M,
real, work);
26 gsl_fft_real_wavetable_free(
real);
27 hc = gsl_fft_halfcomplex_wavetable_alloc(M);
29 gsl_fft_halfcomplex_inverse(LD, 1, M, hc, work);
31 gsl_fft_halfcomplex_wavetable_free(hc);
32 gsl_fft_real_workspace_free(work);
34 for (
int i = 0; i < M; ++ i) {
42 const double gff = 2. *
Physics::pi / (h * (M - 1));
44 gsl_fft_halfcomplex_wavetable *hc;
45 gsl_fft_real_wavetable *
real = gsl_fft_real_wavetable_alloc(M);
46 gsl_fft_real_workspace *work = gsl_fft_real_workspace_alloc(M);
47 double *LD =
new double[M];
49 for (
int i = 0; i < M; ++ i) {
52 gsl_fft_real_transform(LD, 1, M,
real, work);
54 gsl_fft_real_wavetable_free(
real);
59 LD[i] = -LD[i+1] * gff * (i + 1) / 2;
60 LD[i+1] = temp * gff * (i + 1) / 2;
67 hc = gsl_fft_halfcomplex_wavetable_alloc(M);
69 gsl_fft_halfcomplex_inverse(LD, 1, M, hc, work);
71 gsl_fft_halfcomplex_wavetable_free(hc);
72 gsl_fft_real_workspace_free(work);
74 for (
int i = 0; i < M; ++ i) {
FLieGenerator< T, N > real(const FLieGenerator< std::complex< T >, N > &)
Take real part of a complex generator.
constexpr double pi
The value of.
void apply(std::vector< double > &LineDensity)
FixedFFTLowPassFilter(const int &N)
void calc_derivative(std::vector< double > &histogram, const double &h)