I have a question about using the Dirichlet kernel as a filter. Let us suppose that I have samples of a continuous function sampled with frequency $F_s=10 \,\texttt{Hz}$. The function is band-limited and the sampling frequency is well above the Nyquist frequency, but there is noise added to the data. I need a lowpass filter to remove all the high frequency components introduced by the noise above a certain frequency $B$.
My understanding is that $\text{sinc}(2Bt)$ would represent the ideal lowpass filter because computing its Fourier transform (FT) gives a rectangular frequency response of single-sided width $B$. However, this filter has an infinite duration in time and we need to truncate it. The abrupt truncation with a rectangular window causes unwanted Gibbs oscillations in the frequency domain and, consequently, we smooth the $\text{sinc}$ with an appropriate window instead to mitigate this problem.
However, because we implement all our calculations on machines, continuous functions are sampled and FT become Discrete Fourier transforms (DFT). Then, why don't we just use the Dirichlet kernel as the lowpass filter? Let's say that my filter has $N$ coefficients, with $N$ odd. The DFT will have spacing ${\Delta}f=F_s/N$. If I take $N_B$ as the nearest integer to $B/{\Delta}f$, then the Dirichlet kernel $D_n=\sin[{\pi}(2N_B+1)n/N]/\sin({\pi}n/N)$ will have a rectangular DFT with single-sided bandwidth given by $N_B{\Delta}f$. Of course, if I have $M$ samples of the input function, the output will have $M-(N-1)$ samples. It seems to me that $D_n$ is the ideal filter that we need. Am I wrong about this?
I know that $D_n$ tends to $\text{sinc}(2Bt)$ as $N$ goes to $\infty$. So I guess an issue related to my question is, for what value of $N$ is the discrete approximation to the continuous case good enough that we don't have to worry about it anymore? On the other hand, when we are limited to relatively small values of $N$ (for instance, if we don't want to exacerbate the data loss $M-(N-1)$), should we just do things as if everything were discrete or should we carry over results from the continuous case (like filtering with $\text{sinc}$ for example)?
Thank you in advance for your answers!