NPL
Neurological Programs and Libraries
fract_fft.h
Go to the documentation of this file.
1 /******************************************************************************
2  * Copyright 2014 Micah C Chambers (micahc.vt@gmail.com)
3  *
4  * NPL is free software: you can redistribute it and/or modify it under the
5  * terms of the BSD 2-Clause License available in LICENSE or at
6  * http://opensource.org/licenses/BSD-2-Clause
7  *
8  * @file fract_fft.h
9  *
10  *****************************************************************************/
11 
12 /******************************************************************************
13  * @file fract_fft.h
14  * @brief Fractional fourier transform based on FFT
15  ******************************************************************************/
16 
17 #ifndef FRACT_FFT
18 #define FRACT_FFT
19 
20 #include <string>
21 #include "fftw3.h"
22 
23 namespace npl {
24 
33 void interp(int64_t isize, fftw_complex* in, int64_t osize, fftw_complex* out);
34 
47 void createChirp(int64_t sz, fftw_complex* chirp, int64_t origsz,
48  double upratio, double alpha, double beta, bool fft);
49 
74 void fractional_ft(size_t isize, fftw_complex* in, fftw_complex* out, double a,
75  size_t bsz = 0, fftw_complex* buffer = NULL, bool nonfft = false);
76 
85 void writePlotReIm(std::string file, size_t insz, fftw_complex* in);
86 
95 void writePlotAbsAng(std::string file, size_t insz, fftw_complex* in);
96 
97 }
98 
99 #endif
Definition: accessors.h:29
void writePlotReIm(std::string file, const std::vector< std::complex< double >> &in)
Plots an array of complex points with the Real and Imaginary Parts.
void createChirp(int64_t sz, fftw_complex *chirp, int64_t origsz, double upratio, double alpha, bool center, bool fft)
Fills the input array (chirp) with a chirp of the specified type.
void writePlotAbsAng(std::string file, size_t insz, fftw_complex *in)
Plots an array of complex points with the Real and Imaginary Parts.
void interp(int64_t isize, fftw_complex *in, int64_t osize, fftw_complex *out)
Interpolate the input array, filling the output array.
void fractional_ft(size_t isize, fftw_complex *in, fftw_complex *out, double a, size_t bsz=0, fftw_complex *buffer=NULL, bool nonfft=false)
Comptues the Fractional Fourier transform using FFTW for nlogn performance.