mne-tools / mne-tools/mne-python
Proposal: VertexPickerMixin
@wmvanvliet is already working on this.
Since Mar 26, 2019.
- Dominant language
- Python
- Stars
- 3.5k
- Forks
- 1.6k
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 100
Description
While implementing the new DICS beamformer pipeline, one of the steps is to optionally restrict the source space to vertices with a maximum distance to the nearest sensor (to remove deep sources). This can be implemented by restricting either the SourceSpaces, or Forward objects.
Right now, there are a number of ways to "pick vertices" of a Forward or SourceEstimate object (restrict_forward_to_label, restrict_forward_to_stc, SourceEstimate.in_label). Rather than adding a restrict_forward_to_sens_dist function, I could instead create a VectexPickerMixin mixin that implements .restrict_to(vertices), restrict_to_label(labels), restrict_to_stc(stc), restrict_to_sens_dist(info), etc. and have SourceSpaces, Forward and SourceEstimate subclass this.
How do you feel about this? Maybe it deprecates too much API...
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.
Assessment
This issue has not been assessed yet.