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#include <limits>
53
54//=============================================================================================================
55// DEFINE NAMESPACE UTILSLIB
56//=============================================================================================================
57
58namespace UTILSLIB
59{
60
61//=============================================================================================================
68{
69 double dMinHeight = -std::numeric_limits<double>::infinity();
70 int iMinDistance = 1;
71 double dProminence = 0.0;
72};
73
74//=============================================================================================================
86DSPSHARED_EXPORT QList<QPair<int, double>> peakFinder(const Eigen::VectorXd& data,
87 const PeakFinderParams& params = PeakFinderParams());
88
89//=============================================================================================================
101DSPSHARED_EXPORT Eigen::VectorXd peakProminences(const Eigen::VectorXd& data,
102 const QList<int>& peakIndices);
103
116DSPSHARED_EXPORT QList<QPair<int, double>> peakFinderMne(const Eigen::VectorXd& data,
117 double thresh = std::numeric_limits<double>::quiet_NaN(),
118 int extrema = 1);
119
120} // namespace UTILSLIB
121
122#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.
DSPSHARED_EXPORT QList< QPair< int, double > > peakFinderMne(const Eigen::VectorXd &data, double thresh=std::numeric_limits< double >::quiet_NaN(), int extrema=1)
Noise-tolerant extrema search of mne.preprocessing.peak_finder.