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

[ENH] Extend BIDS for Motion data (BEP029) #981

Merged
merged 153 commits into from
Mar 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
153 commits
Select commit Hold shift + click to select a range
f3f2199
[ENH] init commit for the BEP029 specification
JuliusWelzel Jan 10, 2022
d6b8ee3
[ENH] first complete draft of the BEP029 md
JuliusWelzel Jan 12, 2022
0559356
[ENH] updated draft after discussion with Sein
JuliusWelzel Jan 14, 2022
b637b09
_tracksys key in _motion.tsv file name is required
sjeung Jan 16, 2022
459ec4f
Modified initial section to match style of other extensions.
sjeung Jan 16, 2022
2bec555
Added field "MissingValues" in motion.json
sjeung Jan 17, 2022
238a225
Merge pull request #1 from sjeung/bep-029
JuliusWelzel Jan 18, 2022
e6d8866
Merge branch 'bids-standard:master' into bep-029
JuliusWelzel Jan 20, 2022
ae8e5ef
[FIX] 29-motion.md now checks
JuliusWelzel Jan 28, 2022
089b7e3
Merge branch 'bep-029' of https://github.com/JuliusWelzel/bids-specif…
JuliusWelzel Jan 28, 2022
4037578
'STY: Fixed Markdown style'
JuliusWelzel Jan 28, 2022
7b12520
[FIX] typos
JuliusWelzel Jan 28, 2022
fc7a22e
[FIX] typos
JuliusWelzel Jan 28, 2022
a0c186b
'STY: Fixed Markdown style'
JuliusWelzel Jan 28, 2022
52163f1
'STY: Fixed Markdown style'
JuliusWelzel Jan 28, 2022
9152e99
fetch upstream
JuliusWelzel Jan 28, 2022
1817738
[ENH] init commit for the BEP029 specification
JuliusWelzel Jan 10, 2022
2d8b536
[ENH] first complete draft of the BEP029 md
JuliusWelzel Jan 12, 2022
eeebe86
[ENH] updated draft after discussion with Sein
JuliusWelzel Jan 14, 2022
f11444d
_tracksys key in _motion.tsv file name is required
sjeung Jan 16, 2022
8f2b3aa
Modified initial section to match style of other extensions.
sjeung Jan 16, 2022
fca295b
Added field "MissingValues" in motion.json
sjeung Jan 17, 2022
0afbe2a
[FIX] 29-motion.md now checks
JuliusWelzel Jan 28, 2022
f790935
'STY: Fixed Markdown style'
JuliusWelzel Jan 28, 2022
bd3dc1c
Merge branch 'bep-029' of https://github.com/JuliusWelzel/bids-specif…
JuliusWelzel Jan 28, 2022
5c75434
Merge branch 'bids-standard:master' into bep-029
JuliusWelzel Jan 28, 2022
e8c7941
Merge branch 'bids-standard:master' into bep-029
JuliusWelzel May 19, 2022
57f8b1e
[FIX] Bring specification up to date with current BEP029 devs
JuliusWelzel May 19, 2022
ae3f666
[STY] Fixed Markdown style
JuliusWelzel May 20, 2022
ece49ae
Merge branch 'bep-029' of https://github.com/JuliusWelzel/bids-specif…
JuliusWelzel May 20, 2022
8b460a9
[STY] Fixed Markdown Style
JuliusWelzel May 20, 2022
fecddd4
[FIX] Bring specification up to date with current developments of BEP
JuliusWelzel May 27, 2022
52fe61e
[FIX] adding latency and misc channel options
JuliusWelzel May 27, 2022
52da025
[FIX] deleted *coordsys.json in example
JuliusWelzel May 28, 2022
41096fc
Update src/04-modality-specific-files/29-motion.md
JuliusWelzel Jun 16, 2022
cdde344
Update src/04-modality-specific-files/29-motion.md
JuliusWelzel Jun 16, 2022
7d6d4cd
[ADD] include review comments from @guiomar
JuliusWelzel Jun 16, 2022
3b5897d
[FIX] minor updates after second review
JuliusWelzel Jun 30, 2022
c83c2a6
[ADD] Explanation for events file in motion data
JuliusWelzel Jun 30, 2022
bf7d128
[FIX] include must be one of for various fields
JuliusWelzel Jun 30, 2022
3c7926b
[STY] Fixed MD style
JuliusWelzel Jun 30, 2022
4542319
Merge branch 'bids-standard:master' into bep-029
JuliusWelzel Nov 2, 2022
a30f78f
[ENH] Bring BEP029 up to date
JuliusWelzel Nov 7, 2022
217a455
[FIX] typo
JuliusWelzel Nov 7, 2022
6435ae5
Merge branch 'bids-standard:master' into bep-029
JuliusWelzel Nov 16, 2022
55cec3a
[STY & FIX] MD style and typos
JuliusWelzel Nov 16, 2022
ea274d0
[STY] markdown style
JuliusWelzel Nov 16, 2022
211ffd0
[STY] markdown style
JuliusWelzel Nov 16, 2022
98d44e4
[FIX] minor changes
JuliusWelzel Dec 2, 2022
57b685f
[ADD] schema changes for MOTION-BEP
JuliusWelzel Dec 2, 2022
25c2c86
Merge branch 'master' into bep-029
JuliusWelzel Jan 9, 2023
b7846b6
Add quat_ prefix for quaternion components
sjeung Jan 16, 2023
fa587d6
Update quaternion components description
sjeung Jan 16, 2023
7741326
Fix broken component table
sjeung Jan 16, 2023
5a2446a
Added instruction for sharing quaternions.
sjeung Jan 16, 2023
6ff018b
Modified text here and there
sjeung Jan 16, 2023
c23d628
Merge branch 'bids-standard:master' into bep-029
JuliusWelzel Jan 19, 2023
c4d9ee1
Merge pull request #4 from sjeung/bep-029
JuliusWelzel Jan 19, 2023
1b6a6b4
[FIX] acceleration keyword in table
JuliusWelzel Jan 19, 2023
4435c54
Merge branch 'bids-standard:master' into bep-029
JuliusWelzel Jan 25, 2023
ca086d8
[ADD] schema objects MOTION-BIDS
JuliusWelzel Jan 31, 2023
4722dd2
Merge branch 'master' into bep-029
JuliusWelzel Jan 31, 2023
85e98d9
Merge branch 'master' into bep-029
JuliusWelzel Feb 3, 2023
7b3397a
[FIX] remove backslashes in MACRO object
JuliusWelzel Feb 8, 2023
4a98360
lint yml
Remi-Gau Feb 8, 2023
bafa0f9
lint yml
Remi-Gau Feb 8, 2023
fd361f7
comment out entities with no definitions
Remi-Gau Feb 8, 2023
3667eed
fix yml
Remi-Gau Feb 8, 2023
a751e52
fix links
Remi-Gau Feb 8, 2023
4ec9be5
use md and not html extension
Remi-Gau Feb 8, 2023
1f370e5
add motion page to config
Remi-Gau Feb 8, 2023
af43495
[ADD] channel objects for schema
JuliusWelzel Feb 9, 2023
3b47f91
[ADD] POSChannelcount for motion sidecar
JuliusWelzel Feb 9, 2023
54709b9
Update src/modality-specific-files/motion.md
JuliusWelzel Feb 13, 2023
38e4984
Update src/modality-specific-files/motion.md
JuliusWelzel Feb 13, 2023
8b4972b
Update src/modality-specific-files/motion.md
JuliusWelzel Feb 13, 2023
c28372e
Update src/modality-specific-files/motion.md
JuliusWelzel Feb 13, 2023
41bcb31
Update src/modality-specific-files/motion.md
JuliusWelzel Feb 13, 2023
d144345
Update src/modality-specific-files/motion.md
JuliusWelzel Feb 13, 2023
24d4fad
whitespace, linebreaks, typos, et al
sappelhoff Feb 13, 2023
2e8a972
Merge pull request #5 from sappelhoff/patch-1
JuliusWelzel Feb 13, 2023
c7e3a31
[FIX] remove md tables and rely on schema objects
JuliusWelzel Feb 13, 2023
7dedd84
Merge branch 'bep-029' of https://github.com/JuliusWelzel/bids-specif…
JuliusWelzel Feb 13, 2023
55bfe11
[FIX] remove md tabels and fix schema objects
JuliusWelzel Feb 13, 2023
1636caa
Merge branch 'master' into bep-029
JuliusWelzel Feb 13, 2023
f4bb3a6
[FIX] schema motion.yaml levels
JuliusWelzel Feb 13, 2023
c763aab
white spaces
JuliusWelzel Feb 13, 2023
2cf2c2a
remove another whitespace
JuliusWelzel Feb 14, 2023
bf8f467
[ENH] restructure sidecar according to @RemiGau
JuliusWelzel Feb 14, 2023
a311fcd
fix false indent
JuliusWelzel Feb 14, 2023
2b40e44
add new line at end of file
JuliusWelzel Feb 14, 2023
d1ae730
fix schema key error
JuliusWelzel Feb 14, 2023
e502d43
fix false indent
JuliusWelzel Feb 14, 2023
c11e96a
Merge branch 'master' into bep-029
JuliusWelzel Feb 15, 2023
d86ff53
remove double entry and change name
JuliusWelzel Feb 15, 2023
24d464c
More detailed description of motion chantypes
sjeung Feb 15, 2023
a0ab817
Remove double entry
sjeung Feb 15, 2023
6955024
Capitalization & punctuation table content
sjeung Feb 15, 2023
6e75bbd
Wording change
sjeung Feb 15, 2023
76be5d6
Correct text and refine time-synch paragraph
sjeung Feb 15, 2023
f6a8c7f
Refine text
sjeung Feb 15, 2023
a02c30b
More precise definition of term Euler angles
sjeung Feb 15, 2023
bbcaf80
Remove expression Tait-Bryan to avoid confusion
sjeung Feb 15, 2023
ce5c0a2
Merge branch 'bep-029' of https://github.com/sjeung/bids-specificatio…
sjeung Feb 15, 2023
fa8f0ce
Refine text
sjeung Feb 15, 2023
b219063
component__channels->component
sjeung Feb 15, 2023
f88fec2
Merge branch 'bep-029' of https://github.com/sjeung/bids-specificatio…
sjeung Feb 15, 2023
5f22078
fix typo
JuliusWelzel Feb 16, 2023
5ae6a8f
add headings
JuliusWelzel Feb 16, 2023
c61094d
Merge branch 'bep-029' of https://github.com/JuliusWelzel/bids-specif…
JuliusWelzel Feb 16, 2023
350cfad
smaller fixes
JuliusWelzel Feb 16, 2023
111d246
update channels example column order
JuliusWelzel Feb 16, 2023
92c074a
Merge branch 'bids-standard:master' into bep-029
JuliusWelzel Feb 17, 2023
b506580
Merge branch 'bep-029' into bep-029
JuliusWelzel Feb 17, 2023
f2b7ee5
Merge pull request #6 from sjeung/bep-029
JuliusWelzel Feb 17, 2023
140b23e
linting after merge
JuliusWelzel Feb 17, 2023
dfaf098
fix backslashes
JuliusWelzel Feb 17, 2023
a1bf35f
more backslash fixes
JuliusWelzel Feb 17, 2023
89fd0ef
minor fixes
sappelhoff Feb 20, 2023
c652eb1
Merge pull request #7 from sappelhoff/patch-2
JuliusWelzel Feb 20, 2023
5db3dfa
Delete tables with redundant information
sjeung Feb 20, 2023
b460b50
Better define requirement levels
sjeung Feb 20, 2023
c9d1165
Capitalize requirement keys
sjeung Feb 20, 2023
29295a7
Typo correction
sjeung Feb 20, 2023
99831ef
fix MD style (remark)
sappelhoff Feb 21, 2023
238988b
Fix column order in text/table
sjeung Feb 21, 2023
30348c7
bring schema up to date to latest spec changes
JuliusWelzel Feb 21, 2023
d738a8c
make TrackingSystemName optional
JuliusWelzel Feb 21, 2023
e56a2f7
remove hardcoded channels.tsv table
JuliusWelzel Feb 21, 2023
8b72dad
fix typos
JuliusWelzel Feb 21, 2023
8cd5451
Reorder entities in text
sjeung Feb 21, 2023
cb2780b
each new sentence on new line
sappelhoff Feb 21, 2023
f465866
Clarify TrackingSystemName json field usage
sjeung Feb 21, 2023
db251de
Move tracksys entity up the file name
sjeung Feb 22, 2023
53a633d
Clarify multiple tracksys case
sjeung Feb 22, 2023
f99f204
Remove trailing space
sjeung Feb 22, 2023
3c09175
TMP: replace examples link (for community review)
sappelhoff Feb 22, 2023
d8ff71a
Merge branch 'master' into bep-029
sappelhoff Feb 22, 2023
adc569a
Merge branch 'bids-standard:master' into bep-029
JuliusWelzel Mar 2, 2023
41748e6
update syncronization paragraph
JuliusWelzel Mar 2, 2023
8a3af21
fix typo
JuliusWelzel Mar 2, 2023
26666f7
fix wording
JuliusWelzel Mar 2, 2023
00bb112
Mention of BEP 029 changed to BIDS-motion
sjeung Mar 8, 2023
3f9345e
Merge branch 'bep-029' of https://github.com/JuliusWelzel/bids-specif…
sjeung Mar 8, 2023
b55338e
Update src/modality-specific-files/near-infrared-spectroscopy.md
sjeung Mar 8, 2023
38f38f7
Merge branch 'bids-standard:master' into bep-029
JuliusWelzel Mar 9, 2023
03e6bad
update contributor emojis
JuliusWelzel Mar 9, 2023
dac3d7c
Typo correction
sjeung Mar 9, 2023
825ccc6
Merge branch 'bep-029' of https://github.com/JuliusWelzel/bids-specif…
sjeung Mar 9, 2023
fdfd89c
Update near-infrared-spectroscopy.md
sjeung Mar 9, 2023
91342c7
update channels type table
JuliusWelzel Mar 12, 2023
dcaebd7
Merge branch 'master' into bep-029
sappelhoff Mar 15, 2023
f613ba7
misc fixes
sappelhoff Mar 16, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ nav:
- Positron Emission Tomography: modality-specific-files/positron-emission-tomography.md
- Microscopy: modality-specific-files/microscopy.md
- Near-Infrared Spectroscopy: modality-specific-files/near-infrared-spectroscopy.md
- Motion: modality-specific-files/motion.md
Copy link
Collaborator

