mne-tools / mne-python

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

Nihon Kohden file (.LOG) annotations read incorrectly #11267

Open kulasbart opened 1 year ago

kulasbart commented 1 year ago

Description of the problem

Hi there. I have some EEG data recorded using the Nihon Kohden (NK) system, this data includes .EEG files which store the raw EEG recording, but also the extension files: .21E, .PNT, .LOG ( https://mne.tools/0.21/auto_tutorials/io/plot_20_reading_eeg_data.html#nihon-kohden-eeg-data-eeg-21e-pnt-log)

The .LOG extension file store the annotated event time stamps. I need precise annotation times but I'm only getting timestamps rounded to the nearest full second. Has anybody dealt with this file format or have suggestions on how to add more precise annotation support

Steps to reproduce

import mne

f = mne.io.read_raw_nihon(file_path)
f.annotations

Link to data

No response

Expected results

I tried to use the EDF browser Nihon Kohden to EDF+ tool. The output had more precise annotations - including milliseconds. Will also try to validate this on BESA

Actual results

mne.io.read_raw_nihon.annotations returns the 'onset' timestamp rounded to the nearest second

Screen Shot 2022-10-20 at 9 54 06 PM

Additional information

I've played around with the _read_nihon_annotations method in https://github.com/mne-tools/mne-python/blob/main/mne/io/nihon/nihon.py without any luck. Unable to decode to LOG files into a format other than the datetime '%H%M%S' format provided

welcome[bot] commented 1 year ago

Hello! 👋 Thanks for opening your first issue here! ❤️ We will try to get back to you soon. 🚴🏽‍♂️

larsoner commented 1 year ago

Link to data

No response

Can you share data that we can use to test? Then someone can take a look and try to fix it