8 const int M = LineDensity.size();
12 double* LD =
new double[M];
13 for (
int i = 0; i < M; ++i) {
14 LD[i] = LineDensity[i];
30 for (
int i = 0; i < M; ++i) {
31 LineDensity[i] = LD[i];
37 const int M = LineDensity.size();
38 const double gff = 2. *
Physics::pi / (h * (M - 1));
43 double* LD =
new double[M];
45 for (
int i = 0; i < M; ++i) {
46 LD[i] = LineDensity[i];
55 LD[i] = -LD[i + 1] * gff * (i + 1) / 2;
56 LD[i + 1] = temp * gff * (i + 1) / 2;
70 for (
int i = 0; i < M; ++i) {
71 LineDensity[i] = LD[i];
gsl_fft_halfcomplex_wavetable * gsl_fft_halfcomplex_wavetable_alloc(size_t n)
Allocate a halfcomplex FFT wavetable of size .
void gsl_fft_real_wavetable_free(gsl_fft_real_wavetable *w)
Free a real FFT wavetable.
gsl_fft_real_workspace * gsl_fft_real_workspace_alloc(size_t n)
Allocate a real FFT workspace of size .
void gsl_fft_halfcomplex_inverse(double *data, size_t stride, size_t n, gsl_fft_halfcomplex_wavetable *wavetable, gsl_fft_halfcomplex_workspace *workspace)
Alias for halfcomplex inverse transform.
void gsl_fft_real_workspace_free(gsl_fft_real_workspace *w)
Free a real FFT workspace.
void gsl_fft_real_transform(double *data, size_t stride, size_t n, gsl_fft_real_wavetable *, gsl_fft_real_workspace *)
Forward real FFT with GSL-compatible packed output.
gsl_fft_real_wavetable * gsl_fft_real_wavetable_alloc(size_t n)
Allocate a real FFT wavetable of size .
void gsl_fft_halfcomplex_wavetable_free(gsl_fft_halfcomplex_wavetable *w)
Free a halfcomplex FFT wavetable.
Halfcomplex FFT types for inverse transforms.
GSL-compatible interface for FFT routines.
Workspace for real FFT routines.
void apply(std::vector< double > &LineDensity)
FixedFFTLowPassFilter(const int &N)
void calc_derivative(std::vector< double > &histogram, const double &h)
constexpr double pi
The value of.