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

Discrepancy between MNE-NIRS and QT-NIRS for SCI peak power #503

Open
alkvi opened this issue Apr 6, 2023 · 1 comment
Open

Discrepancy between MNE-NIRS and QT-NIRS for SCI peak power #503

alkvi opened this issue Apr 6, 2023 · 1 comment

Comments

@alkvi
Copy link

alkvi commented Apr 6, 2023

Issue

Hello,

I wanted to use MNE-NIRS to calculate peak spectral power as in the PHOEBE paper, or the QT-NIRS / NIRSplot paper by Hernandez and Pollonini.

However I noticed I was getting some different values in QT-NIRS (https://github.com/lpollonini/qt-nirs) and mne_nirs.preprocessing.peak_power (https://mne.tools/mne-nirs/stable/generated/mne_nirs.preprocessing.peak_power.html).

Basically, the QT-NIRS values were lower than the MNE-NIRS values (for the same cut-offs and window).

I assume one or the other is more correct!

Steps to reproduce

Comparing the used periodogram functions
https://github.com/lpollonini/qt-nirs/blob/master/qtnirs.m#L1029
and
https://github.com/mne-tools/mne-nirs/blob/main/mne_nirs/preprocessing/_peak_power.py#L104
it looks like the default in scipy.signal is to use PSD scaling, while the MATLAB implementation of qt-nirs is specifying "power" scaling.

I ran a comparison on an open dataset (the FRESH audio dataset) and took some averages for each subject.
See attached folder for processing steps.
mne_nirs_sci_power.zip

Result diff

Averages for QT-NIRS implementation

0.226887891598819
0.153682639050584
0.220944569551051
0.311272956767088
0.273401685459613
0.232952474099784
0.190741282065384
0.142666648555279
0.13782339406341
0.327983547633153
0.329524300901279
0.28205343407653
0.190604660582288
0.155480218804427
0.317809807027852
0.269750679052029
0.31070217675301

Averages for MNE-NIRS implementation

1.5931549820246793
0.9589639974878584
1.4504081012101064
2.0537778532070807
1.9185792437291618
1.5456842639060036
1.383875827631576
0.7911793927586688
1.2391833144473723
2.4082828268910137
2.123637004744824
2.092006310707082
1.189042103492612
1.0577454694448551
2.0752410677551687
1.694990995500319
2.008712062188033

The QT-NIRS values look closer to ranges discussed in the PHOEBE paper.
Not sure if I'm getting some processing step wrong, or this is expected, but the scaling looks different at least.

Additional information

>>> mne.sys_info()
Platform:         Windows-10-10.0.19045-SP0
Python:           3.9.7 (tags/v3.9.7:1016ef3, Aug 30 2021, 20:19:38) [MSC v.1929 64 bit (AMD64)]
Executable:       C:\Program Files (x86)\Python\python.exe
CPU:              Intel64 Family 6 Model 140 Stepping 1, GenuineIntel: 8 cores
Memory:           15.7 GB

mne:              1.3.0
numpy:            1.21.2 {OpenBLAS 0.3.17 with 8 threads}
scipy:            1.9.1
matplotlib:       3.4.3 {backend=Qt5Agg}

sklearn:          1.0.2
numba:            Not found
nibabel:          4.0.1
nilearn:          0.9.1
dipy:             Not found
openmeeg:         Not found
cupy:             Not found
pandas:           2.0.0
pyvista:          Not found
pyvistaqt:        Not found
ipyvtklink:       Not found
vtk:              Not found
qtpy:             2.2.0 {PyQt5=5.15.2}
ipympl:           Not found
pyqtgraph:        Not found
pooch:            v1.6.0

mne_bids:         0.11.1
mne_nirs:         0.6.dev0
mne_features:     Not found
mne_qt_browser:   Not found
mne_connectivity: Not found
mne_icalabel:     Not found
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

No branches or pull requests

1 participant