# How to filter out noise from non-stationary signal

I have this non-stationary signal.

the mean is roughly constant but the second moment (autocorrelation) does not depend only on the time lag $$tau$$. Correct me if I am wrong in the above statement.

Anyway as you see I have high frequency noise components and I would like to clean it but avoiding any sort of phase lag introduced by a filter. What can I do to achive my purpose? I thought of using wavelets to extract the coefficients and then reconstruct the signal, but maybe there is a more efficient and correct way of doing it.

Can you also provide with a link/guide to code this in python?

1. Break your signal into short overlapping frames over which it is stationary. Say, the length of the frame is $$L$$ samples. You can window it to smooth out discontinuities. For example, you can use a Hann window with an overlap of $$L/2$$ samples.
2. On each windowed frame, use the Wiener filter to find the optimal inverse filter coefficients to cancel your noise. See scipy.signal.wiener.