AdvancedPhotonSource / tike

Repository for ptychography software
http://tike.readthedocs.io
Other
29 stars 15 forks source link

Compare linear interpolation with Fourier interpolation in Ptycho operator #50

Open nikitinvv opened 4 years ago

nikitinvv commented 4 years ago

Currently, linear interpolation in the near plane domain is performed in order to handle floating-point scan positions. Another and accurate way of doing so is to perform shifts in the frequency domain. Say a scan position is given as s = si+sf where si is integer part and sf is floating part. We need to compute the Fourier transform of Q\psi(x+si+sf). By using Fourier properties, F(Q\psi(x+si+sf))(\xi)=F(Q\psi(x+si))(\xi) * exp(-2\pi i \xi sf), and the floating-point position problem boils down to multiplication in the frequency domain. It would be good to compare two approaches (linear interpolation and multiplication in the frequency domain) in terms of accuracy and performance on CPU and GPU.