Bag of Tricks for Denoising Signals While Maintaining Sharp Transitions
L1 norm minimization (compressed sensing) can do a relative better job than conventional Fourier denoising in terms of preserving edges.

The procedure is to minimize an objective function

$$
    |x-y|^2 + b|f(y)|
$$

where $x$ is the noisy signal, $y$ is the denoised signal, $b$ is the regularziation parameter, and $|f(y)|$ is some L1 norm penalty. Denoising is accomplished by finding the solution $y$ to this optimization problem, and $b$ depends on the noise level.

To preserve edges, depending on the signal $y$, you can choose different penalties such that $f(y)$ is sparse (the spirit of compressed sensing):


if $y$ is piece-wise, $f(y)$ can be total variation (TV) penalty;
if $y$ is curve-like (e.g. Sinogram), $f(y)$ can be the expansion coefficients of $y$ with respect to curvelets. (This is for 2D/3D signals, not 1D);
if $y$ has isotropic singularities (edges), $f(y)$ can be the expansion coefficients of $y$ with respect to wavelets.


When $f(y)$ is the the expansion coefficients with respect to some basis functions (like curvelet/wavelet above), solving the optimization problem is equivalent to thresholding the expansion coefficients.

Note this approach can also be applied to deconvolution in which the objective function becomes to $|x-Hy|+ b|f(y)|$, where $H$ is the convolution operator.