Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Divider in brainvision files. #4354

Merged
merged 2 commits into from Jun 27, 2017
Merged

Conversation

jaeilepp
Copy link
Contributor

rf. mailing list.

The problem was that with long channel names the divider is single space and messes the split. It would be nice if someone with more experience with brainvision files would confirm this doesn't break anything.

@palday
Copy link
Contributor

palday commented Jun 27, 2017

The most likely place for this to break is if the BV format (either version) allows spaces in channel names (I don't know).
@teonbrooks @jona-sassenhagen Do you know ? I can try to dig into this further when working on my own BV PR for data orientation, but I'm already behind on getting that done ....

Copy link
Contributor

@palday palday left a comment

Choose a reason for hiding this comment

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

Instead of having separate 1.0 and 2.0 strings, it might make sense to have an iterable of supported numbers and loop over that because the initial part of the string doesn't change. This would make supporting additional version numbers in the future easier.

@jaeilepp
Copy link
Contributor Author

It looks like the version actually has nothing to do with this, but the header field can be used to find out if the unit is in the data.

The most likely place for this to break is if the BV format (either version) allows spaces in channel names (I don't know).

That's a good point. If that's the case, it's going to need some serious heuristics for this to work.

@codecov-io
Copy link

codecov-io commented Jun 27, 2017

Codecov Report

Merging #4354 into master will increase coverage by <.01%.
The diff coverage is 84.61%.

@@            Coverage Diff             @@
##           master    #4354      +/-   ##
==========================================
+ Coverage   86.07%   86.07%   +<.01%     
==========================================
  Files         346      346              
  Lines       63059    63065       +6     
  Branches     9691     9693       +2     
==========================================
+ Hits        54275    54281       +6     
  Misses       6115     6115              
  Partials     2669     2669

@larsoner
Copy link
Member

Instead of having separate 1.0 and 2.0 strings, it might make sense to have an iterable of supported numbers and loop over that because the initial part of the string doesn't change.

Yes I agree, @jaeilepp feel free to generalize it or we can do it once we hit a third use case.

I have no idea how the channels-with-spaces could work, hopefully they disallow it.

LGTM +1 for merge

@agramfort
Copy link
Member

merge if it works for people

thx

@palday
Copy link
Contributor

palday commented Jun 27, 2017

Go for merge and we can generalize the BV strings once we hit a third use case.

@larsoner larsoner merged commit 541bf85 into mne-tools:master Jun 27, 2017
@larsoner
Copy link
Member

Thanks @jaeilepp and @palday for looking

larsoner pushed a commit to larsoner/mne-python that referenced this pull request Aug 3, 2017
* Divider in brainvision files.

* Fix.
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.

None yet

5 participants