JuliaArrays / ShiftedArrays.jl

Lazy shifted arrays for data analysis in Julia
Other
50 stars 10 forks source link

Support for FFT Shifts | `fftshifted` & `ifftshifted` #43

Closed roflmaostc closed 3 years ago

roflmaostc commented 3 years ago

Hey,

is there any possibility that we can include something like a ShiftedArray.fftshift or ShiftedArray.ifftshift. It would be a convenient wrapper to call fftshift and ifftshift but prevent the allocation of memory.

There might be some performance issues when accidentally providing a ShiftedArrray to a fft but I'm not sure and we might discuss such issues?

If you support that idea we can help adding that :)

Thanks,

Felix

piever commented 3 years ago

Hey, it looks like it would be dependency-free to add it, so a PR is definitely welcome.

There might be some performance issues when accidentally providing a ShiftedArrrayto a fft but I'm not sure and we might discuss such issues?

In the end AFAIU fft is done by a C library, so I think the CircShiftedArray will have to be converted to a standard layout, and then the same C routine would be called.

roflmaostc commented 3 years ago

OK cool 😎 I'll prepare a PR for that!

roflmaostc commented 3 years ago

Thanks a lot for your help and sorry for the slight mess :upside_down_face: