# \#fftw

**URL:** https://discourse.julialang.org/tag/fftw/19.md?match_all_tags=true&page=2&tags%5B%5D=fftw

[Latest](https://discourse.julialang.org/latest.md) · [Categories](https://discourse.julialang.org/categories.md) · [Tags](https://discourse.julialang.org/tags.md)

**Page:** 3

---

## [2D DFFT: wrong order along the second dimension](https://discourse.julialang.org/t/2d-dfft-wrong-order-along-the-second-dimension/74869)

<div class="topic-metadata">

**Author:** [@Gregstrq](https://discourse.julialang.org/u/Gregstrq)\
**Replies:** 1\
**Last updated:** [January 19, 2022, 4:14pm UTC](https://discourse.julialang.org/t/2d-dfft-wrong-order-along-the-second-dimension/74869 "2022-01-19T16:14:36Z")

</div>

Let us consider a 2D discrete fast Fourier transform of a separable function: using FFTW xs = collect(0.0:0.1:0.9) ys = xs zs = cos.(xs).^2\*sin.(ys') fzs = fft(zs) The result of 2D DFF transform of zs is On the oth…

---

## [\[ANN\] PencilFFTs: parallel FFTs of MPI-distributed arrays](https://discourse.julialang.org/t/ann-pencilffts-parallel-ffts-of-mpi-distributed-arrays/33191)

<div class="topic-metadata">

**Author:** [@jipolanco](https://discourse.julialang.org/u/jipolanco)\
**Replies:** 7\
**Last updated:** [December 8, 2021, 10:09am UTC](https://discourse.julialang.org/t/ann-pencilffts-parallel-ffts-of-mpi-distributed-arrays/33191 "2021-12-08T10:09:50Z")

</div>

I’m happy to announce PencilFFTs.jl, a Julia package for performing parallel fast Fourier transforms using MPI. This package is an attempt to bring parallel FFTs to Julia. It is well adapted for running on thousands of …

---

## [FFTX for Julia? (Spiral framework)](https://discourse.julialang.org/t/fftx-for-julia-spiral-framework/71533)

<div class="topic-metadata">

**Author:** [@Perrin\_Meyer](https://discourse.julialang.org/u/Perrin_Meyer)\
**Replies:** 1\
**Last updated:** [November 16, 2021, 12:38am UTC](https://discourse.julialang.org/t/fftx-for-julia-spiral-framework/71533 "2021-11-16T00:38:35Z")

</div>

LBNL and CMU appear to have a project to use CMU’s Spiral framework to generate efficient FFT libraries for CPU’s, GPU’s, etc. It’s a more recent project than FFTW, and unlike FFTW, the libraries are BSD licensed. Does…

---

## [(discrete cosine transform) DCT on GPU](https://discourse.julialang.org/t/discrete-cosine-transform-dct-on-gpu/64273)

<div class="topic-metadata">

**Author:** [@rveltz](https://discourse.julialang.org/u/rveltz)\
**Replies:** 4\
**Last updated:** [November 2, 2021, 3:44pm UTC](https://discourse.julialang.org/t/discrete-cosine-transform-dct-on-gpu/64273 "2021-11-02T15:44:38Z")

</div>

Hi, Although I have discussed some of this with some developers at Oceananigans.jl, I am reaching you out here to ask if anybody has a plan\_dct! which works on GPU? Should we parallel FFTW.jl? Thank you, Bests

---

## [FFT is too fast compared to assignment in CUDA](https://discourse.julialang.org/t/fft-is-too-fast-compared-to-assignment-in-cuda/70353)

<div class="topic-metadata">

**Author:** [@wsshin](https://discourse.julialang.org/u/wsshin)\
**Replies:** 3\
**Last updated:** [October 28, 2021, 8:23pm UTC](https://discourse.julialang.org/t/fft-is-too-fast-compared-to-assignment-in-cuda/70353 "2021-10-28T20:23:29Z")

</div>

FFT is a pretty fast algorithm, but its performance on CUDA seems even comparable to simple element-wise assignment. I am wondering if this is something expected. Here is the contents of a performance test code named t…

---

## [FFTs in probabilistic models](https://discourse.julialang.org/t/ffts-in-probabilistic-models/69775)

<div class="topic-metadata">

**Author:** [@bdecost](https://discourse.julialang.org/u/bdecost)\
**Replies:** 5\
**Last updated:** [October 15, 2021, 3:19am UTC](https://discourse.julialang.org/t/ffts-in-probabilistic-models/69775 "2021-10-15T03:19:55Z")

</div>

I’m working on a model that involves a Fourier transform, and I’m running the limits of my julia debugging ability I’m using this AbstractFFTs PR to try to get it working with the ForwardDiff backend. (Zygote fails with…

---

## [Distributing a function that uses FFTW](https://discourse.julialang.org/t/distributing-a-function-that-uses-fftw/69564)

<div class="topic-metadata">

**Author:** [@tictaccat](https://discourse.julialang.org/u/tictaccat)\
**Replies:** 1\
**Last updated:** [October 11, 2021, 2:57pm UTC](https://discourse.julialang.org/t/distributing-a-function-that-uses-fftw/69564 "2021-10-11T14:57:30Z")

</div>

Hi! I’ve been having a lot of trouble using pmap with a function that uses FFTW with a planned FFT. Here is a minimum example, where I just try to perform a FFT on an array of matrices: @everywhere using FFTW using Dist…

---

## [Fft(x,n) when n\>length(x)](https://discourse.julialang.org/t/fft-x-n-when-n-length-x/69308)

<div class="topic-metadata">

**Author:** [@moeinkh88](https://discourse.julialang.org/u/moeinkh88)\
**Replies:** 4\
**Last updated:** [October 6, 2021, 3:15pm UTC](https://discourse.julialang.org/t/fft-x-n-when-n-length-x/69308 "2021-10-06T15:15:22Z")

</div>

I am trying to extract the n-point DFT of using fft for vector X. I am a MATLAB user, so, I run fft(X,n) when length(X)=16 and n=32. But it doesn’t work since fft in FFTW Pkg is limited to the length of vector X. Is ther…

---

## [Define fft\_plan! for nested array](https://discourse.julialang.org/t/define-fft-plan-for-nested-array/67309)

<div class="topic-metadata">

**Author:** [@jinml](https://discourse.julialang.org/u/jinml)\
**Replies:** 1\
**Last updated:** [August 29, 2021, 10:27pm UTC](https://discourse.julialang.org/t/define-fft-plan-for-nested-array/67309 "2021-08-29T22:27:23Z")

</div>

Hi, I have a nested array Array{SVector{n},2}, which is a 2D array of n-SVectors. I would like to perform in-place fft to each component of the n-SVectors. This is what worked for me: julia\> A=rand(SVector{2,ComplexF64}…

---

## [Apply array function such as fft to nested array](https://discourse.julialang.org/t/apply-array-function-such-as-fft-to-nested-array/66935)

<div class="topic-metadata">

**Author:** [@jinml](https://discourse.julialang.org/u/jinml)\
**Replies:** 2\
**Last updated:** [August 25, 2021, 8:02am UTC](https://discourse.julialang.org/t/apply-array-function-such-as-fft-to-nested-array/66935 "2021-08-25T08:02:21Z")

</div>

I have an array A of 2-SVectors. I’d like to apply fft component-wise, namely, something like fft(A\[:,:\]\[1\]) and fft(A\[:,:\]\[2\]) and put them together again as nested array of vectors. It is best if this can be done in-pl…

---

## [PDE simulation with ETD2. For computing quasicrystal](https://discourse.julialang.org/t/pde-simulation-with-etd2-for-computing-quasicrystal/64648)

<div class="topic-metadata">

**Author:** [@rveltz](https://discourse.julialang.org/u/rveltz)\
**Replies:** 8\
**Last updated:** [July 15, 2021, 7:47am UTC](https://discourse.julialang.org/t/pde-simulation-with-etd2-for-computing-quasicrystal/64648 "2021-07-15T07:47:49Z")

</div>

Dear all, I am trying to solve a pde using the time stepper ETD2 in Fourier space. My goal was to play with the results of the paper Subramanian, P., A. J. Archer, E. Knobloch, and A. M. Rucklidge. “Spatially Localize…

---

## [Allowed types for \`fft()\` and \`ifft()\` when using sparse arrays](https://discourse.julialang.org/t/allowed-types-for-fft-and-ifft-when-using-sparse-arrays/64481)

<div class="topic-metadata">

**Author:** [@maxkapur](https://discourse.julialang.org/u/maxkapur)\
**Replies:** 0\
**Last updated:** [July 12, 2021, 1:56am UTC](https://discourse.julialang.org/t/allowed-types-for-fft-and-ifft-when-using-sparse-arrays/64481 "2021-07-12T01:56:03Z")

</div>

In the following code, I have commented out all the lines that produce a MethodError: using FFTW, SparseArrays fft(rand(Float64, 50, 50)) fft(rand(ComplexF64, 50, 50)) fft(rand(Float32, 50, 50)) fft(rand(ComplexF32, 50…

---

## [Do FFTW.jl and Quadmath.jl work together automatically?](https://discourse.julialang.org/t/do-fftw-jl-and-quadmath-jl-work-together-automatically/64237)

<div class="topic-metadata">

**Author:** [@johnomotani](https://discourse.julialang.org/u/johnomotani)\
**Replies:** 3\
**Last updated:** [July 8, 2021, 6:38am UTC](https://discourse.julialang.org/t/do-fftw-jl-and-quadmath-jl-work-together-automatically/64237 "2021-07-08T06:38:59Z")

</div>

If some Arrays (or whatever) are defined using the Float128 type from Quadmath.jl, will operations from FFTW.jl be done in quad precision? The FFTW library itself supports quad-precision (Precision (FFTW 3.3.10)), but I …

---

## [IFFT function in julia](https://discourse.julialang.org/t/ifft-function-in-julia/63454)

<div class="topic-metadata">

**Author:** [@juls](https://discourse.julialang.org/u/juls)\
**Replies:** 7\
**Last updated:** [June 23, 2021, 7:56pm UTC](https://discourse.julialang.org/t/ifft-function-in-julia/63454 "2021-06-23T19:56:33Z")

</div>

I am trying to implement the below matrix computation from matlab in julia. But the ifft function gives different output than obtained in matlab a = zeros(5,10); for i = 1:5 a(i,:) = ifft((c(i,:).\*(d))); end w…

---

## [Getting different output for fft function in julia and matlab](https://discourse.julialang.org/t/getting-different-output-for-fft-function-in-julia-and-matlab/63349)

<div class="topic-metadata">

**Author:** [@juls](https://discourse.julialang.org/u/juls)\
**Replies:** 4\
**Last updated:** [June 22, 2021, 9:42am UTC](https://discourse.julialang.org/t/getting-different-output-for-fft-function-in-julia-and-matlab/63349 "2021-06-22T09:42:29Z")

</div>

In JULIA, 2×5 Array{Float64,2}: 0.801514 1.21987 1.1503 1.18761 1.2485 0.807469 1.22325 1.14981 1.1877 1.24861 when fft function from FFTW.jl on the above array gives output: 2×5 Array{Complex{Float64},2}: …

---

## [Fft of Matrix type doesnt work?](https://discourse.julialang.org/t/fft-of-matrix-type-doesnt-work/62902)

<div class="topic-metadata">

**Author:** [@mgalenb](https://discourse.julialang.org/u/mgalenb)\
**Replies:** 2\
**Last updated:** [June 14, 2021, 7:19pm UTC](https://discourse.julialang.org/t/fft-of-matrix-type-doesnt-work/62902 "2021-06-14T19:19:55Z")

</div>

I am trying to do a 2D FFT of an image: using AbstractFFT img=\[sin(2\*pi\*x\*10/256) for x in 1:256, y in 1:256\]; fft(img) but this gives: julia\> fft(img) ERROR: MethodError: no method matching plan\_fft(::Matrix{ComplexF…

---

## [How to verify the convolution theorem in Julia?](https://discourse.julialang.org/t/how-to-verify-the-convolution-theorem-in-julia/60185)

<div class="topic-metadata">

**Author:** [@Minimum-Pollution-96](https://discourse.julialang.org/u/Minimum-Pollution-96)\
**Replies:** 15\
**Last updated:** [April 29, 2021, 8:32am UTC](https://discourse.julialang.org/t/how-to-verify-the-convolution-theorem-in-julia/60185 "2021-04-29T08:32:30Z")

</div>

I’ve trying to prove convolution theorem in Julia but without success. Say I have two function f1 = sin(30πt) & f2 = sin(10πt). Then, I have the following code fconv\_fda = ifft(fft(f1).\*fft(f2)) fconv\_tda = DSP.conv(f1,…

---

## [\[ANN\] FourierTools.jl | Tools for working with Fourier space](https://discourse.julialang.org/t/ann-fouriertools-jl-tools-for-working-with-fourier-space/59930)

<div class="topic-metadata">

**Author:** [@roflmaostc](https://discourse.julialang.org/u/roflmaostc)\
**Replies:** 1\
**Last updated:** [April 24, 2021, 1:17pm UTC](https://discourse.julialang.org/t/ann-fouriertools-jl-tools-for-working-with-fourier-space/59930 "2021-04-24T13:17:29Z")

</div>

Hey, today we can announce the release of FourierTools.jl. The package, as the name suggests, provides several tools based on Fourier space. The workhorse behind many algorithms is of course FFTW.jl. Features sinc …

---

## [Adding noise in frequency domain while solving an SPDE](https://discourse.julialang.org/t/adding-noise-in-frequency-domain-while-solving-an-spde/59240)

<div class="topic-metadata">

**Author:** [@tiago](https://discourse.julialang.org/u/tiago)\
**Replies:** 3\
**Last updated:** [April 14, 2021, 2:35pm UTC](https://discourse.julialang.org/t/adding-noise-in-frequency-domain-while-solving-an-spde/59240 "2021-04-14T14:35:45Z")

</div>

Hello, I’m implementing a numerical solver to a certain kind of a 2D stochastic PDE using Fourier Transforms. So, this solver is a Galerkin type method, which means that choosing the right basis functions I can apply F…

---

## [oneAPI & FFTW](https://discourse.julialang.org/t/oneapi-fftw/59055)

<div class="topic-metadata">

**Author:** [@fra](https://discourse.julialang.org/u/fra)\
**Replies:** 2\
**Last updated:** [April 12, 2021, 6:12am UTC](https://discourse.julialang.org/t/oneapi-fftw/59055 "2021-04-12T06:12:44Z")

</div>

I’m trying oneAPI.jl with FFTW and I get an error when trying to use complex arrays in the GPU. using oneAPI using FFTW a = randn(1024) .+ im\*randn(1024); b = oneArray(a); fft(a); fft(b); For the oneArray case I get j…

---

## [\`plan\_rfft\` together used with \`mul!\` and \`@view\` complains about wrong-strides-output](https://discourse.julialang.org/t/plan-rfft-together-used-with-mul-and-view-complains-about-wrong-strides-output/58215)

<div class="topic-metadata">

**Author:** [@roflmaostc](https://discourse.julialang.org/u/roflmaostc)\
**Replies:** 24\
**Last updated:** [March 30, 2021, 10:24pm UTC](https://discourse.julialang.org/t/plan-rfft-together-used-with-mul-and-view-complains-about-wrong-strides-output/58215 "2021-03-30T22:24:47Z")

</div>

Hey, initially I wanted to have rfft! but since it doesn’t exist, I tried the workaround mentioned in this discourse discussion. However, mul! complains when used with a plan\_rfft generated matrix: using LinearAlgebra…

---

## [Possible bug using plan\_irfft and plan\_rfft with mul! and ldiv!](https://discourse.julialang.org/t/possible-bug-using-plan-irfft-and-plan-rfft-with-mul-and-ldiv/57374)

<div class="topic-metadata">

**Author:** [@tiago](https://discourse.julialang.org/u/tiago)\
**Replies:** 2\
**Last updated:** [March 17, 2021, 1:54pm UTC](https://discourse.julialang.org/t/possible-bug-using-plan-irfft-and-plan-rfft-with-mul-and-ldiv/57374 "2021-03-17T13:54:32Z")

</div>

Hello, I found a strange behaviour while using precomputed plans in 2D of real fft, plan\_rfft and plan\_irfft, with the function mul! and ldiv! from the LinearAlbegra package. For example, when computing the inverse tran…

---

## [FFT planning with flags fails for CUDA](https://discourse.julialang.org/t/fft-planning-with-flags-fails-for-cuda/56870)

<div class="topic-metadata">

**Author:** [@roflmaostc](https://discourse.julialang.org/u/roflmaostc)\
**Replies:** 2\
**Last updated:** [March 10, 2021, 12:26pm UTC](https://discourse.julialang.org/t/fft-planning-with-flags-fails-for-cuda/56870 "2021-03-10T12:26:30Z")

</div>

Hey, I was trying to do a FFT plan for a CuArray. The following works: julia\> using CUDA, CUDA.CUFFT julia\> x = CUDA.rand(2, 2) 2×2 CuArray{Float32, 2}: 0.318697 0.144699 0.631969 0.433798 julia\> fft(x) 2×2 CuArr…

---

## [The need of (i)fftshift's to compute a PDE using Fourier Transform](https://discourse.julialang.org/t/the-need-of-i-fftshifts-to-compute-a-pde-using-fourier-transform/56587)

<div class="topic-metadata">

**Author:** [@tiago](https://discourse.julialang.org/u/tiago)\
**Replies:** 12\
**Last updated:** [March 8, 2021, 8:54pm UTC](https://discourse.julialang.org/t/the-need-of-i-fftshifts-to-compute-a-pde-using-fourier-transform/56587 "2021-03-08T20:54:50Z")

</div>

Hello, I’m currently writing an algorithm to solve a specific kind of PDE, via Fourier Transform. In the several examples that I saw, the general idea is to transform everything to the frequency domain using an fft, do…

---

## [Multidimensional Real Fast Fourier Transform](https://discourse.julialang.org/t/multidimensional-real-fast-fourier-transform/56498)

<div class="topic-metadata">

**Author:** [@tiago](https://discourse.julialang.org/u/tiago)\
**Replies:** 8\
**Last updated:** [March 5, 2021, 4:14pm UTC](https://discourse.julialang.org/t/multidimensional-real-fast-fourier-transform/56498 "2021-03-05T16:14:52Z")

</div>

Hello, I’m using fourier transformations to solve a partial differential equation in two dimensions. Since performance is super important in my case and I only deal with real data, so i’m using the pre-computed plan of …

---

## [How to use Fourier Filter on Complex Data](https://discourse.julialang.org/t/how-to-use-fourier-filter-on-complex-data/54967)

<div class="topic-metadata">

**Author:** [@mdsa3d](https://discourse.julialang.org/u/mdsa3d)\
**Replies:** 8\
**Last updated:** [March 4, 2021, 2:16am UTC](https://discourse.julialang.org/t/how-to-use-fourier-filter-on-complex-data/54967 "2021-03-04T02:16:06Z")

</div>

I would like to know, how may I filter or separate this complex function into its simpler sub-functions (something like fourier filter). Example I have a noisy dataset: x = 1:1:10 y = \[-1,5,0,2,-7,1,6,9,-2,3\] If I wou…

---

## [Map Performance with CuArrays](https://discourse.julialang.org/t/map-performance-with-cuarrays/33497)

<div class="topic-metadata">

**Author:** [@bmit](https://discourse.julialang.org/u/bmit)\
**Replies:** 15\
**Last updated:** [January 4, 2021, 7:29am UTC](https://discourse.julialang.org/t/map-performance-with-cuarrays/33497 "2021-01-04T07:29:48Z")

</div>

I’m trying to benchmark different methods of calling the same in-place function on subsets of a large data block using CuArrays. I’m using fft as an example function because I can baseline against planning an fft over on…

---

## [Fft() function does not return the correct analytic result](https://discourse.julialang.org/t/fft-function-does-not-return-the-correct-analytic-result/50644)

<div class="topic-metadata">

**Author:** [@tiago](https://discourse.julialang.org/u/tiago)\
**Replies:** 5\
**Last updated:** [November 26, 2020, 7:21pm UTC](https://discourse.julialang.org/t/fft-function-does-not-return-the-correct-analytic-result/50644 "2020-11-26T19:21:58Z")

</div>

Hello, currently I’m having issues understanding how to perform with success a Fourier Transformation using the fft() function of the fftw.jl package. Let’s pick the step function: using FFTW, Plots x = range(-5,stop=5…

---

## [Modifying all the frequency components of an FFT to 0 EXCEPT the 0th, +-3rd, +-6th, etc](https://discourse.julialang.org/t/modifying-all-the-frequency-components-of-an-fft-to-0-except-the-0th-3rd-6th-etc/48463)

<div class="topic-metadata">

**Author:** [@ash](https://discourse.julialang.org/u/ash)\
**Replies:** 4\
**Last updated:** [October 21, 2020, 7:11am UTC](https://discourse.julialang.org/t/modifying-all-the-frequency-components-of-an-fft-to-0-except-the-0th-3rd-6th-etc/48463 "2020-10-21T07:11:43Z")

</div>

I have an array and I want to modify its FFT frequencies by an exponential factor except those that are a multiple of 3 (or more generally, M). For example, we can do this naively as: N = 256 M = 3 ψ = rand(N) fft!(ψ) f…

---

## [What scaling applies to the irfft (inverse fast fourier transform - FFTW.jl package)](https://discourse.julialang.org/t/what-scaling-applies-to-the-irfft-inverse-fast-fourier-transform-fftw-jl-package/47476)

<div class="topic-metadata">

**Author:** [@jleman](https://discourse.julialang.org/u/jleman)\
**Replies:** 4\
**Last updated:** [September 29, 2020, 5:28pm UTC](https://discourse.julialang.org/t/what-scaling-applies-to-the-irfft-inverse-fast-fourier-transform-fftw-jl-package/47476 "2020-09-29T17:28:37Z")

</div>

I am trying to understand scaling of the irfft function of the FFTW.jl package. I have a function that defines a continuous frequency domain signal (in radians). The complex portion of the signal has odd symmetry and t…

[Previous page](https://discourse.julialang.org/tag/fftw/19.md?match_all_tags=true&page=1&tags%5B%5D=fftw)

[Next page](https://discourse.julialang.org/tag/fftw/19.md?match_all_tags=true&page=3&tags%5B%5D=fftw)
