OpenMS
|
This class represents a Gaussian lowpass-filter which works on uniform as well as on non-uniform profile data. More...
#include <OpenMS/FILTERING/SMOOTHING/GaussFilterAlgorithm.h>
Public Member Functions | |
GaussFilterAlgorithm () | |
Constructor. More... | |
virtual | ~GaussFilterAlgorithm () |
Destructor. More... | |
bool | filter (OpenMS::Interfaces::SpectrumPtr spectrum) |
Smoothes an Spectrum containing profile data. More... | |
bool | filter (OpenMS::Interfaces::ChromatogramPtr chromatogram) |
Smoothes an Chromatogram containing profile data. More... | |
template<typename ConstIterT , typename IterT > | |
bool | filter (ConstIterT mz_in_start, ConstIterT mz_in_end, ConstIterT int_in_start, IterT mz_out, IterT int_out) |
Smoothes two data arrays. More... | |
void | initialize (double gaussian_width, double spacing, double ppm_tolerance, bool use_ppm_tolerance) |
Protected Member Functions | |
template<typename InputPeakIterator > | |
double | integrate_ (InputPeakIterator x, InputPeakIterator y, InputPeakIterator first, InputPeakIterator last) |
Computes the convolution of the raw data at position x and the gaussian kernel. More... | |
Protected Attributes | |
std::vector< double > | coeffs_ |
Coefficients. More... | |
double | sigma_ |
The standard derivation \( \sigma \). More... | |
double | spacing_ |
The spacing of the pre-tabulated kernel coefficients. More... | |
bool | use_ppm_tolerance_ |
double | ppm_tolerance_ |
This class represents a Gaussian lowpass-filter which works on uniform as well as on non-uniform profile data.
Gaussian filters are important in many signal processing, image processing, and communication applications. These filters are characterized by narrow bandwidths, sharp cutoffs, and low passband ripple. A key feature of Gaussian filters is that the Fourier transform of a Gaussian is also a Gaussian, so the filter has the same response shape in both the time and frequency domains. The coefficients \( \emph{coeffs} \) of the Gaussian-window with length \( \emph{frameSize} \) are calculated from the gaussian distribution
\[ \emph{coeff}(x) = \frac{1}{\sigma \sqrt{2\pi}} e^{\frac{-x^2}{2\sigma^2}} \]
where \( x=[-\frac{frameSize}{2},...,\frac{frameSize}{2}] \) represents the window area and \( \sigma \) is the standard derivation.
Constructor.
|
virtual |
Destructor.
|
inline |
Smoothes two data arrays.
Convolutes the filter and the profile data and writes the results into the output iterators mz_out and int_out.
References OpenMS::Math::ppmToMass().
|
inline |
Smoothes an Chromatogram containing profile data.
|
inline |
Smoothes an Spectrum containing profile data.
void initialize | ( | double | gaussian_width, |
double | spacing, | ||
double | ppm_tolerance, | ||
bool | use_ppm_tolerance | ||
) |
|
inlineprotected |
Computes the convolution of the raw data at position x and the gaussian kernel.
References OpenSwath::norm().
|
protected |
Coefficients.
|
protected |
|
protected |
The standard derivation \( \sigma \).
|
protected |
The spacing of the pre-tabulated kernel coefficients.
|
protected |