# Which filter is the most suitable if I know points with zero noise amplitude

I've got observed data $Y_1,\ldots, Y_n$ which consists of real values $X_1,\ldots, X_n$ and additive high-frequency noise $e_1,\ldots, e_n$, so $Y_i=X_i+e_i$. I know, that indicies $i_1,\ldots, i_m, m<n$, refer to those samples in which $e_j=0$ if $j\in(i_1,\ldots,i_m)$.

I'm trying to implement baseline detecting using that information about points which should have zero amplitude of noise. The filter should has a $Y$ series as input, and it should has output $Z$ like the follows: $Z$ - filtered data without high-frequency noise with $Z_j=Y_j$ if $j\in(i_1,\ldots,i_m)$. That is not strict limitation so it could be $Z_j\approx Y_j$

Which filters could I use for that purposes? I've seen cubic splines, which interpolate baseline by that points, but they are strictly depend on them, since I want filter to be able working even without points but with using them for correction.

-
I think some more information is needed. First, you seem to have n points consisting of data plus additive noise. Somehow you know that the additive noise is zero for some of the points. However you are using the same index n for both of these series. I think you need to redefine the index of the points with zero noise, e.g. m where, presumably m<n. As for a filter, a better description of the input and expected output of this filter is needed. – Barry Oct 29 '12 at 0:19
@Barry thanks, using index n for both of series was not correct, I've updated question. Also, I wrote expected results of filter – medvedNick Oct 29 '12 at 0:45