Skip to content

Commit

Permalink
Merge branch 'bids-standard:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
neuromechanist authored Dec 22, 2024
2 parents 50ad1dd + 514f287 commit 77f33b0
Show file tree
Hide file tree
Showing 23 changed files with 161 additions and 122 deletions.
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ repos:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
args: [--unsafe]
- id: check-json
- id: check-toml
- id: check-ast
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
[![Validation](https://github.com/bids-standard/bids-specification/actions/workflows/validation.yml/badge.svg)](https://github.com/bids-standard/bids-specification/actions/workflows/validation.yml)
[![CircleCI](https://circleci.com/gh/bids-standard/bids-specification.svg?style=shield)](https://circleci.com/gh/bids-standard/bids-specification)
[![Bluesky Follow](https://img.shields.io/badge/bluesky-Follow_bidsstandard-blue?logo=bluesky)](https://bsky.app/profile/bidsstandard.bsky.social)
![YouTube Channel Subscribers](https://img.shields.io/youtube/channel/subscribers/UCxZUcYfd_nvIVWAbzRB1tlw)
[![Mastodon Follow](https://img.shields.io/mastodon/follow/109520103085644521?domain=https%3A%2F%2Ffosstodon.org%2F)](https://fosstodon.org/@bidsstandard)
[![@BIDSstandard](https://img.shields.io/twitter/follow/bidsstandard.svg?style=social)](https://x.com/BIDSstandard)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.3686061.svg)](https://doi.org/10.5281/zenodo.3686061)
Expand Down
8 changes: 7 additions & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,12 @@ extra_javascript:
markdown_extensions:
- toc:
anchorlink: true
- pymdownx.superfences
- pymdownx.superfences:
preserve_tabs: true
custom_fences:
- name: tsv
class: tsv
format: !!python/name:bidsschematools.render.tsv.fence
- admonition
- pymdownx.details
plugins:
Expand All @@ -116,6 +121,7 @@ plugins:
- css/watermark.css
- macros:
module_name: tools/mkdocs_macros_bids/main
on_error_fail: true
- redirects:
redirect_maps:
"01-introduction.md": "introduction.md"
Expand Down
2 changes: 1 addition & 1 deletion pdf_build_src/pandoc_script.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def _flatten_values(lst):
fname_mkdocs_yml = _find(HERE, "mkdocs.yml")

with open(fname_mkdocs_yml, "r") as stream:
mkdocs_yml = yaml.safe_load(stream)
mkdocs_yml = yaml.load(stream, yaml.Loader)

sections = mkdocs_yml["nav"][0]["The BIDS Specification"]

Expand Down
6 changes: 3 additions & 3 deletions src/appendices/arterial-spin-labeling.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ and the exact volume_type series should be specified in the `*_aslcontext.tsv`.

Example of `*_aslcontext.tsv`:

```Text
```tsv
volume_type
control
label
Expand All @@ -44,7 +44,7 @@ In this case, the `deltam` should be included in the `*_asl.nii[.gz]` and specif

Example of `*_aslcontext.tsv`:

```Text
```tsv
volume_type
deltam
m0scan
Expand All @@ -58,7 +58,7 @@ the `cbf` should be included in the `*_asl.nii[.gz]` and specified in the `*_asl

Example of `*_aslcontext.tsv`:

```Text
```tsv
volume_type
cbf
m0scan
Expand Down
8 changes: 4 additions & 4 deletions src/appendices/hed.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ meanings in associated JSON sidecar files (`events.json`).
(`trial_type`, `response_time`, and `stim_file`) in addition to
the required `onset` and `duration` columns.

```Text
onset duration trial_type response_time stim_file
1.2 0.6 go 1.435 images/red_square.jpg
5.6 0.6 stop n/a images/blue_square.jpg
```tsv
onset duration trial_type response_time stim_file
1.2 0.6 go 1.435 images/red_square.jpg
5.6 0.6 stop n/a images/blue_square.jpg
```

The `trial_type` column in the above example contains a limited number of distinct
Expand Down
7 changes: 6 additions & 1 deletion src/common-principles.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,11 @@ as the labels would collide on a case-insensitive filesystem.
Additionally, because the suffix `eeg` is defined,
then the suffix `EEG` will not be added to future versions of the standard.

### Dotfiles

Files and directories starting with a dot (`.`) are reserved for system use and no valid recognized BIDS file or directory can start with a `.`.
Any file or directory starting with a `.` present in a BIDS dataset is considered hidden and not subject to BIDS validation.

## Uniqueness of data files

Data files MUST be uniquely identified by BIDS path components
Expand Down Expand Up @@ -489,8 +494,8 @@ first letter in lower case (for example, `variable_name`, not `Variable_name`).
Column names defined in the header MUST be separated with tabs as for the data contents.
Furthermore, column names MUST NOT be blank (that is, an empty string) and MUST NOT
be duplicated within a single TSV file.
String values containing tabs MUST be escaped using double quotes.
Missing and non-applicable values MUST be coded as `n/a`.
String values containing tabs MUST be escaped using double quotes.
Numerical values MUST employ the dot (`.`) as decimal separator and MAY be specified
in scientific notation, using `e` or `E` to separate the significand from the
exponent.
Expand Down
11 changes: 6 additions & 5 deletions src/derivatives/common-data-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -328,11 +328,12 @@ A guide for using macros can be found at

Contents of the `descriptions.tsv` file:

| desc_id | description |
| ------- | ----------------------------------------------------------------------------------------------- |
| Filt | low-pass filtered at 30Hz |
| FiltDs | low-pass filtered at 30Hz, downsampled to 250Hz |
| preproc | low-pass filtered at 30Hz, downsampled to 250Hz, and rereferenced to a common average reference |
```tsv
desc_id description
Filt low-pass filtered at 30Hz
FiltDs low-pass filtered at 30Hz, downsampled to 250Hz
preproc low-pass filtered at 30Hz, downsampled to 250Hz, and rereferenced to a common average reference
```

<!-- Link Definitions -->

Expand Down
2 changes: 1 addition & 1 deletion src/longitudinal-and-multi-site-studies.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ A guide for using macros can be found at

`sub-control01_sessions.tsv` content:

```Text
```tsv
session_id acq_time systolic_blood_pressure
ses-predrug 2009-06-15T13:45:30 120
ses-postdrug 2009-06-16T13:45:30 100
Expand Down
28 changes: 14 additions & 14 deletions src/modality-agnostic-files.md
Original file line number Diff line number Diff line change
Expand Up @@ -246,11 +246,11 @@ available").

`participants.tsv` example:

```Text
participant_id age sex handedness group
sub-01 34 M right read
sub-02 12 F right write
sub-03 33 F n/a read
```tsv
participant_id age sex handedness group
sub-01 34 M right read
sub-02 12 F right write
sub-03 33 F n/a read
```

It is RECOMMENDED to accompany each `participants.tsv` file with a sidecar
Expand Down Expand Up @@ -320,13 +320,13 @@ and a guide for using macros can be found at

`samples.tsv` example:

```Text
sample_id participant_id sample_type derived_from
sample-01 sub-01 tissue n/a
sample-02 sub-01 tissue sample-01
sample-03 sub-01 tissue sample-01
sample-04 sub-02 tissue n/a
sample-05 sub-02 tissue n/a
```tsv
sample_id participant_id sample_type derived_from
sample-01 sub-01 tissue n/a
sample-02 sub-01 tissue sample-01
sample-03 sub-01 tissue sample-01
sample-04 sub-02 tissue n/a
sample-05 sub-02 tissue n/a
```

It is RECOMMENDED to accompany each `samples.tsv` file with a sidecar
Expand Down Expand Up @@ -486,7 +486,7 @@ All such included additional fields SHOULD be documented in an accompanying

Example `_scans.tsv`:

```Text
```tsv
filename acq_time
func/sub-control01_task-nback_bold.nii.gz 1877-06-15T13:45:30
func/sub-control01_task-motor_bold.nii.gz 1877-06-15T13:55:33
Expand Down Expand Up @@ -522,7 +522,7 @@ and a guide for using macros can be found at

`_sessions.tsv` example:

```Text
```tsv
session_id acq_time systolic_blood_pressure
ses-predrug 2009-06-15T13:45:30 120
ses-postdrug 2009-06-16T13:45:30 100
Expand Down
2 changes: 1 addition & 1 deletion src/modality-specific-files/behavioral-experiments.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ A guide for using macros can be found at

## Example `_beh.tsv`

```Text
```tsv
trial response response_time stim_file
congruent red 1.435 images/word-red_color-red.jpg
incongruent red 1.739 images/word-red_color-blue.jpg
Expand Down
30 changes: 15 additions & 15 deletions src/modality-specific-files/electroencephalography.md
Original file line number Diff line number Diff line change
Expand Up @@ -274,12 +274,12 @@ Examples of free-form text for field `description`

See also the corresponding [`electrodes.tsv` example](#example-_electrodestsv).

```Text
name type units description reference status status_description
VEOG VEOG uV left eye VEOG-, VEOG+ good n/a
FDI EMG uV left first dorsal interosseous FDI-, FDI+ good n/a
Cz EEG uV n/a REF bad high frequency noise
UADC001 MISC n/a envelope of audio signal n/a good n/a
```tsv
name type units description reference status status_description
VEOG VEOG uV left eye VEOG-, VEOG+ good n/a
FDI EMG uV left first dorsal interosseous FDI-, FDI+ good n/a
Cz EEG uV n/a REF bad high frequency noise
UADC001 MISC n/a envelope of audio signal n/a good n/a
```

## Electrodes description (`*_electrodes.tsv`)
Expand Down Expand Up @@ -318,15 +318,15 @@ If electrodes are repositioned, it is RECOMMENDED to use multiple sessions to in

See also the corresponding [`channels.tsv` example](#example-_channelstsv).

```Text
name x y z type material
VEOG+ n/a n/a n/a cup Ag/AgCl
VEOG- n/a n/a n/a cup Ag/AgCl
FDI+ n/a n/a n/a cup Ag/AgCl
FDI- n/a n/a n/a cup Ag/AgCl
GND -0.0707 0.0000 -0.0707 clip-on Ag/AgCl
Cz 0.0000 0.0714 0.0699 cup Ag/AgCl
REF -0.0742 -0.0200 -0.0100 cup Ag/AgCl
```tsv
name x y z type material
VEOG+ n/a n/a n/a cup Ag/AgCl
VEOG- n/a n/a n/a cup Ag/AgCl
FDI+ n/a n/a n/a cup Ag/AgCl
FDI- n/a n/a n/a cup Ag/AgCl
GND -0.0707 0.0000 -0.0707 clip-on Ag/AgCl
Cz 0.0000 0.0714 0.0699 cup Ag/AgCl
REF -0.0742 -0.0200 -0.0100 cup Ag/AgCl
```

The [`acq-<label>`](../appendices/entities.md#acq) entity can be used to
Expand Down
2 changes: 1 addition & 1 deletion src/modality-specific-files/genetic-descriptor.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ Note that optional columns MUST be further described in an accompanying

`participants.tsv` example:

```Text
```tsv
participant_id age sex group genetic_id idh_mutation
sub-control01 34 M control 124587 yes
sub-control02 12 F control 548936 yes
Expand Down
40 changes: 20 additions & 20 deletions src/modality-specific-files/intracranial-electroencephalography.md
Original file line number Diff line number Diff line change
Expand Up @@ -276,13 +276,13 @@ Examples of free-form text for field `description`:

### Example `*_channels.tsv`

```Text
name type units low_cutoff high_cutoff status status_description
LT01 ECOG uV 300 0.11 good n/a
LT02 ECOG uV 300 0.11 bad broken
H01 SEEG uV 300 0.11 bad line_noise
ECG1 ECG uV n/a 0.11 good n/a
TR1 TRIG n/a n/a n/a good n/a
```tsv
name type units low_cutoff high_cutoff status status_description
LT01 ECOG uV 300 0.11 good n/a
LT02 ECOG uV 300 0.11 bad broken
H01 SEEG uV 300 0.11 bad line_noise
ECG1 ECG uV n/a 0.11 good n/a
TR1 TRIG n/a n/a n/a good n/a
```

## Electrode description (`*_electrodes.tsv`)
Expand All @@ -304,7 +304,7 @@ that coordinates are expected in cartesian coordinates according to the

The optional [`space-<label>`](../appendices/entities.md#space) entity (`*[_space-<label>]_electrodes.tsv`) can be used to
indicate the way in which electrode positions are interpreted.
The space `<label>` MUST be taken from one of the modality specific lists in
The space `<label>` MUST be taken from one of the modality-specific lists in
the [Coordinate Systems Appendix](../appendices/coordinate-systems.md).
For example for iEEG data, the restricted keywords listed under
[iEEG Specific Coordinate Systems](../appendices/coordinate-systems.md#ieeg-specific-coordinate-systems)
Expand Down Expand Up @@ -358,11 +358,11 @@ If electrodes are repositioned, it is RECOMMENDED to use multiple sessions to in

### Example `*_electrodes.tsv`

```Text
name x y z size manufacturer
LT01 19 -39 -16 2.3 Integra
LT02 23 -40 -19 2.3 Integra
H01 27 -42 -21 5 AdTech
```tsv
name x y z size manufacturer
LT01 19 -39 -16 2.3 Integra
LT02 23 -40 -19 2.3 Integra
H01 27 -42 -21 5 AdTech
```

## Coordinate System JSON (`*_coordsystem.json`)
Expand Down Expand Up @@ -534,13 +534,13 @@ For example: `/stimuli/electrical_stimulation_functions/biphasic.tsv`

### Example `*_events.tsv`

```Text
onset duration trial_type electrical_stimulation_type electrical_stimulation_site electrical_stimulation_current
1.2 0.001 electrical_stimulation biphasic LT01-LT02 0.005
1.3 0.001 electrical_stimulation biphasic LT01-LT02 0.005
2.2 0.001 electrical_stimulation biphasic LT02-LT03 0.005
4.2 1 electrical_stimulation complex LT02-LT03 n/a
15.2 3 auditory_stimulus n/a n/a n/a
```tsv
onset duration trial_type electrical_stimulation_type electrical_stimulation_site electrical_stimulation_current
1.2 0.001 electrical_stimulation biphasic LT01-LT02 0.005
1.3 0.001 electrical_stimulation biphasic LT01-LT02 0.005
2.2 0.001 electrical_stimulation biphasic LT02-LT03 0.005
4.2 1 electrical_stimulation complex LT02-LT03 n/a
15.2 3 auditory_stimulus n/a n/a n/a
```

<!-- Link Definitions -->
Expand Down
12 changes: 6 additions & 6 deletions src/modality-specific-files/magnetoencephalography.md
Original file line number Diff line number Diff line change
Expand Up @@ -311,12 +311,12 @@ Examples of free text for field `description`:

### Example `*_channels.tsv`

```Text
name type units description
VEOG VEOG V vertical EOG
FDI EMG V left first dorsal interosseous
UDIO001 TRIG V analog trigger signal
UADC001 AUDIO V envelope of audio signal presented to participant
```tsv
name type units description
VEOG VEOG V vertical EOG
FDI EMG V left first dorsal interosseous
UDIO001 TRIG V analog trigger signal
UADC001 AUDIO V envelope of audio signal presented to participant
```

## Coordinate System JSON (`*_coordsystem.json`)
Expand Down
28 changes: 14 additions & 14 deletions src/modality-specific-files/motion.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,21 +185,21 @@ Note that upper-case is REQUIRED:

### Example `*_channels.tsv`

```Text
name component type tracked_point units reference_frame
t1_acc_x x ACCEL LeftFoot m/s^2 global
t1_acc_y y ACCEL LeftFoot m/s^2 global
t1_acc_z z ACCEL LeftFoot m/s^2 global
t1_gyro_x x GYRO LeftFoot rad/s global
t1_gyro_y y GYRO LeftFoot rad/s global
t1_gyro_z z GYRO LeftFoot rad/s global
```tsv
name component type tracked_point units reference_frame
t1_acc_x x ACCEL LeftFoot m/s^2 global
t1_acc_y y ACCEL LeftFoot m/s^2 global
t1_acc_z z ACCEL LeftFoot m/s^2 global
t1_gyro_x x GYRO LeftFoot rad/s global
t1_gyro_y y GYRO LeftFoot rad/s global
t1_gyro_z z GYRO LeftFoot rad/s global
t2_acc_x x ACCEL RightWrist m/s^2 global
t2_acc_y y ACCEL RightWrist m/s^2 global
t2_acc_z z ACCEL RightWrist m/s^2 global
t2_gyro_x x GYRO RightWrist rad/s global
t2_gyro_y y GYRO RightWrist rad/s global
t2_gyro_z z GYRO RightWrist rad/s global
t2_acc_x x ACCEL RightWrist m/s^2 global
t2_acc_y y ACCEL RightWrist m/s^2 global
t2_acc_z z ACCEL RightWrist m/s^2 global
t2_gyro_x x GYRO RightWrist rad/s global
t2_gyro_y y GYRO RightWrist rad/s global
t2_gyro_z z GYRO RightWrist rad/s global
```

## Reference frame description (`*_channels.json`)
Expand Down
Loading

0 comments on commit 77f33b0

Please sign in to comment.