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

WIP: Add scalp coupling index for NIRS data #7215

Merged
merged 6 commits into from
Feb 11, 2020

Conversation

rob-luke
Copy link
Member

Reference issue

Discussed in #7057

What does this implement/fix?

This is the standard method for determining a good/bad channel in NIRS literature. It measures the quality of the connection between the sensor and the scalp. This is done by looking for the presence of heart rate in the nirs signal across the different wavelength signals. The data is band pass filtered to retain only the heart rate, then the correlation between signals is computed. See [1]

Additional information

I haven't added to the current fNIRS tutorial, mainly because I went to great lengths to get clean data for that recording, so the SCI doesn't show much.

I also moved two function from the beer lambert law file to the general nirs file, as these are also used in this function.

[1] Pollonini, Luca, et al. "Auditory cortex activation to natural
speech and simulated cochlear implant speech measured with functional
near infrared spectroscopy." Hearing research 309 (2014): 84-93.

@codecov
Copy link

codecov bot commented Jan 16, 2020

Codecov Report

Merging #7215 into master will increase coverage by 0.07%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #7215      +/-   ##
==========================================
+ Coverage   89.82%   89.89%   +0.07%     
==========================================
  Files         447      449       +2     
  Lines       80694    79960     -734     
  Branches    12876    12876              
==========================================
- Hits        72482    71881     -601     
+ Misses       5385     5244     -141     
- Partials     2827     2835       +8     

@rob-luke
Copy link
Member Author

@larsoner could you please review this PR. Thanks

@larsoner
Copy link
Member

I haven't added to the current fNIRS tutorial, mainly because I went to great lengths to get clean data for that recording, so the SCI doesn't show much.

Doesn't hurt to add it even if it is a no-op for these data. I would write something like this in the tutorial:

# Mark bad channels based on coupling index
# -----------------------------------------
# Next we run XXX method, which does YYY. These data are pretty
# clean, so the method will yield no # bad channels:

...

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.

LGTM, just some ideas for cleanups

@rob-luke
Copy link
Member Author

Thanks for the feedback @larsoner. I think I have addressed your issues (and raised a few questions above). Could you please review again.

@rob-luke rob-luke mentioned this pull request Jan 17, 2020
19 tasks
@rob-luke
Copy link
Member Author

@larsoner I'm not sure why these windows builds are failing. Could you please help me understand the build errors? Thanks

@larsoner
Copy link
Member

@rob-luke we are having some random errors that hopefully will be fixed soon by #7295. If this is good to go from your end let me know and I'll take a look

@rob-luke
Copy link
Member Author

@larsoner, yes I think I have addressed all your previous comments. Could you please review again.

@larsoner larsoner merged commit b15366d into mne-tools:master Feb 11, 2020
@larsoner
Copy link
Member

Thanks @rob-luke !

AdoNunes pushed a commit to AdoNunes/mne-python that referenced this pull request Apr 6, 2020
* Add scalp coupling index for NIRS data

* Improve tests for scalp coupling index and referencing

* Add scalp coupling index to nirs tutorial

* Ensure SCI is run on optical density data

* Fix flake errors in scalp coupling index code
AdoNunes pushed a commit to AdoNunes/mne-python that referenced this pull request Apr 6, 2020
* Add scalp coupling index for NIRS data

* Improve tests for scalp coupling index and referencing

* Add scalp coupling index to nirs tutorial

* Ensure SCI is run on optical density data

* Fix flake errors in scalp coupling index code
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