mne-python icon indicating copy to clipboard operation
mne-python copied to clipboard

BUG: HPTS file parser in edf.py misses coordinates specified as "floats"

Open haribharadwaj opened this issue 13 years ago • 7 comments

So it looks like the lines are parsed with a pattern that would necessitate the electrode coordinates to be integers. I can work on a quick fix.

haribharadwaj avatar Nov 26 '13 20:11 haribharadwaj

@haribharadwaj thanks for reporting, could you provide a code snippet that exposes this issue? Thanks

dengemann avatar Nov 26 '13 20:11 dengemann

raw = edf.read_raw_edf(edfname, hpts = 'biosemi32.hpts')

where biosemi32.hpts contains lines such such as: eeg Fp1 -18.60 57.0 -1.80

Resulting in: raw.info['chs'][:]['eeg_loc'] assigned to [0,0,0]

haribharadwaj avatar Nov 26 '13 20:11 haribharadwaj

Thanks, I think this is for @t3on . Might also be related to our discussion in #926

dengemann avatar Nov 26 '13 20:11 dengemann

As a workaround, mne_edf2fiff in MNE-C should handle this correctly.

  • Matti

On Nov 26, 2013, at 3:52 PM, Denis A. Engemann [email protected] wrote:

Thanks, I think this is for @t3on . Might also be related to our discussion in #926

— Reply to this email directly or view it on GitHub.

The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail.

mshamalainen avatar Nov 26 '13 20:11 mshamalainen

Perhaps tangentially related to that issue... but I think this case is sufficiently isolated from that issue that the fixes could be separate, though.

larsoner avatar Nov 26 '13 20:11 larsoner

I can confirm that mne_edf2fiff (which is what I used previously) in MNE-C does handle it correctly.

haribharadwaj avatar Nov 26 '13 20:11 haribharadwaj

This has been resolved. see https://github.com/mne-tools/mne-python/pull/932

teonbrooks avatar Nov 27 '13 01:11 teonbrooks