| OpenMS 2.5.0

Static Public Member Functions | List of all members
PeakTypeEstimator Class Reference
Format

Estimates if the data of a spectrum is raw data or peak data. More...

`#include <OpenMS/FORMAT/PeakTypeEstimator.h>`

## Static Public Member Functions

template<typename PeakConstIterator >
static SpectrumSettings::SpectrumType | estimateType (const PeakConstIterator &begin, const PeakConstIterator &end)
| Estimates the peak type of the peaks in the iterator range based on intensity characteristics of up to five maxima. More...

## Detailed Description

Estimates if the data of a spectrum is raw data or peak data.

## Member Function Documentation

## ◆ estimateType()

static SpectrumSettings::SpectrumType estimateType | ( | const PeakConstIterator & | begin,
|  | const PeakConstIterator & | end
| ) |  |

inline static

Estimates the peak type of the peaks in the iterator range based on intensity characteristics of up to five maxima.

We estimate profile vs. centroided by looking at highest five peaks in the spectrum. If at least two neighbouring sampling points to either side of a local maximum are found within 1 Th, the peak is considered a profile peak. The intensities need to decline on both shoulders.

All sampling points successfully assigned as shoulder points are not considered for searching the next highest peak (except local minima at the end of a shoulder, which can be used for shoulders from left and right).

If 5 peaks or 50% of total spectral intensity has been looked at, we compare the number of peaks hithero classified as centroided (C) vs profile (P). If P / (C+P) > 0.75, the spectrum is considered profile; centroided otherwise.

Note
  if there are less than 5 peaks in the iterator range SpectrumSettings::UNKNOWN is returned

References SpectrumSettings::CENTROID, SpectrumSettings::PROFILE, and SpectrumSettings::UNKNOWN.