Skip to content

Commit b110114

Browse files
authored
Merge branch 'master' into bep022
2 parents 1ef102b + 1235e5b commit b110114

23 files changed

+246
-137
lines changed

.pre-commit-config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ repos:
1515
- id: check-added-large-files
1616
- id: check-case-conflict
1717
- repo: https://github.com/python-jsonschema/check-jsonschema
18-
rev: 0.29.0
18+
rev: 0.29.1
1919
hooks:
2020
- id: check-dependabot
2121
- id: check-github-workflows
@@ -25,7 +25,7 @@ repos:
2525
- id: check-readthedocs
2626
files: readthedocs.yml
2727
- repo: https://github.com/psf/black
28-
rev: 24.4.2
28+
rev: 24.8.0
2929
hooks:
3030
- id: black
3131
files: ^tools/(?!schemacode)
@@ -45,7 +45,7 @@ repos:
4545
files: tools/schemacode
4646
args: ["--settings-file", "tools/schemacode/pyproject.toml"]
4747
- repo: https://github.com/pyCQA/flake8
48-
rev: 7.1.0
48+
rev: 7.1.1
4949
hooks:
5050
- id: flake8
5151
args: [--config=tools/schemacode/setup.cfg]
@@ -67,7 +67,7 @@ repos:
6767
- id: codespell
6868
args: ["--config=.codespellrc", "--dictionary=-", "--dictionary=.codespell_dict"]
6969
- repo: https://github.com/pre-commit/mirrors-mypy
70-
rev: v1.11.0
70+
rev: v1.11.1
7171
hooks:
7272
- id: mypy
7373
# Sync with project.optional-dependencies.typing

CONTRIBUTING.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,9 @@ The keyword for the heading must be one of the following:
257257
- example
258258
- quote
259259

