mne-tools / mne-python

MNE: Magnetoencephalography (MEG) and Electroencephalography (EEG) in Python
https://mne.tools
BSD 3-Clause "New" or "Revised" License
2.76k stars 1.33k forks source link

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

Closed haribharadwaj closed 11 years ago

haribharadwaj commented 11 years ago

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.

dengemann commented 11 years ago

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

haribharadwaj commented 11 years ago

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]

dengemann commented 11 years ago

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

mshamalainen commented 11 years ago

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

On Nov 26, 2013, at 3:52 PM, Denis A. Engemann notifications@github.com 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.

larsoner commented 11 years ago

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

haribharadwaj commented 11 years ago

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

teonbrooks commented 11 years ago

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