def _annotate_epochs(self, threshes, epochs):
"""Get essential annotations for epochs given thresholds."""
ch_type = _get_ch_type_from_picks(self.picks, epochs.info)[0]
drop_log, bad_sensor_counts = self._vote_bad_epochs(epochs)
interp_channels, fix_log = self._get_epochs_interpolation(
epochs, drop_log=drop_log, ch_type=ch_type)
(bad_epochs_idx, sorted_epoch_idx,
n_epochs_drop) = self._get_bad_epochs(
bad_sensor_counts, ch_type=ch_type)
bad_epochs_idx = np.sort(bad_epochs_idx)
good_epochs_idx = np.setdiff1d(np.arange(len(epochs)),
bad_epochs_idx)
return (drop_log, bad_sensor_counts, interp_channels, fix_log,
bad_epochs_idx, good_epochs_idx)
评论列表
文章目录