Skip to content

[ENH] Read annotation duration from SNIRF files. - #11397

Merged
larsoner merged 7 commits into
mne-tools:mainfrom
rob-luke:snirfduration
Jan 2, 2023
Merged

larsoner merged 7 commits into
mne-tools:mainfrom
rob-luke:snirfduration

Conversation

@rob-luke

@rob-luke rob-luke commented Jan 2, 2023 •

Copy link
Copy Markdown
Member

Reference issue

Before this PR, when reading SNIRF files, the annotation durations were ALL set to 1.0

What does this implement/fix?

This PR changes the read_raw_snirf function to read annotation durations from the file.

Additional information

Relevant file type definition is here: https://github.com/fNIRS/snirf/blob/master/snirf_specification.md#nirsistimjdata

A PR has been opened to add correct stimulus duration to SNIRF writing at mne-tools/mne-nirs#497

@rob-luke

rob-luke commented Jan 2, 2023

Copy link
Copy Markdown
Member Author

@agramfort @larsoner @drammock this PR is ready for review. There is a failing CI, but I think it's unrelated. Thanks!

Comment thread mne/io/snirf/tests/test_snirf.py Resolved

@larsoner larsoner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pushed a couple of tiny commits, one to fix Azure and another to use np.full rather than np.ones(...) * 10), marking for merge when green -- thanks in advance @rob-luke !

@larsoner
larsoner enabled auto-merge (squash) January 2, 2023 14:00
@larsoner
larsoner merged commit 9b1e7dd into mne-tools:main Jan 2, 2023
larsoner added a commit to larsoner/mne-python that referenced this pull request Jan 3, 2023
* upstream/main:
  [ENH, MRG] Add info save method (mne-tools#11401)
  MAINT: Sanitize name lists (mne-tools#11399)
  [ENH] Read annotation duration from SNIRF files. (mne-tools#11397)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants