Hi Pat,
You will need to make sure that the maximum interpolation is less than the data being removed or else the data will be interpolated through the gaps. You can set the maximum interpolation in the formula as well by adding a .setmaxinterpolation(<time>) at the end.