Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 7 commits into from
Jan 2, 2023

Conversation

rob-luke
Copy link
Member

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

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
Copy link
Member Author

rob-luke commented Jan 2, 2023

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

Copy link
Member

@larsoner larsoner left a comment

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