CS-SI / SIRIUS

Sirius - Fast and simple to plug-in C++ resampling library that is taking advantage of the Fourier Transform
https://cs-si.github.io/SIRIUS/html/Sirius.html
GNU General Public License v3.0
6 stars 5 forks source link

Improve the spectral periodization #28

Open savmickael opened 6 years ago

dumasl commented 6 years ago

As the doc says the periodization is to be used with a low pass filter (user kernel interpolator). Otherwise (zero padding to enlarge the spectral domain), the user kernel interpolator is actually convolve with a sinc interpolator which is not what the user wants.

We are using periodization then because this solution provides us some continuity in spectral domain when increasing the number of frequencies by a factor N. The problem is if the user kernel interpolator is actually not a good low pass filter (say it has rebounds) then some high frequencies coming from the periodization might be kept by these rebounds. I remember having read a paper on variational method to emulate what the spectrum should actually be if we enlarge its domain. I shall try to look for it but in the mean time there are some tests that could be done on the periodization to try to lesser the magnitude of the added frequencies so that if there are rebounds they will only kept small frequencies. Or we could decide to remove the rebounds but it comes with a sinc convolution in spatial domain so we want to only cut the far away rebound (high frequency) so that the sinc convolution is as close as possible to a dirac convolution.