|
VESPUCCI_EXPORT arma::uvec | FindPeakCenters (const arma::vec &signal, const arma::vec &abscissa, std::list< arma::umat > &ridges, arma::uword first_scale, arma::uword last_scale, arma::uword search_window, arma::uword min_length, arma::uword max_gap, const std::string &max_method) |
|
VESPUCCI_EXPORT arma::vec | DerivGaussKernel (double abscissa_step, arma::uword window_size, arma::uword width, double height) |
|
VESPUCCI_EXPORT arma::vec | MexicanHatKernel (double abscissa_step, arma::uword window_size, arma::uword width, double height) |
|
VESPUCCI_EXPORT arma::uvec | FindIntercepts (const arma::vec &signal) |
|
VESPUCCI_EXPORT arma::vec | FindPeaks (arma::vec X, arma::vec dX, double sel, double threshold, arma::vec &peak_magnitudes) |
| Vespucci::Math::PeakFinding::FindPeaks an implementation of the peakfinder arma::mat routine. More...
|
|
VESPUCCI_EXPORT arma::uvec | FindPeakPositions (arma::vec X, arma::vec dX, double sel, double threshold, arma::uvec &local_minima) |
|
VESPUCCI_EXPORT arma::mat | FindPeaksMat (arma::mat X, double sel, double threshold, arma::uword poly_order, arma::uword window_size, arma::mat &peak_magnitudes) |
| Vespucci::Math::PeakFinding::FindPeaksMat Performs FindPeaks on a spectra arma::matrix. More...
|
|
VESPUCCI_EXPORT arma::vec | EstimateBaseline (arma::vec X, arma::umat peaks, arma::uword window_size) |
| EstimateBaseline. More...
|
|
VESPUCCI_EXPORT arma::umat | FindPeakPositions (arma::vec X, arma::vec dX, double threshold, std::string threshold_method, arma::vec &peak_magnitudes) |
| Vespucci::Math::PeakFinding::FindPeakPositions. More...
|
|
VESPUCCI_EXPORT arma::vec | PeakPopulation (arma::uword vector_size, arma::umat peak_positions) |
|
VESPUCCI_EXPORT arma::vec | PeakExtrema (arma::uword vector_size, arma::umat peak_positions) |
|
A namespace for math functions relating to peak detection and counting.
arma::umat Vespucci::Math::PeakFinding::FindPeakPositions |
( |
arma::vec |
X, |
|
|
arma::vec |
dX, |
|
|
double |
threshold, |
|
|
std::string |
threshold_method, |
|
|
arma::vec & |
peak_magnitudes |
|
) |
| |
Vespucci::Math::PeakFinding::FindPeakPositions.
- Parameters
-
X | |
dX | A buffered first derivative (same size of X with value of X(i) equal to the derivative of X at i. Taken as a parameter incase a smoothed derivative is to be used |
threshold | A value for threshold of significance. Depending on type |
threshold_method | Describes the method to be used (see below) |
- Returns
- A arma::umat in which each row represents a peak. The first column contains indices of peak centers, the second column contains the left bound of the peak and the third column contains the right bound of the peak. A arma::matrix of this forarma::mat is the expected input for Vespucci::Math::PeakFinding::EstimateBaseline. The peak determination may be carried out on a transformed spectra (such as heavy S-G smoothing, kernel convolution or CWT) then EstimateBaseline called with these peak centers and the original spectrum. EstimateBaseline will then exclude the larger peaks from the baseline. Since EstimateBaseline uses a local minimum filter, smaller peaks will be retained while preventing wider peaks from being cut into by the filter.
threshold_method can be the following: "magnitude" - a minimum peak-height threshold, arbitrary double "count" - maximum number of peaks found, largest magnitude first (1 to many) "countpercentage" - largest percentage of all peaks found (0 to 1) "ratio" - ratio of largest magnitude (0 to 1)
Definition at line 201 of file peakfinding.cpp.