Skip to content

Conversation

@massich
Copy link
Contributor

@massich massich commented Jan 15, 2019

My attempt to get my head around the montage problems.
I will re-edit the PR, rewrite history and whatever..

@codecov
Copy link

codecov bot commented Jan 16, 2019

Codecov Report

Merging #5836 into master will decrease coverage by 1.73%.
The diff coverage is 82.6%.

@@            Coverage Diff             @@
##           master    #5836      +/-   ##
==========================================
- Coverage   89.02%   87.29%   -1.74%     
==========================================
  Files         407      409       +2     
  Lines       73778    73888     +110     
  Branches    12238    12244       +6     
==========================================
- Hits        65684    64501    -1183     
- Misses       5213     6537    +1324     
+ Partials     2881     2850      -31

Copy link
Contributor Author

@massich massich left a comment

Choose a reason for hiding this comment

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

This commit should be reverted before merging. it points to OSF fork.

@larsoner
Copy link
Member

This pull request introduces 4 alerts when merging a681cd2 into 12a8549 - view on LGTM.com

new alerts:

  • 3 for Variable defined multiple times
  • 1 for Unused import

Comment posted by LGTM.com

@massich massich force-pushed the montage branch 2 times, most recently from d422506 to 9433f7c Compare February 15, 2019 14:52
@massich
Copy link
Contributor Author

massich commented Feb 15, 2019

I think EGI_256 is broken see https://11334-1301584-gh.circle-artifacts.com/0/dev/auto_examples/visualization/plot_montage.html (the .csd description was added in #1390)

@larsoner
Copy link
Member

This pull request introduces 2 alerts when merging 80f926a into 44c2ba4 - view on LGTM.com

new alerts:

  • 2 for Unused import

Comment posted by LGTM.com

@larsoner
Copy link
Member

This pull request introduces 2 alerts when merging d74beb5 into 8b00fc9 - view on LGTM.com

new alerts:

  • 2 for Unused import

Comment posted by LGTM.com

@massich
Copy link
Contributor Author

massich commented Feb 18, 2019

I'm a bit lost with the montage problems. here is a rendering of my first approach: load all the Montages and see what happen.

The second approach (which is the current PR state) I created a dummy class contaning a valid info['dig'] and plot the alignment. Just to play with the user API.
image

@agramfort , @larsoner wdyt? what am I missing?

In my opinion, the problem resides in the fact that info['dig'] is linked to trans. If you think that this makes sense from the user point of view, we recode all montages and distribute the trans. And if someone needs something new, they would need to provide the registration.

@larsoner
Copy link
Member

@massich the API proposal is in

#3893 (comment)

Which step are you on?

@larsoner
Copy link
Member

This pull request introduces 5 alerts when merging 1bf9e88 into 8b00fc9 - view on LGTM.com

new alerts:

  • 3 for Unused import
  • 1 for Variable defined multiple times
  • 1 for Unused exception object

Comment posted by LGTM.com

@massich
Copy link
Contributor Author

massich commented Feb 19, 2019

I've created a dummy version of Digitization that contains a valid info['dig'] list. (Where each element has kind, ident, r, and coord_frame. More over all coord_frame are 4, which represent the head coordinate) However in order to create the plot I need a trans that maps head->mri. Or we should have an fsaverage such that he trans head->mri is the identity.

But here is where I get lost, why do we need an object whose internal representation matches 1-to-1 with info['dig']? what should dev_head_t be? which part of the info['dig'] do we need to populate in
info['chs'][idx]['loc'][:6] and why do we need to keep duplicated data + visualization flags to toggle between one and the other?

@larsoner
Copy link
Member

This pull request introduces 5 alerts when merging 8570e86 into 4d932c2 - view on LGTM.com

new alerts:

  • 3 for Unused import
  • 1 for Variable defined multiple times
  • 1 for Unused exception object

Comment posted by LGTM.com

@agramfort
Copy link
Member

agramfort commented Feb 19, 2019 via email

@larsoner
Copy link
Member

Only need dev_head_t for MEG data.

why do we need an object whose internal representation matches 1-to-1 with info['dig']

Because we want all of the data from info['dig'] with some other convenience things. For example dig.plot() should just work, even if its internal representation of its data is this list of dict. Also, for example, dev_head_t computation comes into play for formats that give you points in two different coordinate frames, not just the head coord frame. In this case, matched points in the MEG coord frame and head coord frame can be used to give you the MEG<->Head transformation.

However in order to create the plot I need a trans that maps head->mri

We always have a trans parameter in our plotting functions to give the head<->MRI transformation, this should be the same. (It should not be part of the class.)

@agramfort
Copy link
Member

agramfort commented Feb 20, 2019 via email

@larsoner
Copy link
Member

Yes agreed, dev_head_t is a minor side note and in most cases should not be needed.

@larsoner
Copy link
Member

This pull request introduces 7 alerts when merging 2c27331 into 7c21bd6 - view on LGTM.com

new alerts:

  • 6 for Unused import
  • 1 for Unused exception object

Comment posted by LGTM.com

@larsoner
Copy link
Member

This pull request introduces 22 alerts when merging 0eb92d9 into 7c21bd6 - view on LGTM.com

new alerts:

  • 19 for Unused import
  • 2 for Unused local variable
  • 1 for Unused exception object

Comment posted by LGTM.com

@larsoner
Copy link
Member

This pull request introduces 15 alerts when merging 6631210 into 8dc4634 - view on LGTM.com

new alerts:

  • 9 for Unused import
  • 3 for Variable defined multiple times
  • 2 for Unused local variable
  • 1 for Unused exception object

Comment posted by LGTM.com

@larsoner
Copy link
Member

This pull request introduces 15 alerts when merging 8e7b839 into 4555011 - view on LGTM.com

new alerts:

  • 9 for Unused import
  • 3 for Variable defined multiple times
  • 2 for Unused local variable
  • 1 for Unused exception object

Comment posted by LGTM.com

massich pushed a commit to massich/mne-python that referenced this pull request Apr 15, 2019
@larsoner
Copy link
Member

This pull request introduces 9 alerts when merging e27ab27 into ece7543 - view on LGTM.com

new alerts:

  • 3 for Unused import
  • 3 for Variable defined multiple times
  • 2 for Unused local variable
  • 1 for Unused exception object

Comment posted by LGTM.com

@massich massich closed this May 27, 2019
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.

3 participants