[Scilab-users] Re : fftshift and ifftshift are way too different

Samuel Gougeon sgougeon at free.fr
Wed Oct 10 08:47:29 CEST 2018


Le 09/10/2018 à 21:52, antoine monmayrant a écrit :
> Hello Samuel,
>
> Sorry I might not have made myself clear: fft and fftshift provide the 
> ability to perform transform along only one of the dimensions of a 
> multidimensional array.
> Something like S(x,y,z) --[FFT along 3rd dim]--> 
> ffthift(ffft(S(x,y,z), -1,3),3)=Ŝ(x,y,kz).
> In that case, you need to perform fft and eventually fftshift along 
> only the dimension of the transform.
> ifftshift should also provide the same possibility to perform the 
> inverse transform: Ŝ(x,y,kz) --[IFFT along 3rd dim]--> 
> iffthift(ffft(Ŝ(x,y,kz), +1,3),3)=S(x,y,z).
>
> This is a basic signal processing requirement in my field.

Hello Antoine,

Yes, you are right: in case of directional FFT and odd number of 
elements along the chosen direction, ifftshift can't presently be used.
Could you please post the same remark on bugzilla? This bug/wish is not 
yet reported.

IMO we may propose and include it in Scilab as soon as for Scilab 6.0.2.

BTW, still IMO, fftshift and ifftshift should rather be merged in a 
single function.
It's the same code, except a floor<=>ceil. This should deserve just an 
option, not a separate dedicated function.
I guess that this separation likely comes from a kind of abusive 
Matlab-like mimicry.

Best regards
Samuel




More information about the users mailing list