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

Proposal: measurementLists Group as alternative to many measurementList1...measurementList2 indexed groups #115

Merged
merged 12 commits into from
Aug 23, 2024
1 change: 1 addition & 0 deletions .github/workflows/wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -280,3 +280,4 @@ OBELAB
forihuelaespina
StO
StO2
measurementLists
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

SNIRF uses the [Semantic Versioning](https://semver.org) scheme.

### `2.0` In development
* Add `nirs(i)/data(j)/measurementLists` as an alternative to the indexed-Group measurementList `nirs(i)/data(j)/measurementList(k)`.

### `v1.1`

Expand Down
121 changes: 117 additions & 4 deletions snirf_specification.md
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ a time spacing of 0.2 (s) indicates a sampling rate of 5 Hz.
Chunked data is allowed to support real-time streaming of data in this array.

#### /nirs(i)/data(j)/measurementList(k)
* **Presence**: required
* **Presence**: required if `measurementLists` is not present
* **Type**: indexed group
* **Location**: `/nirs(i)/data(j)/measurementList(k)`

Expand Down Expand Up @@ -565,6 +565,119 @@ As described below, optional variables `probe.sourceLabels` and
`probe.detectorLabels` are provided for indicating the instrument specific
label for sources and detectors.

#### /nirs(i)/data(j)/measurementLists
* **Presence**: optional
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should this be 'required if measurementList is not present' for parity with @dboas changes to measurementList(k)?

* **Type**: group
* **Location**: `/nirs(i)/data(j)/measurementLists`

The group for measurement list variables which map the data array onto the probe geometry (sources and detectors), data type, and wavelength. This group's datasets are arrays with size `<number of channels>`, with each position describing the corresponding column in the data matrix. (i.e. the values at `measurementLists/sourceIndex(3)` and `measurementLists/detectorIndex(3)` correspond to `dataTimeSeries(:,3)`).

This group is required only if the indexed-group format `/nirs(i)/data(j)/measurementList(k)` is not used to encode the measurement list. `measurementLists` is an alternative that may offer better performance for larger probes.

The arrays of `measurementLists` are:
samuelpowell marked this conversation as resolved.
Show resolved Hide resolved

#### /nirs(i)/data(j)/measurementLists/sourceIndex
* **Presence**: required if measurementLists is present
* **Type**: integer 1-D array
* **Location**: `/nirs(i)/data(j)/measurementLists/sourceIndex`

Must be 1-D array with length equal to the size of the second dimension of `/nirs(i)/data(j)/dataTimeSeries`. Source indices for each channel.
samuelpowell marked this conversation as resolved.
Show resolved Hide resolved

#### /nirs(i)/data(j)/measurementLists/detectorIndex
* **Presence**: required if measurementLists is present
* **Type**: integer 1-D array
* **Location**: `/nirs(i)/data(j)/measurementLists/detectorIndex`

Must be 1-D array with length equal to the size of the second dimension of `/nirs(i)/data(j)/dataTimeSeries`. Detector indices for each channel.

#### /nirs(i)/data(j)/measurementLists/wavelengthIndex
* **Presence**: required if measurementLists is present
* **Type**: integer 1-D array
* **Location**: `/nirs(i)/data(j)/measurementLists/wavelengthIndex`

Must be 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`) per channel.
samuelpowell marked this conversation as resolved.
Show resolved Hide resolved

#### /nirs(i)/data(j)/measurementLists/wavelengthActual
* **Presence**: optional
* **Type**: numeric 1-D array
* **Location**: `/nirs(i)/data(j)/measurementLists/wavelengthActual`

Must be 1-D array with length equal to the size of the second dimension of `/nirs(i)/data(j)/dataTimeSeries`. Actual (measured) wavelength in nm, if available, for the source in each channel.

#### /nirs(i)/data(j)/measurementLists/wavelengthEmissionActual
* **Presence**: optional
* **Type**: numeric 1-D array
* **Location**: `/nirs(i)/data(j)/measurementLists/wavelengthEmissionActual`

Must be 1-D array with length equal to the size of the second dimension of `/nirs(i)/data(j)/dataTimeSeries`. Actual (measured) emission wavelength in nm, if available, for the source in each channel.

#### /nirs(i)/data(j)/measurementLists/dataType
* **Presence**: required if measurementLists is present
* **Type**: integer 1-D array
* **Location**: `/nirs(i)/data(j)/measurementLists/dataType`

Must be 1-D array with length equal to the size of the second dimension of `/nirs(i)/data(j)/dataTimeSeries`. See Appendix for list of possible values.

#### /nirs(i)/data(j)/measurementLists/dataUnit
* **Presence**: optional
* **Type**: string 1-D array
* **Location**: `/nirs(i)/data(j)/measurementLists/dataUnit`

Must be 1-D array with length equal to the size of the second dimension of `/nirs(i)/data(j)/dataTimeSeries`. International System of Units (SI units) identifier for each channel.

#### /nirs(i)/data(j)/measurementLists/dataTypeLabel
* **Presence**: optional
* **Type**: string 1-D array
* **Location**: `/nirs(i)/data(j)/measurementLists/dataTypeLabel`

Data-type label. Must be 1-D array with length equal to the size of the second dimension of `/nirs(i)/data(j)/dataTimeSeries`.

#### /nirs(i)/data(j)/measurementLists/dataTypeIndex
* **Presence**: required if measurementLists is present
* **Type**: integer 1-D array
* **Location**: `/nirs(i)/data(j)/measurementLists/dataTypeIndex`

Data-type specific parameter indices. Must be 1-D array with length equal to the size of the second dimension of `/nirs(i)/data(j)/dataTimeSeries`. Note that the Time Domain and Diffuse Correlation Spectroscopy data types have two additional parameters and so `dataTimeIndex` must be a 2-D array with 2 columns that index the additional parameters.

#### /nirs(i)/data(j)/measurementLists/sourcePower
* **Presence**: optional
* **Type**: numeric 1-D array
* **Location**: `/nirs(i)/data(j)/measurementLists/sourcePower`

Must be 1-D array with length equal to the size of the second dimension of `/nirs(i)/data(j)/dataTimeSeries`. Units are optionally defined in `metaDataTags`.

#### /nirs(i)/data(j)/measurementLists/detectorGain
* **Presence**: optional
* **Type**: numeric 1-D array
* **Location**: `/nirs(i)/data(j)/measurementLists/detectorGain`

Must be 1-D array with length equal to the size of the second dimension of `/nirs(i)/data(j)/dataTimeSeries`. Units are optionally defined in `metaDataTags`.

#### /nirs(i)/data(j)/measurementLists/moduleIndex
Copy link
Collaborator

Choose a reason for hiding this comment

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

Remove field

* **Presence**: optional
* **Type**: integer 1-D array
* **Location**: `/nirs(i)/data(j)/measurementLists/moduleIndex`

Index of a repeating module. Must be 1-D array with length equal to the size of the second dimension of `/nirs(i)/data(j)/dataTimeSeries`.

#### /nirs(i)/data(j)/measurementLists/sourceModuleIndex
samuelpowell marked this conversation as resolved.
Show resolved Hide resolved
* **Presence**: optional
* **Type**: integer 1-D array
* **Location**: `/nirs(i)/data(j)/measurementLists/sourceModuleIndex`

Index of the module that contains the source of the channel.
This index must be used together with `detectorModuleIndex`, and
can not be used when `moduleIndex` presents. Must be 1-D array with length equal to the size of the second dimension of `/nirs(i)/data(j)/dataTimeSeries`.

#### /nirs(i)/data(j)/measurementLists/detectorModuleIndex
samuelpowell marked this conversation as resolved.
Show resolved Hide resolved
* **Presence**: optional
* **Type**: integer 1-D array
* **Location**: `/nirs(i)/data(j)/measurementLists/detectorModuleIndex`
samuelpowell marked this conversation as resolved.
Show resolved Hide resolved

Index of the module that contains the detector of the channel.
This index must be used together with `sourceModuleIndex`, and
can not be used when `moduleIndex` presents. Must be 1-D array with length equal to the size of the second dimension of `/nirs(i)/data(j)/dataTimeSeries`.

#### /nirs(i)/stim(j)
* **Presence**: optional
* **Type**: indexed group
Expand Down Expand Up @@ -602,7 +715,7 @@ used to annotate the meanings of each data column.

#### /nirs(i)/stim(j)/dataLabels
* **Presence**: optional
* **Type**: string array
* **Type**: string 1-D array
* **Location**: `/nirs(i)/stim(j)/dataLabels(k)`

This is a string array providing annotations for each data column in
Expand Down Expand Up @@ -782,7 +895,7 @@ wavelengths>`. This is indexed by `measurementList(k).sourceIndex` and

#### /nirs(i)/probe/detectorLabels
* **Presence**: optional
* **Type**: string array
* **Type**: string 1-D array
* **Location**: `/nirs(i)/probe/detectorLabels(j)`

This is a string array providing user friendly or instrument specific labels
Expand Down Expand Up @@ -821,7 +934,7 @@ index to the labels of the given landmark. Label names are stored in the

#### /nirs(i)/probe/landmarkLabels(j)
* **Presence**: optional
* **Type**: string array
* **Type**: string 1-D array
* **Location**: `/nirs(i)/probe/landmarkLabels(j)`

This string array stores the names of the landmarks. The first string denotes
Expand Down
Loading