I have a query about the Fourier utility, that does discrete Fourier transforms. I am unable to find any information on whether different FourierParameters
can be used in each dimension. This is a natural thing to do in wave theory where you have $\exp(i (k x-\omega t))$ representations. Is it possible for example to use FourierParameters -> {1, 1}
for the first dimension and {1, -1}
for subsequent dimensions?
Background information (if useful):
Specifically, I use FourierParameters -> {1, 1}
for the time dimension and {1, -1}
for two spatial dimensions. I wish to take a Fourier transform of a large (960 × 256 × 256) array where the dimensions are $(t,x,y)$. This works, but is slow.
Ftxy[h_] := Module[{Hxy}, Hxy = Fourier[#, FourierParameters -> {1, -1}] & /@ h;
Transpose[Map[Fourier[#, FourierParameters -> {1, 1}] &,
Transpose[Hxy, {3, 2, 1}], {2}], {3, 2, 1}]]
This also works, but is slower
Ftxy3[h_] := With[{n = Length[h]}, N[Exp[-2 π I Range[0, n - 1]/n]]*
Fourier[Reverse[h], FourierParameters -> {1, -1}]]
The raw 3D Fourier[]
is fast, but multiplying through by the complex exponential vector is the slowest part. I tried setting FourierParameters ->
{{1, 1}, {1, -1}, {1, -1}}
, but that is not accepted.
f[h_] := RotateRight@Reverse@Fourier[h, FourierParameters -> {1, -1}]
$\endgroup$ – Simon Woods May 12 '15 at 20:19