Skip to content

[MRG] Add support for adding dig points from montage. - #4444

Merged
agramfort merged 4 commits into
mne-tools:masterfrom
jaeilepp:digmontage-to-gui
Aug 3, 2017
Merged

agramfort merged 4 commits into
mne-tools:masterfrom
jaeilepp:digmontage-to-gui

Conversation

@jaeilepp

@jaeilepp jaeilepp commented Aug 1, 2017 •

Copy link
Copy Markdown
Contributor

Allows reading the digitization points from a saved DigMontage.

@jaeilepp jaeilepp changed the title Add support for adding dig points from montage. [MRG] Add support for adding dig points from montage. Aug 1, 2017
@jaeilepp

jaeilepp commented Aug 1, 2017

Copy link
Copy Markdown
Contributor Author

Ready for review.

@agramfort

Copy link
Copy Markdown
Member

+1 for merge when CIs are happy and what's new is updated.

@christianbrodbeck christianbrodbeck left a comment

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.

Apart from the comment looks good to me.

Comment thread mne/gui/_file_traits.py Outdated
if info['dig'] is None:
try:
info = read_info(self.file, verbose=False)
except ValueError: # try reading dig_montage

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 don't like silencing errors that might be real.

Could the modification be in read_info(), which could create an info dict when given a montage file?

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.

How about just logging the error message before looking for DigMontage? I don't like the idea of changing the behavior of the public function.

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.

That will clutter the log with an error message in the other case where there is no error to be concerned about. I think returning an info dict with the montage would be a logical extension of read_info (only change a case that was not functional previously), but if you don't want to change read_info, can you read the header of the file to determine what kind of file it is and treat it accordingly?

@codecov-io

codecov-io commented Aug 1, 2017 •

Copy link
Copy Markdown

Codecov Report

Merging #4444 into master will increase coverage by <.01%.
The diff coverage is 93.54%.

@@            Coverage Diff             @@
##           master    #4444      +/-   ##
==========================================
+ Coverage   82.82%   82.83%   +<.01%     
==========================================
  Files         349      349              
  Lines       64424    64452      +28     
  Branches     9915     9919       +4     
==========================================
+ Hits        53361    53388      +27     
  Misses       8324     8324              
- Partials     2739     2740       +1

@agramfort

Copy link
Copy Markdown
Member

@christianbrodbeck merge when you're happy

@jaeilepp
jaeilepp force-pushed the digmontage-to-gui branch from e978498 to 96a5287 Compare August 2, 2017 07:23
@jaeilepp

jaeilepp commented Aug 2, 2017

Copy link
Copy Markdown
Contributor Author

Now it checks the file header.

@agramfort
agramfort merged commit 25c1e64 into mne-tools:master Aug 3, 2017
@agramfort

Copy link
Copy Markdown
Member

thx @jaeilepp

@jaeilepp
jaeilepp deleted the digmontage-to-gui branch August 3, 2017 08:32
@jaeilepp

jaeilepp commented Aug 3, 2017

Copy link
Copy Markdown
Contributor Author

Should I update the SPM dataset again and use the dig montage instead of the raw file?

@agramfort

agramfort commented Aug 3, 2017 via email

Copy link
Copy Markdown
Member

@larsoner larsoner mentioned this pull request Aug 4, 2017
26 of 29 tasks
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