Detect EOG related components using correlation. Detection is based on Pearson correlation between the filtered data and the filtered EOG channel. Thresholding is based on adaptive z-scoring. The above threshold components will be masked and the z-score will be recom
(
self,
inst,
ch_name=None,
threshold=3.0,
start=None,
stop=None,
l_freq=1,
h_freq=10,
reject_by_annotation=True,
measure="zscore",
verbose=None,
)
| 2079 | |
| 2080 | @verbose |
| 2081 | def find_bads_eog( |
| 2082 | self, |
| 2083 | inst, |
| 2084 | ch_name=None, |
| 2085 | threshold=3.0, |
| 2086 | start=None, |
| 2087 | stop=None, |
| 2088 | l_freq=1, |
| 2089 | h_freq=10, |
| 2090 | reject_by_annotation=True, |
| 2091 | measure="zscore", |
| 2092 | verbose=None, |
| 2093 | ): |
| 2094 | """Detect EOG related components using correlation. |
| 2095 | |
| 2096 | Detection is based on Pearson correlation between the |
| 2097 | filtered data and the filtered EOG channel. |
| 2098 | Thresholding is based on adaptive z-scoring. The above threshold |
| 2099 | components will be masked and the z-score will be recomputed |
| 2100 | until no supra-threshold component remains. |
| 2101 | |
| 2102 | Parameters |
| 2103 | ---------- |
| 2104 | inst : instance of Raw, Epochs or Evoked |
| 2105 | Object to compute sources from. |
| 2106 | ch_name : str |
| 2107 | The name of the channel to use for EOG peak detection. |
| 2108 | The argument is mandatory if the dataset contains no EOG |
| 2109 | channels. |
| 2110 | threshold : float | str |
| 2111 | Value above which a feature is classified as outlier. |
| 2112 | |
| 2113 | - If ``measure`` is ``'zscore'``, defines the threshold on the |
| 2114 | z-score used in the iterative z-scoring method. |
| 2115 | - If ``measure`` is ``'correlation'``, defines the absolute |
| 2116 | threshold on the correlation between 0 and 1. |
| 2117 | - If ``'auto'``, defaults to 3.0 if ``measure`` is ``'zscore'`` and |
| 2118 | 0.9 if ``measure`` is ``'correlation'``. |
| 2119 | start : int | float | None |
| 2120 | First sample to include. If float, data will be interpreted as |
| 2121 | time in seconds. If None, data will be used from the first sample. |
| 2122 | stop : int | float | None |
| 2123 | Last sample to not include. If float, data will be interpreted as |
| 2124 | time in seconds. If None, data will be used to the last sample. |
| 2125 | l_freq : float |
| 2126 | Low pass frequency. |
| 2127 | h_freq : float |
| 2128 | High pass frequency. |
| 2129 | %(reject_by_annotation_all)s |
| 2130 | |
| 2131 | .. versionadded:: 0.14.0 |
| 2132 | %(measure)s |
| 2133 | %(verbose)s |
| 2134 | |
| 2135 | Returns |
| 2136 | ------- |
| 2137 | eog_idx : list of int |
| 2138 | The indices of EOG related components, sorted by score. |