When the spectral lines are very narrow, or if the spectrum is non-zero at the edges, the FFT-based convolution approach from fieldmod results in Gibbs wiggles.
B = linspace(200,400,1000);
spc = zeros(1,numel(B));
spc(500) = 1;
fieldmod(B,spc,1)
spc = ones(1,numel(B));
fieldmod(B,spc,1)
To fix this, improve the FFT approach, or implement a direct convolution without FFT. Both could be supported via an option.
When the spectral lines are very narrow, or if the spectrum is non-zero at the edges, the FFT-based convolution approach from
fieldmodresults in Gibbs wiggles.To fix this, improve the FFT approach, or implement a direct convolution without FFT. Both could be supported via an option.