classPiiPeakDetector
#include <PiiPeakDetector.h>
Detect peaks in noisy data.
Inherits PiiDefaultOperation
Description
See PiiDsp::findPeaks() for a detailed description of function.
Inputs
Outputs
Properties
|
int
|
The width of a moving average window used for compensation against level changes. |
|
double
|
Mimimum value for a measurement to be regarded as a peak. |
|
double
|
Minimum relative value of the second derivative that will trigger peak detection. |
|
int
|
Width of a smoothing window that will be applied to the derivative before peak detection. |
|
int
|
Number of measurements considered in fitting a local parabola for accurate peak position. |
Constructors and destructor
|
( )
|
Public member functions
|
int
|
|
|
double
|
( )
|
|
void
|
(
|
|
void
|
(
|
|
void
|
(
|
|
void
|
(
|
|
void
|
(
|
|
double
|
|
|
int
|
( )
|
|
int
|
( )
|
Protected member functions
|
virtual void
|
( )
Executes one round of processing. |
Property details
-
int levelCorrectionWindow
[read, write]The width of a moving average window used for compensation against level changes.
If set to a value larger than one, the input signal will be divided by its moving average, calculated over this many elements. The default value is 0.
-
double levelThreshold
[read, write]Mimimum value for a measurement to be regarded as a peak.
The default value is 0.
-
double sharpnessThreshold
[read, write]Minimum relative value of the second derivative that will trigger peak detection.
The default value is 0.001.
-
int smoothWidth
[read, write]Width of a smoothing window that will be applied to the derivative before peak detection.
The default value is 5.
-
int windowWidth
[read, write]Number of measurements considered in fitting a local parabola for accurate peak position.
The default value is 7.
Function details
-
PiiPeakDetector
() -
int levelCorrectionWindow
() -
double levelThreshold
() -
void setLevelCorrectionWindow
(- int levelCorrectionWindow
-
void setLevelThreshold
(- double levelThreshold
-
void setSharpnessThreshold
(- double sharpnessThreshold
-
void setSmoothWidth
(- int smoothWidth
-
void setWindowWidth
(- int windowWidth
-
double sharpnessThreshold
() -
int smoothWidth
() -
int windowWidth
() -
virtual void process
()[protected, virtual]Executes one round of processing.
This function is invoked by the processor if the necessary preconditions for a new processing round are met. This function does all the necessary calculations to create output objects and sends them to output sockets.
Calls to process(), syncEvent(), and setProperty() are synchronized and cannot occur simultaneously. PiiDefaultOperation ensures this by locking processLock() for reading before calling process().
Note: With time-consuming operations, one should occasionally check that the operation hasn't been interrupted, i.e. that state() returns
Running.Exceptions
- PiiExecutionException
-
whenever an unrecoverable error occurs during a processing round, the operation is interrupted, or finishes execution due to end of input data.
Reimplemented from PiiDefaultOperation.
Add a note
Not a single note added yet. Be the first, add yours.