MikaelSlevinsky / SincFun.jl

Sinc numerical methods in Julia
Other
3 stars 0 forks source link

Simplify the sincfun constructor #4

Closed MikaelSlevinsky closed 9 years ago

MikaelSlevinsky commented 9 years ago

1) There's probably too much data in it. 2) There needs to be a way to determine how to truncate the coefficients. In the Matlab single-exponential sincfun, the fft on the sample points is taken and the analogy is drawn to the exponential decay of the function in Fourier space. With DE decay, does this translate to a DE-decaying Fourier transform?

MikaelSlevinsky commented 9 years ago

Part I is solved with @9bf6a16.

MikaelSlevinsky commented 9 years ago

Part II is solved with @1fd2878989d0305d91f1364cfc0917a6a51345d7 and @3104a8b0084c21241dba85352a9e8bfb9ffeffe7.

The fft-based algorithm cannot discern coefficients that are smaller than eps(T). Therefore, it is not useful in this setting and would be expensive in BigFloat.

The approach taken here is to consider the amount that the function contributes to the integration. If it's negligible ( < ωscale*eps(T)^2), then it won't contribute to the last digit of the integral, which is a good measure of a sincfun's convergence.

To make this work, the envelope coefficients and function also had to be rescaled to be roughly eps(T) at its ends, and ωscale in the middle.