Automatic choice of the parameter in a smoothing method of Fourier polynomials