<commit_before>import numpy as np

from .peak_finder import peak_finder
from .. import fiff
from ..filter import band_pass_filter


def find_eog_events(raw, event_id=998):
    """Locate EOG artifacts

    Parameters
    ----------


    Returns
    -------
    """
    info = raw.info

    # Geting EOG Channel
    ch_EOG = fiff.pick_types(info, meg=False, eeg=False, stim=False,
                                                eog=True, ecg=False, emg=False)

    if len(ch_EOG) == 0:
        print 'No EOG channels found'
        print 'Trying with EEG 061 and EEG 062'
        ch_EOG = fiff.pick_channels(raw.ch_names,
                                        include=['EEG 061', 'EEG 062'])
        if len(ch_EOG) != 2:
            raise ValueError('EEG 61 or EEG 62 channel not found !!')

    print 'EOG channel index for this subject is: %s' % ch_EOG

    sampRate = info['sfreq']

    eog, _ = raw[ch_EOG, :]
<commit_msg>DOC : docstring in find_eog_events<commit_after>import numpy as np

from .peak_finder import peak_finder
from .. import fiff
from ..filter import band_pass_filter


def find_eog_events(raw, event_id=998):
    """Locate EOG artifacts

    Parameters
    ----------
    raw : instance of Raw
        The raw data
    event_id : int
        The index to assign to found events

    Returns
    -------
    eog_events : array
        Events
    """
    info = raw.info

    # Geting EOG Channel
    ch_EOG = fiff.pick_types(info, meg=False, eeg=False, stim=False,
                                                eog=True, ecg=False, emg=False)

    if len(ch_EOG) == 0:
        print 'No EOG channels found'
        print 'Trying with EEG 061 and EEG 062'
        ch_EOG = fiff.pick_channels(raw.ch_names,
                                        include=['EEG 061', 'EEG 062'])
        if len(ch_EOG) != 2:
            raise ValueError('EEG 61 or EEG 62 channel not found !!')

    print 'EOG channel index for this subject is: %s' % ch_EOG

    sampRate = info['sfreq']

    eog, _ = raw[ch_EOG, :]

{'fraction_non_alphanumeric': 0.10573122529644269, 'fraction_numerical': 0.020750988142292492, 'mean_word_length': 1.8764204545454546, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6303337', 'n_tokens_mistral': 698, 'n_tokens_neox': 633, 'n_words': 190}