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

[FIX] Rename channels.tsv column: orientation_component to component #1417

Merged
merged 9 commits into from
Feb 15, 2023
Merged
24 changes: 12 additions & 12 deletions src/modality-specific-files/near-infrared-spectroscopy.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,18 +206,18 @@ Any of the channel types defined in other BIDS specification MAY be used here as
As several of these data types are commonly acquired using NIRS devices they are included as an example at the base of the table.
Note that upper-case is REQUIRED.

| **Keyword** | **Description** |
| --------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| NIRSCWAMPLITUDE | Continuous wave amplitude measurements. Equivalent to dataType 001 in SNIRF. |
| NIRSCWFLUORESCENSEAMPLITUDE | Continuous wave fluorescence amplitude measurements. Equivalent to dataType 051 in SNIRF. |
| NIRSCWOPTICALDENSITY | Continuous wave change in optical density measurements. Equivalent to dataTypeLabel dOD in SNIRF. |
| NIRSCWHBO | Continuous wave oxygenated hemoglobin (oxyhemoglobin) concentration measurements. Equivalent to dataTypeLabel HbO in SNIRF. |
| NIRSCWHBR | Continuous wave deoxygenated hemoglobin (deoxyhemoglobin) concentration measurements. Equivalent to dataTypeLabel HbR in SNIRF. |
| NIRSCWMUA | Continuous wave optical absorption measurements. Equivalent to dataTypeLabel mua in SNIRF. |
| ACCEL | Accelerometer channel, one channel for each orientation. An extra column `component` for the axis of the orientation MUST be added to the `*_channels.tsv` file (x, y or z). |
| GYRO | Gyrometer channel, one channel for each orientation. An extra column `component` for the axis of the orientation MUST be added to the `*_channels.tsv` file (x, y or z). |
| MAGN | Magnetomenter channel, one channel for each orientation. An extra column `component` for the axis of the orientation MUST be added to the `*_channels.tsv` file (x, y or z). |
| MISC | Miscellaneous |
| **Keyword** | **Description** |
| --------------------------- | -----------------------------------------------------------------------------------------------------------------------------------------------------------|
| NIRSCWAMPLITUDE | Continuous wave amplitude measurements. Equivalent to dataType 001 in SNIRF. |
| NIRSCWFLUORESCENSEAMPLITUDE | Continuous wave fluorescence amplitude measurements. Equivalent to dataType 051 in SNIRF. |
| NIRSCWOPTICALDENSITY | Continuous wave change in optical density measurements. Equivalent to dataTypeLabel dOD in SNIRF. |
| NIRSCWHBO | Continuous wave oxygenated hemoglobin (oxyhemoglobin) concentration measurements. Equivalent to dataTypeLabel HbO in SNIRF. |
| NIRSCWHBR | Continuous wave deoxygenated hemoglobin (deoxyhemoglobin) concentration measurements. Equivalent to dataTypeLabel HbR in SNIRF. |
| NIRSCWMUA | Continuous wave optical absorption measurements. Equivalent to dataTypeLabel mua in SNIRF. |
| ACCEL | Accelerometer channel, one channel for each spatial axis. An extra column `component` for the axis MUST be added to the `*_channels.tsv` file (x, y or z). |
| GYRO | Gyrometer channel, one channel for each spatial axis. An extra column `component` for the axis MUST be added to the `*_channels.tsv` file (x, y or z). |
| MAGN | Magnetomenter channel, one channel for each spatial axis. An extra column `component` for the axis MUST be added to the `*_channels.tsv` file (x, y or z). |
| MISC | Miscellaneous |

### Example `*_channels.tsv`

Expand Down
15 changes: 11 additions & 4 deletions src/schema/objects/columns.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -308,16 +308,23 @@ onset:
acquired data point.
type: number
unit: s
orientation_component:
name: orientation_component
display_name: Orientation Component
component:
name: component
display_name: Component
description: |
Description of the orientation of the channel.
Description of the spatial axis or label of quaternion component associated with the channel.
For example, `x`,`y`,`z` for position channels,
or `quat_x`, `quat_y`, `quat_z`, `quat_w` for quaternion orientation channels.
type: string
enum:
- x
- y
- z
- quat_x
- quat_y
- quat_z
- quat_w
sjeung marked this conversation as resolved.
Show resolved Hide resolved
- n/a
pathology:
name: pathology
display_name: Pathology
Expand Down
4 changes: 2 additions & 2 deletions src/schema/rules/checks/nirs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,14 @@ ShortChannelCountReq:
checks:
- sidecar.ShortChannelCount == count(associations.channels.short_channel, true)

OrientationComponent:
Component:
selectors:
- datatype == "nirs"
- suffix == "channels"
- extension == ".tsv"
- intersect(columns.type, ["ACCEL", "GYRO", "MAGN"])
checks:
- columns.orientation_component != null
- columns.component != null

RequiredChannels:
selectors:
Expand Down
2 changes: 1 addition & 1 deletion src/schema/rules/tabular_data/nirs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ nirsChannels:
sampling_frequency:
level: optional
level_addendum: required if `SamplingFrequency` is `n/a` in `_nirs.json`
orientation_component:
component:
level: optional
level_addendum: required if `type` is `ACCEL`, `GYRO` or `MAGN`
wavelength_actual: optional
Expand Down