Dip test

A first crude approach

The flag fs=2 is detected on the observation A(t2), the previous value A(t1) is also flagged fs=2, and the next previous value A(t0) is flagged fs=1.

Set fs=9 on A(t1) if | A(t2) - A(t0) | < | A(t1) - A(t0) |

A(t1) receives a corrected value by interpolation. The interpolation method can be linear or by Akima algorithm.