Vespucci  1.0.0
peakfinding.h
Go to the documentation of this file.
1 /*******************************************************************************
2  Copyright (C) 2014-2016 Wright State University - All Rights Reserved
3  Daniel P. Foose - Maintainer/Lead Developer
4 
5  This file is part of Vespucci.
6 
7  Vespucci is free software: you can redistribute it and/or modify
8  it under the terms of the GNU General Public License as published by
9  the Free Software Foundation, either version 3 of the License, or
10  (at your option) any later version.
11 
12  Vespucci is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with Vespucci. If not, see <http://www.gnu.org/licenses/>.
19 *******************************************************************************/
20 #ifndef PEAKFINDING_H
21 #define PEAKFINDING_H
22 #if !defined( SWIG )
23  // SWIG should not see #inlcude<armadillo> as it can not handle it
24  #include "Math/VespucciMath.h"
25  #include "Global/libvespucci.h"
26 #endif
27 namespace Vespucci
28 {
29  namespace Math
30  {
31  //Peak detection (SPF)
36  namespace PeakFinding
37  {
38 
39  VESPUCCI_EXPORT arma::vec FindPeaks(arma::vec X, arma::vec dX,
40  double sel,
41  double threshold,
42  arma::vec &peak_magnitudes);
43 
44  VESPUCCI_EXPORT arma::uvec FindPeakPositions(arma::vec X, arma::vec dX,
45  double sel,
46  double threshold,
47  arma::uvec &local_minima);
48 
49  VESPUCCI_EXPORT arma::mat FindPeaksMat(arma::mat X,
50  double sel,
51  double threshold,
52  arma::uword poly_order, arma::uword window_size,
53  arma::mat &peak_magnitudes);
54 
55 
56  VESPUCCI_EXPORT arma::vec EstimateBaseline(arma::vec X,
57  arma::umat peaks,
58  arma::uword window_size);
59  VESPUCCI_EXPORT arma::umat FindPeakPositions(arma::vec X, arma::vec dX,
60  double threshold,
61  std::string threshold_method,
62  arma::vec &peak_magnitudes);
63  VESPUCCI_EXPORT arma::vec PeakPopulation(arma::uword vector_size, arma::umat peak_positions);
64  VESPUCCI_EXPORT arma::vec PeakExtrema(arma::uword vector_size, arma::umat peak_positions);
65 
66  }
67  }
68 }
69 #endif // PEAKFINDING_H
VESPUCCI_EXPORT arma::vec PeakExtrema(arma::uword vector_size, arma::umat peak_positions)
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...
Definition: peakfinding.cpp:44
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.
#define VESPUCCI_EXPORT
Definition: libvespucci.h:7
VESPUCCI_EXPORT arma::vec PeakPopulation(arma::uword vector_size, arma::umat peak_positions)
VESPUCCI_EXPORT arma::vec EstimateBaseline(arma::vec X, arma::umat peaks, arma::uword window_size)
EstimateBaseline.
A namespace for "global" functions, including math functions.
VESPUCCI_EXPORT arma::uvec FindPeakPositions(arma::vec X, arma::vec dX, double sel, double threshold, arma::uvec &local_minima)