mne-tools / mne-tools/mne-python

Persyst reader ignores [SampleTimes] in the .lay file

Open
#12,339 2 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

Description of the problem

Summary:

The function mne.io.read_raw_persyst does not take into account the [SampleTimes] section of .lay file, and thus, misses the position of recording discontinuity.

Full explanation with codes can be found here:
https://mne.discourse.group/t/issue-when-reading-persyst-files-wrong-position-of-gaps/8059

Steps to reproduce
Code examples to reproduce the issue can be found here:
https://mne.discourse.group/t/issue-when-reading-persyst-files-wrong-position-of-gaps/8059
Link to data

No response

Expected results

The time column obtained with the function to_data_frame(), called from a RawPersyst object, should be corrected for the physical times informed in the section [SampleTimes] in the .lay file.

Actual results

The time column obtained with the function to_data_frame(), called from a RawPersyst object, considers that the EEG samples were all sequentially recorded (without discontinuity).

Additional information

Details and codes are described here:
https://mne.discourse.group/t/issue-when-reading-persyst-files-wrong-position-of-gaps/8059

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

Start with mne.io.read_raw_persyst and the RawPersyst.to_data_frame() path, then read the linked Discourse explanation and reproduction code. Verify how the .lay file's [SampleTimes] section represents gaps. Done means the returned time column reflects the physical recording times and discontinuities instead of assuming sequential samples.

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
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.