mne-tools / mne-python

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

MNE and Nihon Kohden: cannot read the metadata from the .PNT file #9838

Open hotblack91 opened 3 years ago

hotblack91 commented 3 years ago

Describe the bug

I'm working with EEG data acquired using a Nihon Kohden EEG - 2100 system. I'm trying to get some some of the metadata stored in the .PNT files like meas_id, first_name and last_name of the patient and so on.

When I do an hexdump -C of the .PNT file from the command line I can see some of those information but when I try to read the raw file using mne and execute raw.info['meas_id'], or raw.info['subject_info'] I get empty strings.

Steps to reproduce

import mne

raw = mne.io.read_raw_nihon(fname="myNihonFile.EEG", preload=True)

print(raw.info['meas_id'])
None

print(raw.info['subject_info'])
None

Expected results

Informations like meas_id and subject_info.

Actual results

Empty strings instead of the stored information.

Additional information

I have also tried to use the function mne.io.nihon.nihon._read_nihon_metadata("myFile.PNT") but I get the a dictionary with only two entries, namely version and meas_date.

agramfort commented 3 years ago

can you share the file privately or publicly?

hotblack91 commented 3 years ago

can you share the file privately or publicly?

I think no since it contains sensible information about the patient :(

agramfort commented 3 years ago

then you'll need to pinpoint the issue in the code yourself