question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

MNE.Picks Selection

See original GitHub issue

Hello,

I am trying to select only a few sensors for analysis and then apply AutoReject:

ica_epochs = mne.read_epochs(ica_apply_path +subject+ 'ar'+'-epo.fif')
picks = mne.pick_types(ica_epochs.info, meg=False, eeg=True, stim=False, eog=False,
              selection=['A11', 'A3', 'A4', 'B14', 'B15', 'B4', 'B5', 'B6', 'B7'])
 ar = AutoReject(picks=picks)

Instead of getting the selection of sensors I requested, I get all sensors back:

<Info | 19 non-empty fields
    bads : list | 0 items
    ch_names : list | A1, A2, A3, A4, A5, A6, A7, A8, A9, ...
    chs : list | 64 items (EEG: 64)
    comps : list | 0 items
    custom_ref_applied : bool | True
    dev_head_t : Transform | 3 items
    dig : list | 67 items (3 Cardinal, 64 EEG)
    events : list | 0 items
    file_id : dict | 4 items
    highpass : float | 1.0 Hz
    hpi_meas : list | 0 items
    hpi_results : list | 0 items
    lowpass : float | 100.0 Hz
    meas_date : tuple | 2019-03-29 15:57:19 GMT
    meas_id : dict | 4 items
    nchan : int | 64
    proc_history : list | 0 items
    projs : list | 0 items
    sfreq : float | 256.0 Hz
    acq_pars : NoneType
    acq_stim : NoneType
    ctf_head_t : NoneType
    description : NoneType
    dev_ctf_t : NoneType
    experimenter : NoneType
    gantry_angle : NoneType
    hpi_subsystem : NoneType
    kit_system_id : NoneType
    line_freq : NoneType
    proj_id : NoneType
    proj_name : NoneType
    subject_info : NoneType
    xplotter_layout : NoneType

Any idea why this might be?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
agramfortcommented, Jun 17, 2019

I am confused. What is the Info you show at the end? where is it coming from? what you provide picks to AutoReject you limit cleanup to these channels and the rest are left untouched I think.

0reactions
jasmainakcommented, Jun 18, 2019

yes autoreject only limits analysis to the “picks” channels. It does not subselect the epochs object

Read more comments on GitHub >

github_iconTop Results From Across the Web

mne.pick_types — MNE 1.2.2 documentation
Pick channels by type and names. Parameters: ... If string it can be 'mag', 'grad', 'planar1' or 'planar2' to select only magnetometers, ...
Read more >
How to select particular set of channels? - MNE Forum
I am working on a data set from Electromag Triux. I want to plot PSD from occipital region, but selections are not available...
Read more >
Interpolating bad channels - Jupyter Notebooks Gallery
picks = mne.pick_channels_regexp(raw.ch_names, regexp='EEG 05. ... to make sure the bad channels were not automatically dropped from the selection.
Read more >
Filtering - Mainak Jas
Pick a subset of channels (here for speed reason). selection = mne.read_selection('Left-temporal') picks = mne.pick_types(raw.info, meg='mag', eeg=False, ...
Read more >
Exploring MNE's data structure
In this lesson, we will load a raw EEG data file using MNE and gain an ... rathter than NumPy array indices. picks...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found