Skip to content

[MRG] Update read_montage docstring#4400

Merged
mmagnuski merged 3 commits intomne-tools:masterfrom
cbrnr:update_read_montage_docstring
Jul 20, 2017
Merged

[MRG] Update read_montage docstring#4400
mmagnuski merged 3 commits intomne-tools:masterfrom
cbrnr:update_read_montage_docstring

Conversation

@cbrnr
Copy link
Copy Markdown
Contributor

@cbrnr cbrnr commented Jul 19, 2017

I've updated the docstring of the mne.channels.read_montage function. Specifically, I have

  • added the total number of channels in each montage,
  • re-formatted to make PEP8 happy,
  • switched easycap-M1 and easycap-M10,
  • and added the missing montage, which I renamed because the previous name was too long (if anyone wants to add a more detailed description for this montage let me know).

@codecov-io
Copy link
Copy Markdown

codecov-io commented Jul 19, 2017

Codecov Report

Merging #4400 into master will decrease coverage by 0.27%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #4400      +/-   ##
==========================================
- Coverage   82.75%   82.47%   -0.28%     
==========================================
  Files         349      349              
  Lines       63970    64291     +321     
  Branches     9851     9924      +73     
==========================================
+ Hits        52938    53026      +88     
- Misses       8306     8534     +228     
- Partials     2726     2731       +5

@mmagnuski
Copy link
Copy Markdown
Member

oh, good you are switching easycap montages - it was a bit annoying. :)

GSN-HydroCel-256 HydroCel Geodesic Sensor Net (259 channels)
GSN-HydroCel-257 HydroCel Geodesic Sensor Net with Cz (260 channels)

10-5_EGI129 465 channels
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

this would need more description

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I have no idea what kind of montage this is - it wasn't documented before. Anyone?

biosemi64 BioSemi cap with 64 electrodes (67 channels)
biosemi128 BioSemi cap with 128 electrodes (131 channels)
biosemi160 BioSemi cap with 160 electrodes (163 channels)
biosemi256 BioSemi cap with 256 electrodes (259 channels)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

these are a bit confusing - 256 electrodes but 259 channels. I know you write at the top that some contain fiducials, but maybe its better to write (256 channel positions, 3 fiducial points)?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

There is no property that distinguishes EEG channels from fiducials, this can only be inferred from the channel names. I don't know if it is really straightforward to make this distinction. The total number of channels in a given montage is easy and unique.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'm just saying that they are not all channels - some are channel positions and some fiducial points so saying 259 channels is misleading.
In case of biosemi fiducials are ['Nz', 'LPA', 'RPA'] and in the case of EGI they all start with Fid. At least in the case of biosemi and EGI I think it would be useful to wirte (256 channel positions, 3 fiducial points) so it is clear what the montage contents are.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

OK, I'll try to delineate where possible. What do we do with the strange new montage? It consists of half labels, half numbers?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@dengemann maybe?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

BTW - montages starting with standard also have 3 fiducial points ('Nz', 'LPA', 'RPA').
I don't know about the strange new montage - maybe it was undocummented for a reason? maybe @Eric89GXL or @agramfort knows?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The standard montages seem to have more fiducials: Nz, LPA, RPA, A1, A2, M1, M2. That's what I meant, it is difficult to distinguish between real channel labels and fiducials, so I'm not sure if it's worth the effort. IMO it's sufficient to state this generally before, as it is currently implemented.

@agramfort
Copy link
Copy Markdown
Member

no objection to merge.

let's merge when @mmagnuski is happy :)

@cbrnr
Copy link
Copy Markdown
Contributor Author

cbrnr commented Jul 19, 2017

There are two problematic montages:

  1. standard_postfixed seems to have duplicate channel positions with different labels.
  2. Same for standard_primed.

standard_postfixed

@cbrnr
Copy link
Copy Markdown
Contributor Author

cbrnr commented Jul 19, 2017

@mmagnuski I now list channels and fiducials separately for each montage.

