Skip to content

Conversation

@larsoner
Copy link
Member

Make it clearer that people (including devs) shouldn't generally add new stuff to info.

@cbrnr
Copy link
Contributor

cbrnr commented May 12, 2020

What about info["ch_names"] - this can also be changed manually because there's no function.

@larsoner
Copy link
Member Author

No, it shouldn't be -- it creates an inconsistency with other entries in info. You should use inst.rename_channels

Copy link
Member

@drammock drammock left a comment

Choose a reason for hiding this comment

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

LGTM other than 1 suggestion (seems better to me, but feel free to ignore if you disagree).

@larsoner
Copy link
Member Author

You should use inst.rename_channels

It just occurred to me that we should probably document at least some common methods like these in the info class itself, so if someone wants to change them, they get a link to the method that does it. @drammock worth adding to some DOC todo?

Co-authored-by: Daniel McCloy <dan@mccloy.info>
@drammock
Copy link
Member

we should probably document at least some common methods like these in the info class itself

#7774

@agramfort agramfort merged commit 1539638 into mne-tools:master May 12, 2020
@agramfort
Copy link
Member

thx @larsoner

larsoner added a commit to larsoner/mne-python that referenced this pull request May 19, 2020
* upstream/master: (74 commits)
  FIX: Correct a bug in find_bads_eog (mne-tools#7797)
  [MRG] split_naming='bids' changes from _part-%d to _split-%d (mne-tools#7794)
  MRG, MAINT, DOC: Remove spyder (mne-tools#7796)
  MAINT: fixes for linkcheck (mne-tools#7762)
  [WIP] Update ieeg data example for ECoG (mne-tools#7768)
  fix examples/tutorials [circle full] (mne-tools#7786)
  MAINT: Clean up VTK and add to pre on Azure (mne-tools#7780)
  ENH: Add matplotlib animation support [skip travis] (mne-tools#7783)
  MRG, API: change out_type default in permutation_cluster_(1samp_)test (mne-tools#7781)
  DOC: docstring fixes (mne-tools#7777)
  MRG, ENH: Add tol_kind option (mne-tools#7736)
  MRG, DOC: Notes about info (mne-tools#7772)
  ENH: Speed up NIRx read without preload (mne-tools#7759)
  Minor plot_raw aes improvement (mne-tools#7770)
  MRG, FIX: Fixes for BEM contours (mne-tools#7763)
  MRG, STY: Fix E741 (mne-tools#7767)
  MRG, ENH - Plot optodes in plot_alignment for fNIRS channels (mne-tools#7747)
  FIX: Update NIH support [skip travis] (mne-tools#7766)
  MAINT: Bump tol for gamma map test (mne-tools#7764)
  MRG, FIX: Fix MRI orientations (mne-tools#7725)
  ...
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