Choose a reason for hiding this comment

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

should each page also be listed in the redirect map of the mkdocs.yml?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It was like this, so I just added the motion. But happy to change it to what makes most sense :)

Copy link
Member

Choose a reason for hiding this comment

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

@Remi-Gau would that make sense? After all, motion has never been introduced to the spec with something like '04-modality-specific-files/0X-motion.md' but gets into the spec with modality-specific-files/motion.md

- Derivatives:
- BIDS Derivatives: derivatives/introduction.md
- Common data types and metadata: derivatives/common-data-types.md
Expand Down
4 changes: 2 additions & 2 deletions src/appendices/contributors.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ If you contributed to the BIDS ecosystem and your name is not listed, please add
- Andrew Jahn 📓
- Andrew Janke 📖💻
- Mainak Jas 📖💻
- Sein Jeung 📖
- Sein Jeung 📖💡
- Alexander Jones 💻🐛
- Tamás Józsa 📓
- Jakub Kaczmarzyk 📖🔧🚇
Expand Down Expand Up @@ -306,7 +306,7 @@ If you contributed to the BIDS ecosystem and your name is not listed, please add
- Brian A. Wandell 📖
- Hao Ting Wang 📖🐛
- Yuan Wang 💻
- Julius Welzel 📖
- Julius Welzel 📖💡
- Joseph Wexler 📖💡
- Kirstie Whitaker 📖💡🔍🤔📢💬
- Martin Wilson 📖
Expand Down
4 changes: 4 additions & 0 deletions src/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,10 @@ For example:

