Skip to content

Update wavelengthIndex description for processed data - #175

Open
sreekanthkura7 wants to merge 2 commits into
fNIRS:masterfrom
sreekanthkura7:master
Open

Update wavelengthIndex description for processed data#175
sreekanthkura7 wants to merge 2 commits into
fNIRS:masterfrom
sreekanthkura7:master

Conversation

@sreekanthkura7

@sreekanthkura7 sreekanthkura7 commented Jan 12, 2026

Copy link
Copy Markdown
Collaborator

Clarified requirements for wavelengthIndex in processed data.

Closes #174

Clarified requirements for wavelengthIndex in processed data.

@HanBnrd HanBnrd left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @sreekanthkura7, good catch! Looks good to me!

@Horschig

Horschig commented Jan 26, 2026

Copy link
Copy Markdown
Collaborator

I guess this change would require a respective adjustment in the validator, right? Is @sstucker still the designated validator maintainer?

@jcrdubois

Copy link
Copy Markdown

is this the final convention that has been decided on? Some readers have made their own convention, e.g. Cedalion uses -1 https://github.com/ibs-lab/cedalion/blob/main/src/cedalion/io/snirf.py#L1003

@HanBnrd

HanBnrd commented Jul 16, 2026

Copy link
Copy Markdown
Member

I guess this change would require a respective adjustment in the validator, right? Is @sstucker still the designated validator maintainer?

The validator has a bit of backlog on the specs, we could sort this as part of #183

is this the final convention that has been decided on? Some readers have made their own convention, e.g. Cedalion uses -1 https://github.com/ibs-lab/cedalion/blob/main/src/cedalion/io/snirf.py#L1003

@sreekanthkura7 could we do -1 instead of 0 eventually?

@Horschig

Copy link
Copy Markdown
Collaborator

I do not mind if 0 or -1, but it'd be good to proceed.

@HanBnrd
HanBnrd self-requested a review August 10, 2026 21:41
Comment thread snirf_specification.md
* **Location**: `/nirs(i)/data(j)/measurementList(k)/wavelengthIndex`

Index of the "nominal" wavelength (in `probe.wavelengths`).
Index of the "nominal" wavelength (in `probe.wavelengths`). For processed data channels (dataType=99999) that are wavelength-independent or derived from multiple wavelengths, this field MUST be set to `0`.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Index of the "nominal" wavelength (in `probe.wavelengths`). For processed data channels (dataType=99999) that are wavelength-independent or derived from multiple wavelengths, this field MUST be set to `0`.
Index of the "nominal" wavelength (in `probe.wavelengths`). For processed data channels (dataType=99999) that are wavelength-independent or derived from multiple wavelengths, this field MUST be set to `-1`.

Comment thread snirf_specification.md
* **Location**: `/nirs(i)/data(j)/measurementLists/wavelengthIndex`

Index of the "nominal" wavelength (in `probe.wavelengths`) for each channel. A 1-D array with length equal to the size of the second dimension of `/nirs(i)/data(j)/dataTimeSeries`.
Index of the "nominal" wavelength (in `probe.wavelengths`) for each channel. A 1-D array with length equal to the size of the second dimension of `/nirs(i)/data(j)/dataTimeSeries`. For processed data channels (`dataType=99999`) that are wavelength-independent or derived from multiple wavelengths, the corresponding value MUST be `0`.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Index of the "nominal" wavelength (in `probe.wavelengths`) for each channel. A 1-D array with length equal to the size of the second dimension of `/nirs(i)/data(j)/dataTimeSeries`. For processed data channels (`dataType=99999`) that are wavelength-independent or derived from multiple wavelengths, the corresponding value MUST be `0`.
Index of the "nominal" wavelength (in `probe.wavelengths`) for each channel. A 1-D array with length equal to the size of the second dimension of `/nirs(i)/data(j)/dataTimeSeries`. For processed data channels (`dataType=99999`) that are wavelength-independent or derived from multiple wavelengths, the corresponding value MUST be `-1`.

@samuelpowell samuelpowell left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change is breaking, requires entries in CHANGELOG, etc.?

@Edouard2laire

Copy link
Copy Markdown
Collaborator

Is there a reason why we want to enforce a specific value here? We could make the change non-breaking by saying that if the data are processed and wavelength independent; that the value can be absent or any value.

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.

[Suggestion] How Should wavelengthIndex Be Defined for Multi-Wavelength Processed Data?

7 participants