mne-tools / mne-tools/mne-python
Support fNIRS data with more than two wavelengths (e.g. Shimadzu devices or broadband fNIRS)
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 3.5k
- Forks
- 1.6k
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 100
Description
Describe the new feature or enhancement
Support for fNIRS data acquired with three wavelengths, specifically from Shimadzu fNIRS devices.
Describe your proposed implementation
Using mne-python v0.24.dev0 and mne-nirs v0.1.2.dev, read_raw_snirf() will not load fNIRS data with 3 wavelengths (780, 805, 830) and expects only 2 wavelengths. The error message is "NIRS channels not ordered correctly. Channels must be ordered as source detector pairs with alternating frequencies: 780 & 805"
Using previous versions of mne-python (0.21.2) and mne-nirs (v0.0.1), it was possible to load the 3-wavelength data then to use drop_channels() to remove the channels associated with wavelength 830 before proceeding.
Here is some some sample data: sample_shimadzu_data.snirf
Thanks in advance!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the failure in read_raw_snirf() with the linked sample_shimadzu_data.snirf file, then inspect how wavelength ordering is validated. Compare the three-wavelength case with the existing two-wavelength behavior and verify that the data loads without requiring wavelength 830 to be dropped. Add or update focused tests for the supported ordering and run the relevant test suite.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100