Mathematica's FourierParameters necessary to emulate FFTW_FORWARD and FFTW_BACKWARD
These are the FourierParameters necessary to have Mathematica's Fourier and InverseFourier discrete transforms behave like FFTW's forward and backward FFTs:
FFTWForward[expr_] := Fourier[expr, FourierParameters -> {1, -1}];
FFTWBackward[expr_] := InverseFourier[expr, FourierParameters -> {-1, -1}];
In particular, these functions/parameter choices do not scale the result when transforming in either direction.
Similar parameters can be used when performing analytic transforms using FourierTransform and InverseFourierTransform:
FFTWForwardAnalytic[expr_, t_, w_] := FourierTransform[expr, t, w, FourierParameters -> {1, -1}];
FFTWBackwardAnalytic[expr_, w_, t_] := InverseFourierTransform[expr, w, t, FourierParameters -> {-1, -1}];
No comments:
Post a Comment