v2.0.0
Loading...
Searching...
No Matches
peak_finder.h
Go to the documentation of this file.
1//=============================================================================================================
29
30#ifndef PEAK_FINDER_H
31#define PEAK_FINDER_H
32
33//=============================================================================================================
34// INCLUDES
35//=============================================================================================================
36
37#include "dsp_global.h"
38
39//=============================================================================================================
40// EIGEN INCLUDES
41//=============================================================================================================
42
43#include <Eigen/Core>
44
45//=============================================================================================================
46// QT INCLUDES
47//=============================================================================================================
48
49#include <QList>
50#include <QPair>
51
52//=============================================================================================================
53// DEFINE NAMESPACE UTILSLIB
54//=============================================================================================================
55
56namespace UTILSLIB
57{
58
59//=============================================================================================================
66{
67 double dMinHeight = -std::numeric_limits<double>::infinity();
68 int iMinDistance = 1;
69 double dProminence = 0.0;
70};
71
72//=============================================================================================================
84DSPSHARED_EXPORT QList<QPair<int, double>> peakFinder(const Eigen::VectorXd& data,
85 const PeakFinderParams& params = PeakFinderParams());
86
87//=============================================================================================================
99DSPSHARED_EXPORT Eigen::VectorXd peakProminences(const Eigen::VectorXd& data,
100 const QList<int>& peakIndices);
101
102} // namespace UTILSLIB
103
104#endif // PEAK_FINDER_H
Export/import macros and namespace declaration for the DSP library.
#define DSPSHARED_EXPORT
Definition dsp_global.h:50
Shared utilities (I/O helpers, spectral analysis, layout management, warp algorithms).
DSPSHARED_EXPORT QList< QPair< int, double > > peakFinder(const Eigen::VectorXd &data, const PeakFinderParams &params=PeakFinderParams())
Find peaks in a 1D signal.
DSPSHARED_EXPORT Eigen::VectorXd peakProminences(const Eigen::VectorXd &data, const QList< int > &peakIndices)
Compute prominence of each peak.