NFFT / nfft

The official NFFT library repository
https://tu-chemnitz.de/~potts/nfft/
GNU General Public License v2.0
174 stars 46 forks source link

Only one LUT for all Dimensions (PRE_LIN_PSI) #134

Closed tknopp closed 2 years ago

tknopp commented 2 years ago

Hi,

probably, I am missing something but IMHO the look up table calculated here

https://github.com/NFFT/nfft/blob/develop/kernel/nfft/nfft.c#L5776

is redundant, i.e. the same for all dimensions. This is because the argument is multiplied with n[t] which cancels out in PHI.

I just tried this out over at NFFT.jl and it just worked. Here is the important piece: https://github.com/JuliaMath/NFFT.jl/blob/master/src/precomputation.jl#L199 Compared to the previous implementation I removed the n[t] from step and call PHI with n=1.

Cheers,

Tobi

michaelquellmalz commented 2 years ago

Usually, it gives contains the same values in each dimension, except for the case that the oversampling factor sigma (and thus the kernel shape parameter b) is different for each dimension, see the definition of PHI

https://github.com/NFFT/nfft/blob/develop/include/infft.h#L209

This seems to be a very rare case, though.

tknopp commented 2 years ago

Ah, yes, good point. Missed that use case.