mne-tools / mne-tools/mne-python

Some remarks to simulate_raw

Open
#6,378 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
3.5k
Forks
1.6k
Avg merge
1d 6h
Merged PRs (30d)
100

Description

After working with simulation module I have some remarks:

  1. Maybe we should add "exclude=bads" to channel selection:
    meeg_picks = pick_types(info, meg=True, eeg=True, exclude=[])

I faced a problem when tried to simulate data in the project, where I already computed fwd which didn't have bad channels ['MEG 2443', 'EEG 053']. But these channels are included when I simulate raw and as a result I have an assertion error in simulate_raw:
assert fwd['sol']['data'].shape[0] == len(meeg_picks)

  1. If my info does not contain stim channel maybe it worth to add it automatically in simulate_raw. Cause now it results in an error and msg that there is no stim channel.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with simulate_raw and the shown pick_types call. Check how bad channels and stimulus channels are handled when simulating from an existing fwd and info. Done means simulation no longer asserts for forward solutions excluding bad channels, and the behavior for info without a stim channel is defined and covered by the relevant tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.