Skip to content

Conversation

@wmvanvliet
Copy link
Contributor

@wmvanvliet wmvanvliet commented Nov 7, 2019

In the process of adding support for DICS whitening (#7021), I now find myself with an Info, two CSD matrices and a forward model, all of which need to have exactly the same channels defined in the same order for the computations to work. This is a common theme throughout our codebase and currently, we have a smattering of private helper functions everywhere that deal with equalizing channels one way or another.

However, we also have mne.channels.equalize_channels, which job it is to, given a list of instances, equalize the channels amongst them. In this PR, I've extended its capabilities to:

  1. Also deal with Info, Forward, Covariance and CrossSpectralDensity
  2. Also re-order the channels to make sure the channel orders are the same.

To accomplish this, I had to give our channel picking functionality a bit of extra love. Adding an ordered=True option for those picking functions that lacked it, and adding pick_channels methods to Forward, Covariance and CrossSpectralDensity, so that equalize_channels doesn't need to contain a big switch for each supported instance type.

Todo:

  • Add pick_channels methods to Info, Forward, Covariance and CrossSpectralDensity
  • Add ch_names attribute to Info and Forward
  • Add unit tests
  • Replace private functions that perform channel equalization with equalize_channels Will do in follow-up PR
  • Maybe: add logic to keep objects that already have the proper order untouched for speed
  • Add "what's new" entry

Question @larsoner: why does equalize_channels first find the instance with the most channels defined and uses that as initial set to then intersect with the others to compute the set of common channels? Why not just pick the fist instance? Also, why is the first parameter called candidates and not instances?

@codecov
Copy link

codecov bot commented Nov 7, 2019

Codecov Report

Merging #7029 into master will increase coverage by 0.02%.
The diff coverage is 97.9%.

@@            Coverage Diff             @@
##           master    #7029      +/-   ##
==========================================
+ Coverage   89.74%   89.77%   +0.02%     
==========================================
  Files         442      442              
  Lines       77786    78031     +245     
  Branches    12621    12657      +36     
==========================================
+ Hits        69812    70051     +239     
- Misses       5163     5165       +2     
- Partials     2811     2815       +4

@wmvanvliet wmvanvliet changed the title ENH: Make equalize_channels capable of operating on Forward, Covariance and CrossSpectralDensity [WIP] Make equalize_channels capable of operating on Forward, Covariance and CrossSpectralDensity Nov 7, 2019
@larsoner
Copy link
Member

larsoner commented Nov 7, 2019

why does equalize_channels first find the instance with the most channels defined and uses that as initial set to then intersect with the others to compute the set of common channels?

No idea / can't remember.

Also, why is the first parameter called candidates and not instances?

It can and probably should be changed to instances.

This was added by @dengemann six years ago and I actually forgot that it existed / don't use it, so maybe he has ideas.

@wmvanvliet
Copy link
Contributor Author

I think it's main use was in grand_average to make sure all evokeds had the same channels.

@wmvanvliet
Copy link
Contributor Author

I'm done now with the overhaul of the equalize_channels function itself. It can now equalize the channels almost anything, and new object types can be added very easily. Would you care to take a look @larsoner @dengemann?

This PR is growing a bit long. Shall I split the work of replacing the custom private functions for equalizing channels with equalize_channels into a different PR?

@larsoner
Copy link
Member

This PR is growing a bit long. Shall I split the work of replacing the custom private functions for equalizing channels with equalize_channels into a different PR?

No I think this is fine, it's not too many lines. If the tests are clear enough and CIs are happy then we should be good.

Is this ready for MRG or still WIP?

Copy link
Member

@larsoner larsoner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No complaints, LGTM +1 for merge. We can do it after you refactor more, or (maybe better on second thought) merge this as-is and then you refactor.

@wmvanvliet
Copy link
Contributor Author

I'd prefer to do the refactor in another PR to keep things small. Let me update what's new and then this is ready for merge.

@verbose
def equalize_channels(candidates, verbose=None):
"""Equalize channel picks for a collection of MNE-Python objects.
def equalize_channels(instances, copy=False, verbose=None):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

functions should copy by default. Only methods should not do this and operated inplace

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True. However, that would be change from current master, since that version operated in-place only. I'm being inconsistent here I see, since I break backwards compatibility anyway be re-ordering channels.

I could avoid breaking backwards compatibility here by making the signature:

equalize_channels(candidates, copy=False, ordering=False, verbose=None)

if that is preferable. However, every time I would want to use the function, I want copy=True, ordering=True and don't see much scenarios where you wouldn't want that.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No strong feeling but at least API change should be documented in what's new. The current function in master operates inplace and returns modified inputs which is evil...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

copy=True it is!

"""Equalize channel picks and ordering across multiple MNE-Python objects.

First, all channels that are not common to each object are dropped. Then,
using the first object in the list as a template, the channels of each
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you change the current behavior by taking the first at template. BEfore it was taking the one with the highest number of channels so order did not matter

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is something I do wish to change. By using the first object as template, the user can more easily control the order in which the channels end up in. For example, it would be computionally beneficial to specify the largest object in memory first, so those channels do not need to be re-ordered which would be expensive. Using the object that originally has the most channels seems to random to me. If there was a good reason for it, I'd love to hear it (@dengemann?)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

then it should at least be documented as an API change in what's new.

assert not np.allclose(data2, evoked2.data)
with pytest.warns(RuntimeWarning, match='reordering'):
ev3 = grand_average((evoked1, evoked2))
ev3 = combine_evoked([evoked1, evoked2], weights=[0.5, 0.5])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why did you need to change this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

because internally, grand_average first calls equalize_channels and then combine_evoked. In current master, equalize_channels does not re-order the channels, hence the re-ordering logic in combine_evoked is activated, which gives a warning, which is what is tested here. In this PR, equalize_channels does re-order the channels, without warning, because I assume re-ordering is something the user wants to do when "equalizing channels", hence the re-ordering logic in combine_evoked is not activates, hence no warning is issued, hence the test fails. Since the test is for the re-ordering logic of combine_evoked, I thought it better to just call it directly without going through grand_average.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

Copy link
Member

@agramfort agramfort left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@larsoner merge if you're happy

@agramfort
Copy link
Member

@wmvanvliet see why circle complains

@drammock
Copy link
Member

changes/latest.inc:148: WARNING: py:attr reference target not found: mne.Forward.ch_names
changes/latest.inc:148: WARNING: py:attr reference target not found: mne.Info.ch_names


- New methods :meth:`mne.Forward.pick_channels`, :meth:`mne.Covariance.pick_channels`, :meth:`mne.Info.pick_channels`, :meth:`mne.time_frequency.CrossSpectralDensity.pick_channels` by `Marijn van Vliet`_

- New attributes :attr:`mne.Forward.ch_names`, :attr:`mne.Info.ch_names` by `Marijn van Vliet`_
Copy link
Contributor Author

@wmvanvliet wmvanvliet Nov 21, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could someone please help me? What am I doing wrong here? Sphynx can't find these attribute references.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are currently not directly linkable. Either use double backticks or just link to the object:

attributes ``mne.Forward.ch_names``

or

attributes :class:`mne.Forward.ch_names <mne.Forward>`

@agramfort agramfort merged commit b12a220 into mne-tools:master Nov 22, 2019
@agramfort
Copy link
Member

Thx @wmvanvliet

christian-oreilly pushed a commit to christian-oreilly/mne-python that referenced this pull request Dec 8, 2019
…nce and CrossSpectralDensity (mne-tools#7029)

* Add more capabilites to equalize_channels

* Add unit tests for improved equalize_channels functionality

* Fix docstring of equalize_channels

* Add Info capabilities to equalize_channels

* Fix Forward.pick_channels docstring

* Update combine_evokeds unit test

* Fix edge case of pick_channels_cov

* Add dedicated pick_channels_cov unit test

* Add copy parameter to equalize_channels

* Make copy=False the default

* Make grand_average also equalize TFR channels

* Make copy=True the default in equalize_channels

* PEP8

* Update docstring

* Update what's new

* Update unit tests

* Update links to methods in whats_new

* Spell out new supported object types

* Fix links in whats_new again

* Remove attribute links
agramfort pushed a commit that referenced this pull request Dec 14, 2019
* Fixing issues with plot_surface()

* Setting transparent to True instead of False.

* PR review edits.

* PR review edits.

* Improved error management for missing pysufer.

* Update _3d.py

* Update test_3d.py

* Fixing test requires conditions.

* Document this PR change.

* Update doc/changes/latest.inc

Co-Authored-By: Eric Larson <larson.eric.d@gmail.com>

* fix : don't require git to install master (#7078)

* [MRG] Fix plot_vector_source_estimates (#7084)

* Initial fix

* Update mesh is not necessary

* Choose to modify scale_factor as post-post-process

* Add simple test for fix

* Use mean of hemi's width

* MRG, BUG: Fix running subprocesses in Jupyter notebooks (#7086)

* BUG: Fix running subprocesses in Jupyter notebooks

* FIX: Flake [ci skip]

* FIX: Adding use_scalebars as a parameter. (#7091)

* Adding use_scalebars as a parameter.

* Fixed to adhere to mne-coding standards.

* Fixing formatting issues.

* Fixing show_scalebars in viz ica from the original naming of  use_scalebars.

* Update mne/viz/ica.py

Co-Authored-By: Daniel McCloy <dan.mccloy@gmail.com>

* Update mne/viz/raw.py

Co-Authored-By: Daniel McCloy <dan.mccloy@gmail.com>

* DOC: Correct version [ci skip]

* [MRG] Implement iterative reweighted TF-MxNE (#5075)

* ir scheme

* Squash commits

* messed up my rebase

* Address comments Alex

* flake

* implement filtering and write more readable math code

* fix pydocstyle

* High pass filter, remove upsampling, get 4 sources

* TFMxnE > TF-MxNE + rm comment example

* MAINT: Ensure that meas_date=None round-trips if `anonymize_info` is used (#7090)

* BUG: Write out meas_date=None

* FIX: Maybe better?

* DOC: Document

* [WIP] Make equalize_channels capable of operating on Forward, Covariance and CrossSpectralDensity (#7029)

* Add more capabilites to equalize_channels

* Add unit tests for improved equalize_channels functionality

* Fix docstring of equalize_channels

* Add Info capabilities to equalize_channels

* Fix Forward.pick_channels docstring

* Update combine_evokeds unit test

* Fix edge case of pick_channels_cov

* Add dedicated pick_channels_cov unit test

* Add copy parameter to equalize_channels

* Make copy=False the default

* Make grand_average also equalize TFR channels

* Make copy=True the default in equalize_channels

* PEP8

* Update docstring

* Update what's new

* Update unit tests

* Update links to methods in whats_new

* Spell out new supported object types

* Fix links in whats_new again

* Remove attribute links

* MRG, DOC: revise tutorial: overview of Epoching (#7011)

* rename file

* WIP tutorial overhaul [ci skip]

* link targets

* finish tutorial revisions

* fix glossary ref

* formatting/flow tweaks [skip travis]

* fix codespell

* address neurolaunch review comments

* [MRG] Refactor mayavi/mlab out report (#7008)

* Start refactoring of report

* Fix figure_size bug

* Fix undefined function bug

* Remove unnecessary 3d functions from public API

* Refactor _fig_to_img

* Unify 3d backend testing

* Fix 3d backend testing variable

* Minor refactoring

* Improve _check_3d_figure

* TST: Trigger plot_make_report.py

* TST: Trigger plot_make_report.py

* Fix typo

* Fix bug with figure not closed

* TST: Trigger plot_make_report.py

* Integrate reviews

* crop raw to save memory (#7100)

* MRG, DOC: Update contrib guide (#7097)

* WIP update contributing guide

* refine bug reporting guidelines

* add git setup diagram

* mention dangers of PYTHONPATH

* fix typo

* more on PYTHONPATH

* clarify dev environment setup steps

* tweaks

* remove self-referential crossref

* add "origin"

* ENH: Adding support of GridSearchCV for mne.decoding.LinearModel (#7089)

* ENH: Adding support of GridSearchCV for mne.decoding.LinearModel

* (1) adds the GridSearchCV tests for LinearModel class. (2) adds Classification/Regression/GridSearchCV estimators' tests for get_coef function.

* fixed some flake8 errors.

* speeds up the tests.

* tweaks some tests.

* adds an entry to changelog.

* (1) generates the random values under RandomState. (2) uses `with block` to catch exceptions.

* BUG: CTF - set meas_date (#7104)

* BUG: CTF - set meas_date

* Comment: not to revisit testing post potential mne-c updates

* Whats New

* MRG, DOC: revise tutorial: epochs visualization (#7102)

* delete redundant tutorial

* add explanation of dropped epoch & crossref to drop_log section

* add crossref target

* overhaul epochs viz tutorial

* fix sidebar

* avoid warning

* update crossrefs

* formatting & flow tweaks

* rename file for proper ordering

* fix crossrefs

* make plots look better

* fix codespell

* [MRG] Improve Renderer API (#6761)

* Fix minor bug in sphere()

* Fix dimension in tube()

* Update doc for color

* Add color management as str

* Find better default value for tube() radius

* Correct colorConvertex syntax

* Fix import nesting

* Refactor colro code

* Rework text2d() (x,y) parameter

* Refactor _parse_str_color to _check_color

* Add some tests

* Improve doc

* Add the radius parameter for pyvista

* Fix import

* FIX: Avoid deadlocking (#7103)

* DOC: Spelling (#7106)

* ENH: Add mne sys_info command (#7105)

* ENH: Add mne sys_info command

* FIX: Install

* MRG, DOC: tutorial tweaks (#7109)

* better artifact plots; better thumbnail choice

* keep it pedagogical

* change thumbnail [ci skip]

* MAINT: Test on 3.8 (#7113)

* better info message for rank computation [skip circle] (#7110)

* FIX: Fix for old build (#7120)

* MRG, MAINT: Make calculate_head_pos_ctf public (#7117)

* MAINT: Make calculate_head_pos_ctf public

* FIX: Doc

* DOC: Fix

* FIX: Docstring

* MRG, FIX: Fix sklearn import (#7121)

* ENH: refactor _handle_event_colors (#7111)

* refactor _handle_event_colors

* restore warning

* fix tests

* fix circle

* add test

* minor refactor

* FIX: Allow unknown (#7119)

* MRG, FIX: scaling in summarize_clusters_stc (#7125)

* remove hardcoded 1e3; improve docstring

* touch tutorials to trigger rendering

* update what's new

* actually use milliseconds

* Document this PR change.

* Document this PR change.

* Update doc/changes/latest.inc

Co-Authored-By: Eric Larson <larson.eric.d@gmail.com>

* BUG: CTF - set meas_date (#7104)

* BUG: CTF - set meas_date

* Comment: not to revisit testing post potential mne-c updates

* Whats New

* MRG, FIX: scaling in summarize_clusters_stc (#7125)

* remove hardcoded 1e3; improve docstring

* touch tutorials to trigger rendering

* update what's new

* actually use milliseconds

* Fix doc CI warning about missing target.

* more

* nest check
AdoNunes pushed a commit to AdoNunes/mne-python that referenced this pull request Apr 6, 2020
…nce and CrossSpectralDensity (mne-tools#7029)

* Add more capabilites to equalize_channels

* Add unit tests for improved equalize_channels functionality

* Fix docstring of equalize_channels

* Add Info capabilities to equalize_channels

* Fix Forward.pick_channels docstring

* Update combine_evokeds unit test

* Fix edge case of pick_channels_cov

* Add dedicated pick_channels_cov unit test

* Add copy parameter to equalize_channels

* Make copy=False the default

* Make grand_average also equalize TFR channels

* Make copy=True the default in equalize_channels

* PEP8

* Update docstring

* Update what's new

* Update unit tests

* Update links to methods in whats_new

* Spell out new supported object types

* Fix links in whats_new again

* Remove attribute links
AdoNunes pushed a commit to AdoNunes/mne-python that referenced this pull request Apr 6, 2020
* Fixing issues with plot_surface()

* Setting transparent to True instead of False.

* PR review edits.

* PR review edits.

* Improved error management for missing pysufer.

* Update _3d.py

* Update test_3d.py

* Fixing test requires conditions.

* Document this PR change.

* Update doc/changes/latest.inc

Co-Authored-By: Eric Larson <larson.eric.d@gmail.com>

* fix : don't require git to install master (mne-tools#7078)

* [MRG] Fix plot_vector_source_estimates (mne-tools#7084)

* Initial fix

* Update mesh is not necessary

* Choose to modify scale_factor as post-post-process

* Add simple test for fix

* Use mean of hemi's width

* MRG, BUG: Fix running subprocesses in Jupyter notebooks (mne-tools#7086)

* BUG: Fix running subprocesses in Jupyter notebooks

* FIX: Flake [ci skip]

* FIX: Adding use_scalebars as a parameter. (mne-tools#7091)

* Adding use_scalebars as a parameter.

* Fixed to adhere to mne-coding standards.

* Fixing formatting issues.

* Fixing show_scalebars in viz ica from the original naming of  use_scalebars.

* Update mne/viz/ica.py

Co-Authored-By: Daniel McCloy <dan.mccloy@gmail.com>

* Update mne/viz/raw.py

Co-Authored-By: Daniel McCloy <dan.mccloy@gmail.com>

* DOC: Correct version [ci skip]

* [MRG] Implement iterative reweighted TF-MxNE (mne-tools#5075)

* ir scheme

* Squash commits

* messed up my rebase

* Address comments Alex

* flake

* implement filtering and write more readable math code

* fix pydocstyle

* High pass filter, remove upsampling, get 4 sources

* TFMxnE > TF-MxNE + rm comment example

* MAINT: Ensure that meas_date=None round-trips if `anonymize_info` is used (mne-tools#7090)

* BUG: Write out meas_date=None

* FIX: Maybe better?

* DOC: Document

* [WIP] Make equalize_channels capable of operating on Forward, Covariance and CrossSpectralDensity (mne-tools#7029)

* Add more capabilites to equalize_channels

* Add unit tests for improved equalize_channels functionality

* Fix docstring of equalize_channels

* Add Info capabilities to equalize_channels

* Fix Forward.pick_channels docstring

* Update combine_evokeds unit test

* Fix edge case of pick_channels_cov

* Add dedicated pick_channels_cov unit test

* Add copy parameter to equalize_channels

* Make copy=False the default

* Make grand_average also equalize TFR channels

* Make copy=True the default in equalize_channels

* PEP8

* Update docstring

* Update what's new

* Update unit tests

* Update links to methods in whats_new

* Spell out new supported object types

* Fix links in whats_new again

* Remove attribute links

* MRG, DOC: revise tutorial: overview of Epoching (mne-tools#7011)

* rename file

* WIP tutorial overhaul [ci skip]

* link targets

* finish tutorial revisions

* fix glossary ref

* formatting/flow tweaks [skip travis]

* fix codespell

* address neurolaunch review comments

* [MRG] Refactor mayavi/mlab out report (mne-tools#7008)

* Start refactoring of report

* Fix figure_size bug

* Fix undefined function bug

* Remove unnecessary 3d functions from public API

* Refactor _fig_to_img

* Unify 3d backend testing

* Fix 3d backend testing variable

* Minor refactoring

* Improve _check_3d_figure

* TST: Trigger plot_make_report.py

* TST: Trigger plot_make_report.py

* Fix typo

* Fix bug with figure not closed

* TST: Trigger plot_make_report.py

* Integrate reviews

* crop raw to save memory (mne-tools#7100)

* MRG, DOC: Update contrib guide (mne-tools#7097)

* WIP update contributing guide

* refine bug reporting guidelines

* add git setup diagram

* mention dangers of PYTHONPATH

* fix typo

* more on PYTHONPATH

* clarify dev environment setup steps

* tweaks

* remove self-referential crossref

* add "origin"

* ENH: Adding support of GridSearchCV for mne.decoding.LinearModel (mne-tools#7089)

* ENH: Adding support of GridSearchCV for mne.decoding.LinearModel

* (1) adds the GridSearchCV tests for LinearModel class. (2) adds Classification/Regression/GridSearchCV estimators' tests for get_coef function.

* fixed some flake8 errors.

* speeds up the tests.

* tweaks some tests.

* adds an entry to changelog.

* (1) generates the random values under RandomState. (2) uses `with block` to catch exceptions.

* BUG: CTF - set meas_date (mne-tools#7104)

* BUG: CTF - set meas_date

* Comment: not to revisit testing post potential mne-c updates

* Whats New

* MRG, DOC: revise tutorial: epochs visualization (mne-tools#7102)

* delete redundant tutorial

* add explanation of dropped epoch & crossref to drop_log section

* add crossref target

* overhaul epochs viz tutorial

* fix sidebar

* avoid warning

* update crossrefs

* formatting & flow tweaks

* rename file for proper ordering

* fix crossrefs

* make plots look better

* fix codespell

* [MRG] Improve Renderer API (mne-tools#6761)

* Fix minor bug in sphere()

* Fix dimension in tube()

* Update doc for color

* Add color management as str

* Find better default value for tube() radius

* Correct colorConvertex syntax

* Fix import nesting

* Refactor colro code

* Rework text2d() (x,y) parameter

* Refactor _parse_str_color to _check_color

* Add some tests

* Improve doc

* Add the radius parameter for pyvista

* Fix import

* FIX: Avoid deadlocking (mne-tools#7103)

* DOC: Spelling (mne-tools#7106)

* ENH: Add mne sys_info command (mne-tools#7105)

* ENH: Add mne sys_info command

* FIX: Install

* MRG, DOC: tutorial tweaks (mne-tools#7109)

* better artifact plots; better thumbnail choice

* keep it pedagogical

* change thumbnail [ci skip]

* MAINT: Test on 3.8 (mne-tools#7113)

* better info message for rank computation [skip circle] (mne-tools#7110)

* FIX: Fix for old build (mne-tools#7120)

* MRG, MAINT: Make calculate_head_pos_ctf public (mne-tools#7117)

* MAINT: Make calculate_head_pos_ctf public

* FIX: Doc

* DOC: Fix

* FIX: Docstring

* MRG, FIX: Fix sklearn import (mne-tools#7121)

* ENH: refactor _handle_event_colors (mne-tools#7111)

* refactor _handle_event_colors

* restore warning

* fix tests

* fix circle

* add test

* minor refactor

* FIX: Allow unknown (mne-tools#7119)

* MRG, FIX: scaling in summarize_clusters_stc (mne-tools#7125)

* remove hardcoded 1e3; improve docstring

* touch tutorials to trigger rendering

* update what's new

* actually use milliseconds

* Document this PR change.

* Document this PR change.

* Update doc/changes/latest.inc

Co-Authored-By: Eric Larson <larson.eric.d@gmail.com>

* BUG: CTF - set meas_date (mne-tools#7104)

* BUG: CTF - set meas_date

* Comment: not to revisit testing post potential mne-c updates

* Whats New

* MRG, FIX: scaling in summarize_clusters_stc (mne-tools#7125)

* remove hardcoded 1e3; improve docstring

* touch tutorials to trigger rendering

* update what's new

* actually use milliseconds

* Fix doc CI warning about missing target.

* more

* nest check
AdoNunes pushed a commit to AdoNunes/mne-python that referenced this pull request Apr 6, 2020
…nce and CrossSpectralDensity (mne-tools#7029)

* Add more capabilites to equalize_channels

* Add unit tests for improved equalize_channels functionality

* Fix docstring of equalize_channels

* Add Info capabilities to equalize_channels

* Fix Forward.pick_channels docstring

* Update combine_evokeds unit test

* Fix edge case of pick_channels_cov

* Add dedicated pick_channels_cov unit test

* Add copy parameter to equalize_channels

* Make copy=False the default

* Make grand_average also equalize TFR channels

* Make copy=True the default in equalize_channels

* PEP8

* Update docstring

* Update what's new

* Update unit tests

* Update links to methods in whats_new

* Spell out new supported object types

* Fix links in whats_new again

* Remove attribute links
AdoNunes pushed a commit to AdoNunes/mne-python that referenced this pull request Apr 6, 2020
* Fixing issues with plot_surface()

* Setting transparent to True instead of False.

* PR review edits.

* PR review edits.

* Improved error management for missing pysufer.

* Update _3d.py

* Update test_3d.py

* Fixing test requires conditions.

* Document this PR change.

* Update doc/changes/latest.inc

Co-Authored-By: Eric Larson <larson.eric.d@gmail.com>

* fix : don't require git to install master (mne-tools#7078)

* [MRG] Fix plot_vector_source_estimates (mne-tools#7084)

* Initial fix

* Update mesh is not necessary

* Choose to modify scale_factor as post-post-process

* Add simple test for fix

* Use mean of hemi's width

* MRG, BUG: Fix running subprocesses in Jupyter notebooks (mne-tools#7086)

* BUG: Fix running subprocesses in Jupyter notebooks

* FIX: Flake [ci skip]

* FIX: Adding use_scalebars as a parameter. (mne-tools#7091)

* Adding use_scalebars as a parameter.

* Fixed to adhere to mne-coding standards.

* Fixing formatting issues.

* Fixing show_scalebars in viz ica from the original naming of  use_scalebars.

* Update mne/viz/ica.py

Co-Authored-By: Daniel McCloy <dan.mccloy@gmail.com>

* Update mne/viz/raw.py

Co-Authored-By: Daniel McCloy <dan.mccloy@gmail.com>

* DOC: Correct version [ci skip]

* [MRG] Implement iterative reweighted TF-MxNE (mne-tools#5075)

* ir scheme

* Squash commits

* messed up my rebase

* Address comments Alex

* flake

* implement filtering and write more readable math code

* fix pydocstyle

* High pass filter, remove upsampling, get 4 sources

* TFMxnE > TF-MxNE + rm comment example

* MAINT: Ensure that meas_date=None round-trips if `anonymize_info` is used (mne-tools#7090)

* BUG: Write out meas_date=None

* FIX: Maybe better?

* DOC: Document

* [WIP] Make equalize_channels capable of operating on Forward, Covariance and CrossSpectralDensity (mne-tools#7029)

* Add more capabilites to equalize_channels

* Add unit tests for improved equalize_channels functionality

* Fix docstring of equalize_channels

* Add Info capabilities to equalize_channels

* Fix Forward.pick_channels docstring

* Update combine_evokeds unit test

* Fix edge case of pick_channels_cov

* Add dedicated pick_channels_cov unit test

* Add copy parameter to equalize_channels

* Make copy=False the default

* Make grand_average also equalize TFR channels

* Make copy=True the default in equalize_channels

* PEP8

* Update docstring

* Update what's new

* Update unit tests

* Update links to methods in whats_new

* Spell out new supported object types

* Fix links in whats_new again

* Remove attribute links

* MRG, DOC: revise tutorial: overview of Epoching (mne-tools#7011)

* rename file

* WIP tutorial overhaul [ci skip]

* link targets

* finish tutorial revisions

* fix glossary ref

* formatting/flow tweaks [skip travis]

* fix codespell

* address neurolaunch review comments

* [MRG] Refactor mayavi/mlab out report (mne-tools#7008)

* Start refactoring of report

* Fix figure_size bug

* Fix undefined function bug

* Remove unnecessary 3d functions from public API

* Refactor _fig_to_img

* Unify 3d backend testing

* Fix 3d backend testing variable

* Minor refactoring

* Improve _check_3d_figure

* TST: Trigger plot_make_report.py

* TST: Trigger plot_make_report.py

* Fix typo

* Fix bug with figure not closed

* TST: Trigger plot_make_report.py

* Integrate reviews

* crop raw to save memory (mne-tools#7100)

* MRG, DOC: Update contrib guide (mne-tools#7097)

* WIP update contributing guide

* refine bug reporting guidelines

* add git setup diagram

* mention dangers of PYTHONPATH

* fix typo

* more on PYTHONPATH

* clarify dev environment setup steps

* tweaks

* remove self-referential crossref

* add "origin"

* ENH: Adding support of GridSearchCV for mne.decoding.LinearModel (mne-tools#7089)

* ENH: Adding support of GridSearchCV for mne.decoding.LinearModel

* (1) adds the GridSearchCV tests for LinearModel class. (2) adds Classification/Regression/GridSearchCV estimators' tests for get_coef function.

* fixed some flake8 errors.

* speeds up the tests.

* tweaks some tests.

* adds an entry to changelog.

* (1) generates the random values under RandomState. (2) uses `with block` to catch exceptions.

* BUG: CTF - set meas_date (mne-tools#7104)

* BUG: CTF - set meas_date

* Comment: not to revisit testing post potential mne-c updates

* Whats New

* MRG, DOC: revise tutorial: epochs visualization (mne-tools#7102)

* delete redundant tutorial

* add explanation of dropped epoch & crossref to drop_log section

* add crossref target

* overhaul epochs viz tutorial

* fix sidebar

* avoid warning

* update crossrefs

* formatting & flow tweaks

* rename file for proper ordering

* fix crossrefs

* make plots look better

* fix codespell

* [MRG] Improve Renderer API (mne-tools#6761)

* Fix minor bug in sphere()

* Fix dimension in tube()

* Update doc for color

* Add color management as str

* Find better default value for tube() radius

* Correct colorConvertex syntax

* Fix import nesting

* Refactor colro code

* Rework text2d() (x,y) parameter

* Refactor _parse_str_color to _check_color

* Add some tests

* Improve doc

* Add the radius parameter for pyvista

* Fix import

* FIX: Avoid deadlocking (mne-tools#7103)

* DOC: Spelling (mne-tools#7106)

* ENH: Add mne sys_info command (mne-tools#7105)

* ENH: Add mne sys_info command

* FIX: Install

* MRG, DOC: tutorial tweaks (mne-tools#7109)

* better artifact plots; better thumbnail choice

* keep it pedagogical

* change thumbnail [ci skip]

* MAINT: Test on 3.8 (mne-tools#7113)

* better info message for rank computation [skip circle] (mne-tools#7110)

* FIX: Fix for old build (mne-tools#7120)

* MRG, MAINT: Make calculate_head_pos_ctf public (mne-tools#7117)

* MAINT: Make calculate_head_pos_ctf public

* FIX: Doc

* DOC: Fix

* FIX: Docstring

* MRG, FIX: Fix sklearn import (mne-tools#7121)

* ENH: refactor _handle_event_colors (mne-tools#7111)

* refactor _handle_event_colors

* restore warning

* fix tests

* fix circle

* add test

* minor refactor

* FIX: Allow unknown (mne-tools#7119)

* MRG, FIX: scaling in summarize_clusters_stc (mne-tools#7125)

* remove hardcoded 1e3; improve docstring

* touch tutorials to trigger rendering

* update what's new

* actually use milliseconds

* Document this PR change.

* Document this PR change.

* Update doc/changes/latest.inc

Co-Authored-By: Eric Larson <larson.eric.d@gmail.com>

* BUG: CTF - set meas_date (mne-tools#7104)

* BUG: CTF - set meas_date

* Comment: not to revisit testing post potential mne-c updates

* Whats New

* MRG, FIX: scaling in summarize_clusters_stc (mne-tools#7125)

* remove hardcoded 1e3; improve docstring

* touch tutorials to trigger rendering

* update what's new

* actually use milliseconds

* Fix doc CI warning about missing target.

* more

* nest check
@wmvanvliet wmvanvliet deleted the channel_equality branch October 18, 2021 06:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants