|
|
| SpikeDetector (unsigned int nchannels, double threshold, unsigned int peak_life_time, SpikeDetectionSign sign=SpikeDetectionSign::UP) |
|
void | reset () |
|
unsigned int | nchannels () const |
|
double | threshold () const |
|
void | set_threshold (double value) |
|
unsigned int | peak_life_time () const |
|
void | set_peak_life_time (unsigned int value) |
|
uint64_t | timestamp_detected_spike () const |
|
const std::vector< double > & | amplitudes_detected_spike () const |
| template<typename ForwardIterator> |
| bool | is_spike (const uint64_t timestamp, const ForwardIterator sample) |
|
bool | is_spike (const uint64_t timestamp, const std::vector< double > &sample) |
|
uint64_t | nspikes () const |
◆ is_spike()
template<typename ForwardIterator>
| bool dsp::algorithms::SpikeDetector::is_spike |
( |
const uint64_t | timestamp, |
|
|
const ForwardIterator | sample ) |
|
inline |
Spike detection algorithm:
- operates sample by sample
- looks for upwards or downward (depending of the sign mode selected) deflections in at least one of the channels above a certain threshold
- a spike is detected if the signal of at least one channel crosses the threshold and a local maxima is found in at least one channel (not necessarily the same of that of threshold crossing) within a certain duration (determined by the peak lifetime)
- the timestamp of the detected spike corresponds to that one of the first sample that crossed the threshold first (independently on whether that sample belongs to the current or previous buffers)
- in case a proper maximum is found on all channels, the peak values are returned, together with the threshold-crossing timestamp; however, if on one or more channels no peaks were found, the values of the signals at the threshold-crossing sample will be returned.
The documentation for this class was generated from the following files:
- extensions/falcon-fklab-extensions/lib/dsp/algorithms.hpp
- extensions/falcon-fklab-extensions/lib/dsp/algorithms.cpp