An extra argument 'removeOrSaturate' controls whether points are removed completely (and the left-overs concatenated) or their values are saturated (replaced with a threshold value).
I haven't added saturation for the 'random' (that wouldn't make sense?) or 'absclose' (maybe to the nearest threshold?) remove methods, but I can if there's a way you'd like those to work.
Also, the 'ac1' features in DN_RemovePoints look like they might be using acf(0) (so 'ac1rat' always gives 1, and 'ac1diff' 0); if that's an issue then maybe on the fifth last line (in 'SUB_acf'):
acf(i) = CO_AutoCorr(x,i-1,'Fourier');
could be:\
acf(i) = CO_AutoCorr(x,i,'Fourier');
An extra argument 'removeOrSaturate' controls whether points are removed completely (and the left-overs concatenated) or their values are saturated (replaced with a threshold value).
I haven't added saturation for the 'random' (that wouldn't make sense?) or 'absclose' (maybe to the nearest threshold?) remove methods, but I can if there's a way you'd like those to work.
Also, the 'ac1' features in DN_RemovePoints look like they might be using acf(0) (so 'ac1rat' always gives 1, and 'ac1diff' 0); if that's an issue then maybe on the fifth last line (in 'SUB_acf'):
acf(i) = CO_AutoCorr(x,i-1,'Fourier');
could be:\acf(i) = CO_AutoCorr(x,i,'Fourier');
Brendan
E.g.
DN_RemovePoints(x, 'absfar', 0.4, 1)