How do i get frequency using reikna?

Skip to first unread message

Feb 13, 2017, 6:45:12 PM2/13/17
to reikna
In numpy, i can get frequency by using np.fft.fftfreq method.

Those reikna perform FFT using np.fft.fftfreq?

If it is not, how can i get it?

what i want to calculate in gpu is,

1j * 2pi * freq * FFT(f(t))

Feb 14, 2017, 4:19:36 AM2/14/17
to reikna
i check that

fft = np.fft.fftn
ifft = np.fft.ifftn
freq = np.fft.fftfreq

1j * 2pi * freq * fft(f(t))

in cpu is different from that of gpu. (f(t) is some time dependent function)

how can i get same result by using gpu?

Bogdan Opanchuk

Feb 14, 2017, 6:41:47 PM2/14/17
to reikna
Reikna's FFT is supposed to produce results identical to numpy.fft.fftn(). In particular, it means that you can use fftfreq() from numpy to get the frequencies. Perhaps it would be useful to add a computation that produces the same values, but currently you have to just copy that array to GPU.

Regarding your second question, I do not quite understand what the problem is. Could you post a script that reproduces it?

Feb 14, 2017, 7:55:23 PM2/14/17
to reikna
if the result of fft using reikna is same as np.fft.ffn , the problem is solved.

Thank you very much, I need to correct my code... since two results are different in my code...anyway thank you again.

Reply all
Reply to author
0 new messages