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 132 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: 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
181 changes: 181 additions & 0 deletions src/modality-specific-files/motion.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,181 @@
# 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).

This specification has been used to format a number of [example datasets](https://github.com/bids-standard/bids-examples#motion-datasets) with the motion modality,
sappelhoff marked this conversation as resolved.
Show resolved Hide resolved
which 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 can 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 definded key word to be used to identify each file belonging to a tracking system.
This is especially helpful when more than one tracking system is used.
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, it may be necessary to temporally synchronize the recordings.
To save the differences between recording onsets, the `acq_time` column of the [`scans.tsv`](../modality-agnostic-files.md#scans-file) files can be used.

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": "imu1",
sappelhoff marked this conversation as resolved.
Show resolved Hide resolved
"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, for example optical [motion capture (omc)](https://en.wikipedia.org/wiki/Motion_capture#Optical_systems), tracking systems,
data from each tracking system MUST be stored in different files (`*_tracksys-<label>_motion.tsv`, `*_tracksys-<label>_motion.json`, `*_tracksys-<label>_channels.tsv`).
All specified tracking systems can share `tracked_point` defined in `*_channels.tsv`, when tracking devices are placed on the same location.

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 can 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** |
| ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 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). |
| 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). |
| 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). |
| LATENCY | Latency of samples in seconds from recording onset. |
| 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) |
| MISC | Miscellaneous channels. |
| 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). |
| 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). |
| 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). |

### 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
```
82 changes: 65 additions & 17 deletions src/schema/objects/columns.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,23 @@ color:
Hexadecimal. Label color for visualization.
type: string
unit: hexadecimal
component:
name: component
display_name: Component
description: |
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
- n/a
detector__channels:
name: detector
display_name: Detector Name
Expand Down Expand Up @@ -308,23 +325,6 @@ onset:
acquired data point.
type: number
unit: s
component:
name: component
display_name: Component
description: |
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
- n/a
pathology:
name: pathology
display_name: Pathology
Expand All @@ -342,6 +342,14 @@ participant_id:
matching a participant entity found in the dataset.
type: string
pattern: ^sub-[0-9a-zA-Z]+$
placement__motion:
name: placement
display_name: Placement
description: |
Placement of the tracked point on the body (for example,
participant, avatar centroid, torso, left arm).
It can refer to an external vocabulary for describing body parts.
type: string
plasma_radioactivity:
name: plasma_radioactivity
display_name: Plasma radioactivity
Expand Down Expand Up @@ -581,6 +589,13 @@ time:
For example, 5.
type: number
unit: s
tracked_point__channels:
name: tracked_point
display_name: Tracked point channel
description: |
Label of the point that is being tracked, for example, label of a tracker
or a marker (for example,`"LeftFoot"`, `"RightWrist"`).
type: string
trial_type:
name: trial_type
display_name: Trial type
Expand Down Expand Up @@ -733,6 +748,25 @@ type__nirs_channels:
- MAGN
- MISC
- OTHER
type__motion_channels:
name: type
display_name: Channel type
description: |
Type of channel; MUST use the channel types listed below.
Note that the type MUST be in upper-case.
type: string
enum:
- ACCEL
- ANGVEL
- GYRO
- JNTANG
- LATENCY
- MAGN
- MISC
- ORNT
- POS
- TIME
- VEL
# type column for electrodes.tsv files
type__electrodes:
name: type
Expand Down Expand Up @@ -770,6 +804,20 @@ units__nirs:
and [Common Principles](SPEC_ROOT/common-principles.md#units) pages.
type: string
format: unit
units__motion:
name: units
display_name: Units
description: |
Physical or virtual unit of the value represented in this channel,
for example, '"rad"' or '"deg"' for angular quantities or '"m"' for position data.
If motion data is recorded in a virtual space and deviate from standard SI units,
the unit used MUST be specified in the sidecar `*_motion.json`
file (for example `"vm"` for virtual meters). `"rad"` is used for euler angles
and `"n/a"` for quaternions.
For guidelines about units see the [Appendix](SPEC_ROOT/appendices/units.md)
and [Common Principles](SPEC_ROOT/common-principles.md#units) pages.
type: string
format: unit
value:
name: value
display_name: Marker value
Expand Down
2 changes: 2 additions & 0 deletions src/schema/objects/common_principles.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ data_type:
11. `micr` (microscopy)

12. `nirs` (near infrared spectroscopy)

13. `motion` (motion)
dataset:
display_name: Dataset
description: |
Expand Down
4 changes: 4 additions & 0 deletions src/schema/objects/datatypes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ micr:
value: micr
display_name: Microscopy
description: Microscopy
motion:
value: motion
display_name: Motion
description: Motion data from a tracking system
perf:
value: perf
display_name: Perfusion imaging
Expand Down
15 changes: 15 additions & 0 deletions src/schema/objects/entities.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -405,3 +405,18 @@ tracer:
Please note that the `<label>` does not need to match the actual value of the field.
type: string
format: label
tracksys:
name: tracksys
display_name: Tracking system
description: |
The `tracksys-<label>` entity can be used as a key-value pair
to label *_motion.tsv and *_motion.json files.
It can also be used to label *_channel.tsv or *_events.tsv files
when they belong to a specific tracking system.

This entity represents the `"TrackingSystemName"` metadata field in a *_motion.json file.
Therefore, if the `tracksys-<label>` entity is present in a filename,
`"TrackingSystemName"` MUST be defined in the associated metadata.
Please note that the `<label>` MUST match the actual value of the field.
sappelhoff marked this conversation as resolved.
Show resolved Hide resolved
type: string
format: label
Loading