260+
Do not put [macros](#using-macros) in admonitions,
261+
as this will likely not give the output you expect.
262+
260263
## Using macros
261264

262265
We use [mkdocs-macros](https://mkdocs-macros-plugin.readthedocs.io/en/latest/)

src/metaschema.json

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,18 @@
8282
"patternProperties": {
8383
"^[a-zA-Z0-9_]+$": {
8484
"allOf": [
85-
{ "$ref": "#/definitions/termTypes/JSONSchema" },
85+
{
86+
"anyOf": [
87+
{ "$ref": "#/definitions/termTypes/JSONSchema" },
88+
{
89+
"type": "object",
90+
"properties": {
91+
"definition": { "type": "object" }
92+
},
93+
"required": ["definition"]
94+
}
95+
]
96+
},
8697
{ "$ref": "#/definitions/termTypes/general" },
8798
{ "$ref": "#/definitions/termTypes/nameValue" },
8899
{

src/modality-specific-files/behavioral-experiments.md

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Behavioral experiments (with no neural recordings)
22

3+
!!! example "Example datasets"
4+
5+
Datasets containing behavioral data can be found
6+
in the [BIDS examples repository](https://bids-standard.github.io/bids-examples/#behavioral)
7+
and can be used as helpful guidance when curating new datasets.
8+
39
<!--
410
This block generates a filename templates.
511
The inputs for this macro can be found in the directory
@@ -9,17 +15,20 @@ and a guide for using macros can be found at
915
-->
1016
{{ MACROS___make_filename_template("raw", datatypes=["beh"]) }}
1117

12-
In addition to logs from behavioral experiments performed alongside imaging data
13-
acquisitions, one can also include data from experiments performed with no neural
14-
recordings.
15-
The results of those experiments can be stored in the `beh` directory using the same
16-
formats for event timing (`_events.tsv`), metadata (`_events.json`),
18+
In addition to logs from behavioral experiments
19+
performed alongside imaging data acquisitions,
20+
one MAY also include data from experiments
21+
performed with no neural recordings.
22+
The results of those experiments MAY be stored in the `beh` directory
23+
using the same formats for event timing (`_events.tsv`),
24+
metadata (`_events.json`),
1725
physiological (`_physio.tsv.gz`, `_physio.json`)
1826
and other continuous recordings (`_stim.tsv.gz`, `_stim.json`)
1927
as for tasks performed during MRI, electrophysiological or other neural recordings.
20-
Additionally, events files that do not include the mandatory `onset` and
21-
`duration` columns can still be included, but should be labeled `_beh.tsv`
22-
rather than `_events.tsv`.
28+
Additionally, events files
29+
that do not include the mandatory `onset` and `duration` columns
30+
MAY be included,
31+
but MUST be labeled `_beh.tsv` rather than `_events.tsv`.
2332

2433
## Sidecar JSON (`*_beh.json`)
2534

src/modality-specific-files/magnetic-resonance-imaging-data.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,11 @@ The definitions of the fields specified in these tables may be found in
160160
A guide for using macros can be found at
161161
https://github.com/bids-standard/bids-specification/blob/master/macros_doc.md
162162
-->
163-
{{ MACROS___make_sidecar_table("mri.MRIEchoPlanarImagingAndB0Mapping") }}
163+
{{ MACROS___make_sidecar_table([
164+
"mri.MRIB0FieldIdentifier",
165+
"mri.MRIEchoPlanarImagingAndB0FieldSource",
166+
])
167+
}}
164168

165169
#### Tissue description
166170

@@ -717,7 +721,7 @@ within the `[*_]dwi.bval` and `[*_]dwi.bvec` files) MAY change across DWI runs.
717721

718722
**Gradient orientation file formats**.
719723
The `[*_]dwi.bval` and `[*_]dwi.bvec` files MUST follow the
720-
[FSL format](https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/FDT/UserGuide#DTIFIT):
724+
[FSL format](https://fsl.fmrib.ox.ac.uk/fsl/docs/#/diffusion/index?id=diffusion-data-in-fsl):
721725
The `[*_]dwi.bvec` file contains 3 rows with *N* space-delimited floating-point numbers
722726
(corresponding to the *N* volumes in the corresponding NIfTI file.)
723727
The first row contains the *x* elements, the second row contains the *y* elements and

src/modality-specific-files/microscopy.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ Microscopy raw data MUST be stored in one of the following formats:
5555

5656
- [OME-TIFF](https://docs.openmicroscopy.org/ome-model/6.1.2/ome-tiff/specification.html#)
5757
(`.ome.tif` for standard TIFF files or `.ome.btf` for
58-
[BigTIFF](https://www.awaresystems.be/imaging/tiff/bigtiff.html) files)
58+
[BigTIFF](https://web.archive.org/web/20240706160214/https://www.awaresystems.be/imaging/tiff/bigtiff.html) files)
5959

6060
- [OME-ZARR/NGFF](https://ngff.openmicroscopy.org/latest/) (`.ome.zarr` directories)
6161

src/modality-specific-files/task-events.md

Lines changed: 44 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ Each task events file REQUIRES a corresponding task data file.
2727
It is also possible to have a single `events.tsv` file describing events
2828
for all participants and runs (see
2929
[Inheritance Principle](../common-principles.md#the-inheritance-principle)).
30-
As with all other tabular data, `events.tsv` files MAY be accompanied by a JSON
31-
file describing the columns in detail (see
32-
[Tabular Files](../common-principles.md#tabular-files)).
30+
As with all other tabular data, `events.tsv` files MAY be accompanied
31+
by a JSON file describing the columns in detail
32+
(see [Tabular Files](../common-principles.md#tabular-files)).
3333

3434
The tabular files consists of one row per event and a set of REQUIRED
3535
and OPTIONAL columns:
@@ -44,26 +44,30 @@ and a guide for using macros can be found at
4444

4545
The content of `events.tsv` files SHOULD be sorted by values in the `onset` column.
4646

47-
Note for MRI data:
48-
If any acquired scans have been discarded before forming the imaging data file,
49-
ensure that an `onset` of 0 corresponds to the time the first image was stored.
50-
For example in case there is an in scanner training phase that
51-
begins before the scanning sequence has started events from this sequence should
52-
have negative onset time counting down to the beginning of the acquisition of
53-
the first volume.
54-
55-
Note regarding the precision of numeric metadata:
56-
It is RECOMMENDENDED that dataset curators specify numeric metadata like `onset` and
57-
`duration` with as much decimal precision as is reasonable in the context of the experiment.
58-
For example in an EEG experiment with devices operating at 1000 Hz sampling frequency,
59-
dataset curators SHOULD specify **at least** 3 figures after the decimal point.
60-
61-
An arbitrary number of additional columns can be added. Those allow describing
62-
other properties of events that could be later referenced in modeling and
47+
An arbitrary number of additional columns can be added.
48+
Those allow describing other properties of events that could be later referenced in modeling and
6349
hypothesis extensions of BIDS.
6450
Note that the `trial_type` and any additional columns in a TSV file
6551
SHOULD be documented in an accompanying JSON sidecar file.
6652

53+
!!! note "Regarding the precision of numeric metadata"
54+
55+
For the precision of numeric metadata,
56+
it is RECOMMENDENDED that dataset curators specify numeric metadata like `onset` and
57+
`duration` with as much decimal precision as is reasonable in the context of the experiment.
58+
For example in an EEG experiment with devices operating at 1000 Hz sampling frequency,
59+
dataset curators SHOULD specify **at least** 3 figures after the decimal point.
60+
61+
!!! note "For fMRI data"
62+
63+
For fMRI data
64+
if any acquired scans have been discarded before forming the imaging data file,
65+
ensure that an `onset` of 0 corresponds to the time the first image was stored.
66+
For example in case there is an in scanner training phase that
67+
begins before the scanning sequence has started events from this sequence should
68+
have negative onset time counting down to the beginning of the acquisition of
69+
the first volume.
70+
6771
Example:
6872

6973
<!-- This block generates a file tree.
@@ -119,24 +123,26 @@ In the accompanying JSON sidecar, the `trial_type` column might look as follows:
119123
}
120124
```
121125

122-
Note that in the example above:
126+
!!! note
123127

124-
1. Only a subset of columns are described for the sake of brevity.
125-
In a real dataset, all other columns SHOULD also be described.
128+
In the example above:
126129

127-
1. The `channel` column contains a list of values that are separated
128-
by a delimiter (`|`), as is declared in the `Delimiter` metadata
129-
field of the `events.json` file.
130-
Thus, the channels related to the event in the third row of the example
131-
are called `F,1`, `F,2`, and `Cz`.
130+
1. Only a subset of columns are described for the sake of brevity.
131+
In a real dataset, all other columns SHOULD also be described.
132132

133-
1. The example contains a column called `annots`.
134-
This column is not defined in BIDS, and constitutes additional, arbitrary
135-
(that is, unofficial) metadata.
136-
In the present case, it is used to describe artifacts in the data,
137-
in reference to the `channel` column.
138-
The `annots` column is making
139-
use of the powerful HED system for documenting events, see below.
133+
1. The `channel` column contains a list of values that are separated
134+
by a delimiter (`|`), as is declared in the `Delimiter` metadata field
135+
of the `events.json` file.
136+
Thus, the channels related to the event in the third row of the example
137+
are called `F,1`, `F,2`, and `Cz`.
138+
139+
1. The example contains a column called `annots`.
140+
This column is not defined in BIDS, and constitutes additional,
141+
arbitrary (that is, unofficial) metadata.
142+
In the present case, it is used to describe artifacts in the data,
143+
in reference to the `channel` column.
144+
The `annots` column is making use of the powerful HED system
145+
for documenting events, see below.
140146

141147
Events MAY also be documented in machine-actionable form
142148
using HED (Hierarchical Event Descriptor) tags.
@@ -145,8 +151,8 @@ in event-related analyses.
145151
See [Hierarchical Event Descriptors](../appendices/hed.md)
146152
for additional information and examples.
147153

148-
For multi-echo files, the `events.tsv` file is applicable to all echos of
149-
a particular run:
154+
For multi-echo files, the `events.tsv` file is applicable
155+
to all echos of a particular run:
150156

151157
<!-- This block generates a file tree.
152158
A guide for using macros can be found at
@@ -188,8 +194,6 @@ References to existing databases can also be encoded using additional columns.
188194
The following example includes references to the
189195
[Karolinska Directed Emotional Faces (KDEF) database](https://www.kdef.se/).
190196

191-
Example:
192-
193197
<!-- This block generates a file tree.
194198
A guide for using macros can be found at
195199
https://github.com/bids-standard/bids-specification/blob/master/macros_doc.md
@@ -235,8 +239,8 @@ in the accompanying JSON sidecar as follows:
235239
}
236240
```
237241

238-
Note that all other columns SHOULD also be described but are omitted for the
239-
sake of brevity.
242+
Note that all other columns SHOULD also be described but are omitted
243+
for the sake of brevity.
240244

241245
### Stimulus presentation details
242246

src/schema/SCHEMA_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.10.1-dev
1+
0.11.0-dev

src/schema/meta/context.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@ properties:
2929
dataset_description:
3030
description: 'Contents of /dataset_description.json'
3131
type: object
32-
files:
33-
description: 'List of all files in dataset'
34-
type: array
3532
tree:
3633
description: 'Tree view of all files in dataset'
3734
type: object

0 commit comments

Comments
 (0)