Feature/td nirs snirf#13938
Open
jcrdubois wants to merge 14 commits into
Open
Conversation
Add support for time-domain NIRS data types including: - TD gated histograms (fnirs_td_gated_amplitude) - TD moments (intensity, mean, variance) - Processed hemoglobin data (HbO/HbR) Updates constants, channel picking, covariance, defaults, and the SNIRF reader/tests to handle these new data types.
The old files (Portal_2021_11) don't conform to the SNIRF spec — they store HbO/HbR in micromolar without declaring dataUnit. Rather than adding heuristics, remove these tests. The files can be fixed upstream by adding a proper dataUnit field to the HDF5.
Check shape, channel type, photon count range, and that channel metadata (wavelength, time_delay * width) are populated.
TD gated channels measure photon counts from single-photon counting detectors, not voltages. Use FIFF_UNIT_UNITLESS (matching fnirs_td_moments_intensity) instead of FIFF_UNIT_V.
Member
|
@jcrdubois I merged the constants PR, I agree it's time to get this in! We wanted some example in |
1 task
Author
@larsoner added a TD moments example here I don't have a gated dataset available publicly yet, but maybe this is enough to demonstrate the moments? |
jcrdubois
commented
Jun 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #11064
What does this implement/fix?
read TD-fNIRS files, e.g. from Kernel Flow, with MNE.
Adds Hb, histograms, and moments support
TODO