This class represents a Gaussian lowpass-filter which works on uniform as well as on non-uniform profile data. More...
#include <OpenMS/FILTERING/SMOOTHING/GaussFilter.h>
Public Member Functions | |
| GaussFilter () | |
| Constructor. | |
| virtual | ~GaussFilter () |
| Destructor. | |
| template<typename PeakType > | |
| void | filter (MSSpectrum< PeakType > &spectrum) |
| Smoothes an MSSpectrum containing profile data. | |
| template<typename PeakType > | |
| void | filterExperiment (MSExperiment< PeakType > &map) |
| Smoothes an MSExperiment containing profile data. | |
Protected Member Functions | |
| virtual void | updateMembers_ () |
| This method is used to update extra member variables at the end of the setParameters() method. | |
| template<typename InputPeakIterator > | |
| DoubleReal | integrate_ (InputPeakIterator x, InputPeakIterator first, InputPeakIterator last) |
| Computes the convolution of the raw data at position x and the gaussian kernel. | |
Protected Attributes | |
| std::vector< DoubleReal > | coeffs_ |
| Coefficients. | |
| DoubleReal | sigma_ |
The standard derivation . | |
| DoubleReal | spacing_ |
| The spacing of the pre-tabulated kernel coefficients. | |
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
of the Gaussian-window with length
are calculated from the gaussian distribution
where
represents the window area and
is the standard derivation.
| Name | Type | Default | Restrictions | Description |
|---|---|---|---|---|
| gaussian_width | float | 0.2 | Use a gaussian filter width which has approximately the same width as your mass peaks (FWHM in m/z). | |
| ppm_tolerance | float | 10 | Gaussian width, depending on the m/z position. The higher the value, the wider the peak and therefore the wider the gaussian. |
|
| use_ppm_tolerance | string | false | true, false | If true, instead of the gaussian_width value, the ppm_tolerance is used. The gaussian is calculated in each step anew, so this is much slower. |
| GaussFilter | ( | ) |
Constructor.
| virtual ~GaussFilter | ( | ) | [virtual] |
Destructor.
| void filter | ( | MSSpectrum< PeakType > & | spectrum | ) | [inline] |
Smoothes an MSSpectrum containing profile data.
Convolutes the filter and the profile data and writes the result back to the spectrum.
| Exception::IllegalArgument | is thrown, if the gaussian_width parameter is too small. |
References MSSpectrum< PeakT >::getRT(), SpectrumSettings::RAWDATA, and SpectrumSettings::setType().
Referenced by EmgScoring::prepareFit_(), and FeatureFinderAlgorithmMRM< PeakType, FeatureType >::run().
| void filterExperiment | ( | MSExperiment< PeakType > & | map | ) | [inline] |
Smoothes an MSExperiment containing profile data.
| Exception::IllegalArgument | is thrown, if the gaussian_width parameter is too small. |
| DoubleReal integrate_ | ( | InputPeakIterator | x, | |
| InputPeakIterator | first, | |||
| InputPeakIterator | last | |||
| ) | [inline, protected] |
Computes the convolution of the raw data at position x and the gaussian kernel.
References OpenSwath::norm().
| virtual void updateMembers_ | ( | ) | [protected, virtual] |
This method is used to update extra member variables at the end of the setParameters() method.
Also call it at the end of the derived classes' copy constructor and assignment operator.
The default implementation is empty.
Reimplemented from DefaultParamHandler.
std::vector<DoubleReal> coeffs_ [protected] |
Coefficients.
DoubleReal sigma_ [protected] |
The standard derivation
.
DoubleReal spacing_ [protected] |
The spacing of the pre-tabulated kernel coefficients.
| OpenMS / TOPP release 1.10.0 | Documentation generated on Thu Mar 7 2013 09:42:53 using doxygen 1.7.1 |