Remaining issues:

  1. The new and previously undocumented montage - what do we do about it?
  2. standard_postfixed and standard_primed have duplicate channels positions

@larsoner
Copy link
Copy Markdown
Member

I have no idea about those montages. Can git blame / history browsing tell you anything about who added them?

@cbrnr
Copy link
Copy Markdown
Contributor Author

cbrnr commented Jul 19, 2017

@dengemann added it a while ago

@larsoner
Copy link
Copy Markdown
Member

Actually it's even older than that (need to look at the file pre-move to see its origin)

@dengemann any ideas about this standard_postfix.elc and standard_primed.elc why they have duplicate positions?

@cbrnr
Copy link
Copy Markdown
Contributor Author

cbrnr commented Jul 19, 2017

Where's that 10-5-System_Mastoids_EGI129.csd file in this commit?

@larsoner
Copy link
Copy Markdown
Member

That commit I posted is for the weird standard_ ones (I thought that was mainly the concern), but the 10-5 is here

@cbrnr
Copy link
Copy Markdown
Contributor Author

cbrnr commented Jul 19, 2017

I need to learn how to browse the history of moved files on GitHub...

@larsoner
Copy link
Copy Markdown
Member

There is probably a better way, but from your link I clicked on the commit hash (to see the changes), then clicked the "1 parent f2523e1" (toward the top), then "Browse files" (upper right), and navigated to mne/montages/ and saw the file there, and could browse its history.

@cbrnr
Copy link
Copy Markdown
Contributor Author

cbrnr commented Jul 19, 2017

Oh wow, didn't see the "parent" link - also you have to know where the file was previously... Thanks for pointing this out! 👍

@larsoner
Copy link
Copy Markdown
Member

@cbrnr can you open a separate issue for the weird montages? This can be merged separately from dealing with that, right?

@cbrnr
Copy link
Copy Markdown
Contributor Author

cbrnr commented Jul 19, 2017

OK sure! Yes, these montages are separate issues.

@larsoner
Copy link
Copy Markdown
Member

@mmagnuski are you happy, then? If so feel free to merge once the CIs are happy

@agramfort
Copy link
Copy Markdown
Member

agramfort commented Jul 19, 2017 via email

@mmagnuski
Copy link
Copy Markdown
Member

I'm almost happy :)
The last thing is that A1, A2 (and probably M1 and M2) are channel positions not fiducials. See here for example.
@jona-sassenhagen correct me if I'm wrong.

So it seems that if fiducials are present in any montage there is always 3 of them.

@Eric89GXL - I dont have merge priviliges :(

@jona-sassenhagen
Copy link
Copy Markdown
Contributor

Yes, M1 and M2 are mastoids. Together with A1 and A2, they're not fids, but electrodes.

@cbrnr
Copy link
Copy Markdown
Contributor Author

cbrnr commented Jul 20, 2017

OK done - could someone please restart the failed Travis job?

@jona-sassenhagen
Copy link
Copy Markdown
Contributor

Restarted it

@cbrnr
Copy link
Copy Markdown
Contributor Author

cbrnr commented Jul 20, 2017

All CIs are happy, I don't know why coverage decreased, this should be unrelated. I guess ready to merge.

@cbrnr cbrnr changed the title Update read_montage docstring [MRG] Update read_montage docstring Jul 20, 2017
@mmagnuski
Copy link
Copy Markdown
Member

Yes, I don't get codecov these days...
Anyway, everything seems to be ok, so I'm initiating merge 🚀
Thanks @cbrnr!

@mmagnuski mmagnuski merged commit c0013f3 into mne-tools:master Jul 20, 2017
@cbrnr cbrnr deleted the update_read_montage_docstring branch July 20, 2017 14:26
larsoner pushed a commit to larsoner/mne-python that referenced this pull request Aug 3, 2017
* Update read_montage docstring

* List channels and fiducials separately for each montage

* Fix number of fiducials
@cbrnr cbrnr mentioned this pull request Sep 21, 2017
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.

6 participants