v2.0.0
Loading...
Searching...
No Matches
peak_finder.h
Go to the documentation of this file.
1//=============================================================================================================
27
28#ifndef PEAK_FINDER_H
29#define PEAK_FINDER_H
30
31//=============================================================================================================
32// INCLUDES
33//=============================================================================================================
34
35#include "dsp_global.h"
36
37//=============================================================================================================
38// EIGEN INCLUDES
39//=============================================================================================================
40
41#include <Eigen/Core>
42
43//=============================================================================================================
44// QT INCLUDES
45//=============================================================================================================
46
47#include <QList>
48#include <QPair>
49
50//=============================================================================================================
51// DEFINE NAMESPACE UTILSLIB
52//=============================================================================================================
53
54namespace UTILSLIB {
55
56//=============================================================================================================
61{
62 double dMinHeight = -std::numeric_limits<double>::infinity();
63 int iMinDistance = 1;
64 double dProminence = 0.0;
65};
66
67//=============================================================================================================
79DSPSHARED_EXPORT QList<QPair<int,double>> peakFinder(const Eigen::VectorXd& data,
80 const PeakFinderParams& params = PeakFinderParams());
81
82//=============================================================================================================
94DSPSHARED_EXPORT Eigen::VectorXd peakProminences(const Eigen::VectorXd& data,
95 const QList<int>& peakIndices);
96
97} // namespace UTILSLIB
98
99#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.