v2.0.0
Loading...
Searching...
No Matches
annotate_artifact.h
Go to the documentation of this file.
1//=============================================================================================================
31
32#ifndef ANNOTATE_ARTIFACT_DSP_H
33#define ANNOTATE_ARTIFACT_DSP_H
34
35//=============================================================================================================
36// INCLUDES
37//=============================================================================================================
38
39#include "dsp_global.h"
41
42//=============================================================================================================
43// EIGEN INCLUDES
44//=============================================================================================================
45
46#include <Eigen/Core>
47
48//=============================================================================================================
49// QT INCLUDES
50//=============================================================================================================
51
52#include <QString>
53#include <QStringList>
54
55//=============================================================================================================
56// STL INCLUDES
57//=============================================================================================================
58
59#include <limits>
60#include <optional>
61
62//=============================================================================================================
63// FORWARD DECLARATIONS
64//=============================================================================================================
65
66namespace FIFFLIB
67{
68class FiffInfo;
69}
70
71//=============================================================================================================
72// DEFINE NAMESPACE UTILSLIB
73//=============================================================================================================
74
75namespace UTILSLIB
76{
77
78//=============================================================================================================
85{
86 double dThreshold = 4.0;
87 double dFilterLow = 110.0;
88 double dFilterHigh = 140.0;
89 double dMinLengthGood = 0.1;
90};
91
92//=============================================================================================================
99{
100 std::optional<double> peak;
101 std::optional<double> flat;
102 double dBadPercent = 5.0;
103 double dMinDuration = 0.005;
104};
105
106//=============================================================================================================
126 const Eigen::MatrixXd& data,
127 const FIFFLIB::FiffInfo& info,
128 double sfreq,
130 Eigen::RowVectorXd* scores = nullptr);
131
132//=============================================================================================================
151 const Eigen::MatrixXd& data,
152 const FIFFLIB::FiffInfo& info,
153 double sfreq,
154 const AnnotateAmplitudeParams& params,
155 QStringList* bads = nullptr);
156
157} // namespace UTILSLIB
158#endif // ANNOTATE_ARTIFACT_DSP_H
FIFF / MNE annotations: time-tagged textual marks (BAD_*, EDGE, custom) with onset,...
Export/import macros and namespace declaration for the DSP library.
#define DSPSHARED_EXPORT
Definition dsp_global.h:50
FIFF file I/O, in-memory data structures and high-level readers/writers.
Shared utilities (I/O helpers, spectral analysis, layout management, warp algorithms).
DSPSHARED_EXPORT FIFFLIB::FiffAnnotations annotateMusclZscore(const Eigen::MatrixXd &data, const FIFFLIB::FiffInfo &info, double sfreq, const AnnotateMusclParams &params=AnnotateMusclParams(), Eigen::RowVectorXd *scores=nullptr)
Detect muscle artifacts via high-frequency z-score and annotate bad segments.
DSPSHARED_EXPORT FIFFLIB::FiffAnnotations annotateAmplitude(const Eigen::MatrixXd &data, const FIFFLIB::FiffInfo &info, double sfreq, const AnnotateAmplitudeParams &params, QStringList *bads=nullptr)
Annotate spans where consecutive samples jump or stay flat, as mne.preprocessing.annotate_amplitude.
Parameters for muscle artifact annotation.
Parameters for amplitude-based annotation.
Container for FiffAnnotation entries with FIFF, JSON and CSV serializers.
Full FIFF measurement info: per-channel descriptors, sampling and filter setup, projectors,...
Definition fiff_info.h:90