- (publication forthcoming)

#### Motion

- (publication forthcoming)

### Research Resource Identifier (RRID)

BIDS has also a
Expand Down
202 changes: 202 additions & 0 deletions src/modality-specific-files/motion.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,202 @@
# Motion

For information on how to cite this extension when referencing it in the context of the academic literature, please read [Citing BIDS](../introduction.md#citing-bids).

Motion datasets formatted using this specification are available on the
[BIDS examples repository](https://github.com/bids-standard/bids-examples#motion-datasets)
and can be used as helpful guidance when curating new datasets.

## Motion recording data

{{ MACROS___make_filename_template(
"raw",
datatypes=["motion"],
suffixes=["motion", "channels", "events"])
}}

A wide variety of motion capture systems are used in human research, resulting in different proprietary data formats.

This BIDS extension deals with common outputs from motion capture systems such as positions, orientations, or their time derivatives.

The extension is not limited to motion data in physical space but also encompasses simulated movement in virtual space, as far as these are comparable to movements in physical space.
Other dynamic objects than human body parts whose motion is tracked may as well be included as tracked objects.
This specification does not include raw camera footages (from camera-based or optical motion capture recordings), but includes the positions or orientations computed using such data.

In this specification, positions (and their time derivatives) are represented as Cartesian coordinates along up to three spatial axes,
and orientations (and their time derivatives) are represented as Euler angles.
However, to cover recordings from computer graphics applications (for example, virtual 3D motion or immersive virtual reality recording in physical space),
orientations are also allowed to be represented as [quaternions](https://en.wikipedia.org/wiki/Quaternion).

JuliusWelzel marked this conversation as resolved.
Show resolved Hide resolved
In this case, the quaternion channels can be distinguished from channels containing Euler angles based on the entries in columns `component` and `units` in the `*_channels.tsv` file.
See subsection on `Channels description` for further details.

Motion data from one tracking system MUST be stored in a single `*_motion.tsv` file.
A tracking system is defined as a group of motion channels that share hardware properties (the recording device) and software properties (the recording duration and number of samples).
For example, if the position time series of multiple optical markers is processed via one recording unit, this MAY be defined as a single tracking system.
Note that it is not uncommon to have multiple tracking systems to record at the same time.

JuliusWelzel marked this conversation as resolved.
Show resolved Hide resolved
Each tracking system MUST have its own `*_tracksys-<label>_motion.tsv` file, where `<label>` is a user-defined keyword to be used to identify each file belonging to a tracking system.
This is especially helpful when more than one tracking system is used.
Data from different tracking systems MUST be stored in different `*_tracksys-<label>_motion.tsv` files,
each of which is accompanied by `*_tracksys-<label>_motion.json` and `*_tracksys-<label>_channels.tsv` files.
Between `tracksys-<label>` entity and `*_motion.tsv`, `*_motion.json`, or `*_channels.tsv` suffixes, optional [`acq-<label>`](../appendices/entities.md#acq) or [`run-<index>`](../appendices/entities.md#run) entity MAY be inserted.

One column in the `*_tracksys-<label>_motion.tsv` file represents one data channel.
The ordering of columns MUST match the order of rows in the `*_channels.tsv` file for unambiguous assignment.
All relevant metadata about a tracking systems is stored in accompanying sidecar `*_tracksys-<label>_motion.json` file.

The source data from each tracking system in their original format, if different from `.tsv`,
can be stored in the [`/sourcedata` directory](../common-principles.md#source-vs-raw-vs-derived-data).
The original data format MAY hold more metadata than currently specified in the `*_motion.json` file.

When multiple tracking systems are used to record motion or motion capture is used alongside the recording of other BIDS modalities and recordings should be interpreted together,
it is adviced to provide a possibility to synchronize recordings.
The prefered way to do so is to use the acquisition time of the first data point of recordings and
to store this information in the `acq_time` column of the [`*_scans.tsv`](../modality-agnostic-files.md#scans-file) file.
The Note that the [BIDS date time format](../common-principles.md#units) allows optional fractional seconds, which SHOULD be used to maximize the precision of the syncronization.
Only if the precision of the synchronization is not high enough, the `*_events.tsv` file SHOULD be used to syncronize recordings.
In this file, the start- and stop time of the recording of a system are specified in relation to a system to synchronize with.
If more than two systems are to be synchronized, it is up to the user to indntify the "main" system.

In case a tracking system provides time information with every recorded sample,
these time information MAY be stored in form of latencies to recording onset (first sample) in the `*_motion.tsv` file.
If a system has uneven sampling rate behavior, the `LATENCY` channel can be used to share these information.

To store events alongside motion data when there are multiple tracking systems simulatenously in use, it is RECOMMENDED to designate a tracking system to the events file.
Such an events file name SHOULD include the `tracksys` key and looks like `sub-<label>[_ses-<label>]_task-<label>[_acq-<label>]_tracksys-<label>[_run-<index>]_events.tsv`.
Event latencies can then be related to motion samples of multiple tracking systems also by using `acq_time` column entries in the `*_scans.tsv`.
The same principle applies when the events file is saved alongside a simultaneously recorded non-motion data (for example EEG).

### Sidecar JSON (`*_motion.json`)
Remi-Gau marked this conversation as resolved.
Show resolved Hide resolved

#### Task information

{{ MACROS___make_sidecar_table("motion.motionTaskInformation") }}

#### Hardware information

{{ MACROS___make_sidecar_table("motion.motionHardware") }}

#### Insitution information

{{ MACROS___make_sidecar_table("motion.motionInstitutionInformation") }}

#### Motion specific fields

Motion specific fields MUST be present:

{{ MACROS___make_sidecar_table("motion.motionRequired") }}

Motion specific fields SHOULD be present:

{{ MACROS___make_sidecar_table("motion.motionRecommended") }}

#### Example `*_tracksys-<label>_motion.json`

```JSON
{
"SamplingFrequency": 60,
"SamplingFrequencyEffective": 60.00197437,
"TaskName": "BIDS Motion fictive example",
"TrackingSystemName": "IMU Right Hand",
"TaskDescription": "walking and talking",
"InstitutionAddress": "Fictive address",
"InstitutionName": "Fictive Institution",
"MotionChannelCount": 18,
"RecordingDuration": 4667.641106,
"RotationRule": "right-hand",
"RotationOrder": "ZXY",
"SpatialAxes": "FRU",
"SubjectArtefactDescription": "n/a",
"TrackedPointsCount" : 2,
"ACCELChannelCount": 6,
"GYROChannelCount": 6,
"MAGNChannelCount": 6,
"Manufacturer": "BWSensing",
"ManufacturersModelName": "BW-IMU600",
}
```

In this example, the `*_motion.json` contains data from one tracking system consisting of two
[inertial measurement units (imu)](https://en.wikipedia.org/wiki/Motion_capture#Inertial_systems).
If there are additional tracking systems (for example [optical motion capture](https://en.wikipedia.org/wiki/Motion_capture#Optical_systems)),
data from these MUST be stored as separate files like `*_tracksys-omcA_motion.tsv` and `*_tracksys-omcB_motion.tsv`.
All specified tracking systems MAY share `tracked_point` defined in `*_channels.tsv`, when tracking devices are placed on the same object or body part.

Note that the onsets of the recordings SHOULD be stored in the study key file [(`scans.tsv`)](../modality-agnostic-files.md#scans-file).
Here, date-time information MUST be expressed as indicated in [Units](../common-principles.md#units).
The [`scans.tsv`](../modality-agnostic-files.md#scans-file) file contains the filename and the acquisition time of a recording,
which MAY be used to synchronize multiple recordings.

## Channels description (`*_channels.tsv`)

{{ MACROS___make_filename_template(
"raw",
datatypes=["motion"],
suffixes=["channels"])
}}

This file is REQUIRED as it makes it easy to browse or query over larger collections of datasets.
The REQUIRED columns are channel `name`, `component`, `type`, `tracked_point` and `units`.
Any number of additional columns MAY be added to provide additional information about the channels.
The `*_tracksys-<label>_channels.tsv` file SHOULD give additional information about individual recorded channel,
some of which my not be found summarized in `*_motion.json`.

The columns of the channels description table stored in `*_channels.tsv` are:

{{ MACROS___make_columns_table("motion.motionChannels") }}

### Restricted keyword list for channel component

Restricted keyword list for column `component`.
When using quaternions to represent orientations,
the axial components that corresponds to the three spatial axes MUST be specified as "quat_x", "quat_y", "quat_z", and the non-axial component as "quat_w".

| **Keyword** | **Description** |
| ----------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
| x | Position along the X-axis, or rotation about the X-axis among the Euler angles that represent the orientation, or magnetic field strength along the X-axis. |
| y | Position along the Y-axis or rotation about the Y-axis among the Euler angles that represent the orientation, or magnetic field strength along the Y-axis. |
| z | Position along the Z-axis or rotation about the Z-axis among the Euler angles that represent the orientation, or magnetic field strength along the Z-axis. |
| quat_x | Quaternion component associated with the X-axis. |
| quat_y | Quaternion component associated with the Y-axis. |
| quat_z | Quaternion component associated with the Z-axis. |
| quat_w | Non-axial quaternion component. |
| n/a | Channels that have no corresponding spatial axis. |

### Restricted keyword list for channel type

Restricted keyword list for column `type` in alphabetic order.
Note that upper-case is REQUIRED:
Comment on lines +168 to +169
Copy link
Member

Choose a reason for hiding this comment

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

not a blocker for merging this PR, but before release, we must clarify how channel types are shared between modalities. I have opened a new issue for this:


| **Keyword** | **Description** | **Modalities to be shared with** |
| ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------- |
| ACCEL | Accelerometer channel, one channel for each spatial axis. Column `component` for the axis MUST be added to the `*_channels.tsv` file (x, y, or z). | [fNIRS](./near-infrared-spectroscopy.md#near-infrared-spectroscopy) |
| ANGACC | Angular acceleration channel, one channel for each spatial axis. Column `component` for the axis MUST be added to the `*_channels.tsv` file (x, y, or z). | NONE |
| ANGVEL | Angular velocity channel, one channel for each spatial axis. Column `component` for the axis MUST be added to the `*_channels.tsv` file (x, y, or z). | None |
| GYRO | Gyrometer channel, one channel for each spatial axis. Column `component` for the axis MUST be added to the `*_channels.tsv` file (x, y, or z). | [fNIRS](./near-infrared-spectroscopy.md#near-infrared-spectroscopy) |
| JNTANG | Joint angle channel between two fixed axis belonging to two bodyparts. Angle SHOULD be defined between proximal and distal bodypart in `deg`. | NONE |
| LATENCY | Latency of samples in seconds from recording onset. MUST be in form of `ss[.000000]` , where [.000000] is an optional subsecond resolution between 1 and 6 decimal points. | ALL |
| MAGN | Magnetic field strength, one channel for each spatial axis. Column `component` for the axis MUST be added to the `*_channels.tsv` file (x, y or z). | [fNIRS](./near-infrared-spectroscopy.md#near-infrared-spectroscopy) |
| MISC | Miscellaneous channels. | ALL |
| ORNT | Orientation channel, one channel for each spatial axis or quaternion component. Column `component` for the axis or quaternion label MUST be added to the `*_channels.tsv` file (x, y, z, quat_x, quat_y, quat_z, or quat_w). | [fNIRS](./near-infrared-spectroscopy.md#near-infrared-spectroscopy) |
| POS | Position in space, one channel for each spatial axis. Column `component` for the axis MUST be added to the `*_channels.tsv` file (x, y or z). | NONE |
| VEL | Velocity, one channel for each spatial axis. Column `component` for the axis MUST be added to the `*_channels.tsv` file (x, y or z). | NONE |

### Example `*_channels.tsv`

```Text
name component type tracked_point units
t1_acc_x x ACCEL LeftFoot m/s^2
t1_acc_y y ACCEL LeftFoot m/s^2
t1_acc_z z ACCEL LeftFoot m/s^2
t1_gyro_x x GYRO LeftFoot rad/s
t1_gyro_y y GYRO LeftFoot rad/s
t1_gyro_z z GYRO LeftFoot rad/s
t2_acc_x x ACCEL RightWrist m/s^2
t2_acc_y y ACCEL RightWrist m/s^2
t2_acc_z z ACCEL RightWrist m/s^2
t2_gyro_x x GYRO RightWrist rad/s
t2_gyro_y y GYRO RightWrist rad/s
t2_gyro_z z GYRO RightWrist rad/s
```
4 changes: 2 additions & 2 deletions src/modality-specific-files/near-infrared-spectroscopy.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,10 +197,10 @@ and a guide for using macros can be found at
All NIRS channels types MUST correspond to a [valid SNIRF data type](https://github.com/fNIRS/snirf/blob/master/snirf_specification.md#appendix).
Additional channels that are recorded simultaneously with the NIRS
device and stored in the same data file SHOULD be included as well.
However, additional channels that are simultaneously recorded with a different device
However, additional channels that are simultaneously recorded with a different device
SHOULD be stored according to their appropriate modality specification.
For example, motion data that was simultaneously recorded with a different device should be specified
according to BEP029 and not according to the NIRS data type.
according to the [Motion](../modality-specific-files/motion.md) and not according to the NIRS data type.
Whereas, if the motion data was acquired in with the NIRS device itself, it should be included here with the NIRS data.
Any of the channel types defined in other BIDS specification MAY be used here as well such as `ACCEL` or `MAGN`.
As several of these data types are commonly acquired using NIRS devices they are included as an example at the base of the table.
Expand Down
Loading