mne-tools / mne-tools/mne-python

BUG: Epochs constructor (re-creates) and re-applies proj even if proj is False if raw.proj is True

Open
#2,310 19 comments 0 reactions 1 assignee View on GitHub

@larsoner is already working on this.

Since Sep 8, 2016.

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

Description

This leads to problems in at least one use case where the user is interested in working with only a subset of channels. For example:

raw.apply_proj()  # Apply proj before selecting channels of interest

raw2 = raw.pick_channels([...], copy=True)   # Pick subset of channels
# Now raw2.proj is True

epochs = Epochs(raw2, ..., proj=False)
# The data in epochs is messed up owing to re-application
# of inappropriate projector without having all channels

There are several places here where at least warnings should have been thrown...

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.