mne-tools / mne-tools/mne-python

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

Open
#9,838 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

BUG
Dominant language
Python
Stars
3.5k
Forks
1.6k
Avg merge
1d 6h
Merged PRs (30d)
100

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue with mne.io.read_raw_nihon and inspect mne.io.nihon.nihon._read_nihon_metadata using the .PNT file. Trace why only version and meas_date are returned, then verify that available meas_id and subject_info fields are populated when reading the Nihon Kohden recording.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.