mne-tools / mne-tools/mne-python
mne.grand_average for source estimates
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 3.5k
- Forks
- 1.6k
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 100
Description
Describe the new feature or enhancement
For consistency between sensor and source analysis, it would be nice to allow for mne.grand_average as input data a list of mne.SourceEstimate. Users might be fooled into believing that grand avering source estimates it not suggested.
Describe your proposed implementation
the all_inst parameter that takes the evoked datasets of mne.grand_average should allow for list of mne.SourceEstimate. All source estimates in the list (https://mne.tools/stable/generated/mne.SourceEstimate.html) should have the same number of vertices. The nave parameter of the evokeds could be set to 1 as a workaround. interpolate_bads and drop_bads should check if evokeds equal Source Estimate and if True, both parameters should be set to False.
Describe possible alternatives
An alternative could be to implement a separate function for the source estimate class [mne.SourceEstimate], that computes grand_averages on a list of source estimates.
Additional context
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the mne.grand_average entry point and the SourceEstimate API described in the issue, then inspect how the current function handles Evoked inputs and the all_inst, interpolate_bads, and drop_bads parameters. Done means a list of SourceEstimate objects with matching vertex counts is accepted, with the stated bad-channel options handled appropriately, and coverage is added for the new behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100