Skip to content

Commit f551f7d

Browse files
authored
Merge branch 'master' into plus-sign-labels
2 parents abce472 + 7975199 commit f551f7d

File tree

14 files changed

+226
-22
lines changed

14 files changed

+226
-22
lines changed

.pre-commit-config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ repos:
1717
- id: check-added-large-files
1818
- id: check-case-conflict
1919
- repo: https://github.com/python-jsonschema/check-jsonschema
20-
rev: 0.31.0
20+
rev: 0.31.1
2121
hooks:
2222
- id: check-dependabot
2323
- id: check-github-workflows
@@ -27,7 +27,7 @@ repos:
2727
- id: check-readthedocs
2828
files: readthedocs.yml
2929
- repo: https://github.com/psf/black
30-
rev: 24.10.0
30+
rev: 25.1.0
3131
hooks:
3232
- id: black
3333
files: ^tools/(?!schemacode)
@@ -37,7 +37,7 @@ repos:
3737
files: tools/schemacode
3838
args: ["--config", "tools/schemacode/pyproject.toml", "--verbose"]
3939
- repo: https://github.com/pyCQA/isort
40-
rev: 5.13.2
40+
rev: 6.0.0
4141
hooks:
4242
- id: isort
4343
files: ^tools/(?!schemacode)
@@ -69,7 +69,7 @@ repos:
6969
- id: pretty-format-toml
7070
args: [--autofix, --indent, '4', --no-sort]
7171
- repo: https://github.com/codespell-project/codespell
72-
rev: v2.3.0
72+
rev: v2.4.1
7373
hooks:
7474
- id: codespell
7575
args: ["--config=.codespellrc", "--dictionary=-", "--dictionary=.codespell_dict"]

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ In this repository, we develop the
2020
To organize your data in BIDS, all you need is neuro data, a computer, and the
2121
[BIDS specification](https://bids-specification.readthedocs.io/en/stable/).
2222

23-
BIDS currently supports the following data modalities with more to come in the future:
23+
BIDS currently supports the following data modalities with
24+
[more to come in the future](https://bids.neuroimaging.io/get_involved.html#extending-the-bids-specification):
2425

2526
- MRI
2627
- MEG

src/appendices/qmri.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ and a guide for using macros can be found at
303303
| -------------------- | ---------------------------------------------------------------------------------------------------- |
304304
| TB1DAM | `FlipAngle` |
305305
| TB1EPI | `EchoTime`, `FlipAngle`, `TotalReadoutTime`, `MixingTime` |
306-
| TB1AFI | `RepetitionTime` |
306+
| TB1AFI | `RepetitionTimeExcitation` |
307307
| TB1TFL | |
308308
| TB1RFM | |
309309
| TB1SRGE<sup>\*</sup> | `FlipAngle`, `InversionTime`, `RepetitionTimeExcitation`, `RepetitionTimePreperation`, `NumberShots` |

src/modality-agnostic-files.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Templates:
88
- `README[.md|.rst|.txt]`
99
- `CITATION.cff`
1010
- `CHANGES`
11-
- `LICENSE`
11+
- `LICENSE[.md|.rst|.txt]`
1212

1313
### `dataset_description.json`
1414

src/schema/README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -399,6 +399,13 @@ These objects additionally have the field:
399399
| `type` | The type (such as `string`, `integer`, `object`) of values the term describes |
400400
| `format` | The format of the term (defined in `objects.formats`) |
401401

402+
`objects.columns` additionally permit a `definition` field that may take any value permissible
403+
for the definition of a column in a JSON sidecar:
404+
405+
| Field | Description |
406+
| ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
407+
| `definition` | A JSON object that describes the column as in [Common principles - Tabular files][tabular files]. This is mutually exclusive with the `type` field, and is used for fields that have overridable definitions. |
408+
402409
Value terms groups (`datatypes`, `suffixes`, `extensions`) define terms where a field
403410
can take on multiple values.
404411
For example, a file has one datatype, as compared to a collection of entities.
@@ -532,6 +539,7 @@ The convention can be summed up in the following rules:
532539
| `display_name` | Human-friendly name |
533540
| `description` | Term definition |
534541
| `name` | Name of column in TSV file (in `snake_case`) |
542+
| `definition` | JSON definition of a column, according to [Tabular files][] |
535543
| `unit` | Interpretation of numeric values |
536544
| `type` | Type of value |
537545
| `format` | Permissible format of values, from definitions in `objects.formats` |
@@ -1052,3 +1060,5 @@ formalize the allowable directories, files, fields and values of the BIDS schema
10521060
ensuring consistency across the entire schema directory. Validation of the schema is
10531061
incorporated into the CI, so any changes that are inconsistent will be flagged before
10541062
inclusion.
1063+
1064+
[tabular files]: https://bids-specification.readthedocs.io/en/stable/common-principles.html#tabular-files

src/schema/objects/files.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,10 @@ LICENSE:
2727
A `LICENSE` file MAY be provided in addition to the short specification of the
2828
used license in the `dataset_description.json` `"License"` field.
2929
The `"License"` field and `LICENSE` file MUST correspond.
30-
The `LICENSE` file MUST be either in ASCII or UTF-8 encoding.
30+
The `LICENSE` file MUST be either in ASCII or UTF-8 encoding and MAY have one of the extensions:
31+
`.md` ([Markdown](https://www.markdownguide.org/)),
32+
`.rst` ([reStructuredText](https://docutils.sourceforge.io/rst.html)),
33+
or `.txt`.
3134
README:
3235
display_name: README
3336
file_type: regular

src/schema/objects/formats.yaml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,18 @@ datetime:
7878
display_name: Datetime
7979
description: |
8080
A datetime in the form `"YYYY-MM-DDThh:mm:ss[.000000][Z]"`,
81-
where [.000000] is an optional subsecond resolution between 1 and 6 decimal points,
82-
and [Z] is an optional, valid timezone code.
83-
pattern: '[0-9]{4}-[0-9]{2}-[0-9]{2}T(?:2[0-3]|[01][0-9]):[0-5][0-9]:[0-5][0-9](\.[0-9]{1,6})?([A-Z]{2,4})?'
81+
where `[.000000]` is an optional subsecond resolution between 1 and 6 decimal points,
82+
and `[Z]` is an optional literal character `Z` that indicates
83+
Coordinated Universal Time (UTC).
84+
pattern: "\
85+
[0-9]{4}\
86+
-(?:0[1-9]|1[0-2])\
87+
-(?:0[1-9]|[12][0-9]|3[01])\
88+
T(?:2[0-3]|[01][0-9])\
89+
:[0-5][0-9]\
90+
:(?:[0-5][0-9]|60)\
91+
(?:\\.[0-9]{1,6})?\
92+
Z?"
8493
file_relative:
8594
display_name: Path relative to the parent file
8695
description: |

src/schema/rules/files/common/core.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,12 @@ CHANGES:
2121
path: CHANGES
2222
LICENSE:
2323
level: optional
24-
path: LICENSE
24+
stem: LICENSE
25+
extensions:
26+
- ''
27+
- .md
28+
- .rst
29+
- .txt
2530
genetic_info:
2631
level: optional
2732
path: genetic_info.json

src/schema/rules/files/deriv/preprocessed_data.yaml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,54 @@ beh_noncontinuous_common:
6969
space: optional
7070
description: optional
7171

72+
channels_channels_common:
73+
$ref: rules.files.raw.channels.channels
74+
entities:
75+
$ref: rules.files.raw.channels.channels.entities
76+
description: optional
77+
78+
channels_channels__meg_common:
79+
$ref: rules.files.raw.channels.channels__meg
80+
entities:
81+
$ref: rules.files.raw.channels.channels__meg.entities
82+
description: optional
83+
84+
channels_channels__motion_common:
85+
$ref: rules.files.raw.channels.channels__motion
86+
entities:
87+
$ref: rules.files.raw.channels.channels__motion.entities
88+
description: optional
89+
90+
channels_coordsystem_common:
91+
$ref: rules.files.raw.channels.coordsystem
92+
entities:
93+
$ref: rules.files.raw.channels.coordsystem.entities
94+
description: optional
95+
96+
channels_coordsystem__eeg_common:
97+
$ref: rules.files.raw.channels.coordsystem__eeg
98+
entities:
99+
$ref: rules.files.raw.channels.coordsystem__eeg.entities
100+
description: optional
101+
102+
channels_electrodes_common:
103+
$ref: rules.files.raw.channels.electrodes
104+
entities:
105+
$ref: rules.files.raw.channels.electrodes.entities
106+
description: optional
107+
108+
channels_electrodes__meg_common:
109+
$ref: rules.files.raw.channels.electrodes__meg
110+
entities:
111+
$ref: rules.files.raw.channels.electrodes__meg.entities
112+
description: optional
113+
114+
channels_electrodes_optodes_common:
115+
$ref: rules.files.raw.channels.optodes
116+
entities:
117+
$ref: rules.files.raw.channels.optodes.entities
118+
description: optional
119+
72120
dwi_dwi_common:
73121
$ref: rules.files.raw.dwi.dwi
74122
entities:
@@ -229,3 +277,9 @@ pet_blood_common:
229277
$ref: rules.files.raw.pet.blood.entities
230278
space: optional
231279
description: optional
280+
281+
task_events_common:
282+
$ref: rules.files.raw.task.events
283+
entities:
284+
$ref: rules.files.raw.task.events.entities
285+
description: optional
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
---
2+
# Anatomical qMRI sequences
3+
VariableFlipAngleMetadata:
4+
selectors:
5+
- suffix == "VFA"
6+
- match(extension, "^\.nii(\.gz)?$")
7+
fields:
8+
FlipAngle: required
9+
PulseSequenceType: required
10+
RepetitionTimeExcitation: required
11+
12+
InversionRecoveryT1Metadata:
13+
selectors:
14+
- suffix == "IRT1"
15+
- match(extension, "^\.nii(\.gz)?$")
16+
fields:
17+
InversionTime: required
18+
19+
MP2RAGEMetadata:
20+
selectors:
21+
- suffix == "MP2RAGE"
22+
- match(extension, "^\.nii(\.gz)?$")
23+
fields:
24+
FlipAngle: required
25+
InversionTime: required
26+
RepetitionTimeExcitation: required
27+
RepetitionTimePreparation: required
28+
NumberShots: required
29+
MagneticFieldStrength: required
30+
31+
MESpinEchoMetadata:
32+
selectors:
33+
- suffix == "MESE"
34+
- match(extension, "^\.nii(\.gz)?$")
35+
fields:
36+
EchoTime: required
37+
38+
MEGradientEchoMetadata:
39+
selectors:
40+
- suffix == "MEGRE"
41+
- match(extension, "^\.nii(\.gz)?$")
42+
fields:
43+
EchoTime: required
44+
45+
MTRatioMetadata:
46+
selectors:
47+
- suffix == "MTR"
48+
- match(extension, "^\.nii(\.gz)?$")
49+
fields:
50+
MTState: required
51+
52+
MTSaturationMetadata:
53+
selectors:
54+
- suffix == "MTS"
55+
- match(extension, "^\.nii(\.gz)?$")
56+
fields:
57+
FlipAngle: required
58+
MTState: required
59+
RepetitionTimeExcitation: required
60+
61+
MultiParametricMappingMetadata:
62+
selectors:
63+
- suffix == "MPM"
64+
- match(extension, "^\.nii(\.gz)?$")
65+
fields:
66+
FlipAngle: required
67+
MTState: required
68+
RepetitionTimeExcitation: required
69+
70+
# Field mapping qMRI sequences
71+
TB1DAMMetadata:
72+
selectors:
73+
- suffix == "TB1DAM"
74+
- match(extension, "^\.nii(\.gz)?$")
75+
fields:
76+
FlipAngle: required
77+
78+
TB1EPIMetadata:
79+
selectors:
80+
- suffix == "TB1EPI"
81+
- match(extension, "^\.nii(\.gz)?$")
82+
fields:
83+
EchoTime: required
84+
FlipAngle: required
85+
TotalReadoutTime: required
86+
MixingTime: required
87+
88+
TB1AFIMetadata:
89+
selectors:
90+
- suffix == "TB1AFI"
91+
- match(extension, "^\.nii(\.gz)?$")
92+
fields:
93+
RepetitionTimeExcitation: required
94+
95+
TB1SRGEMetadata:
96+
selectors:
97+
- suffix == "TB1SRGE"
98+
- match(extension, "^\.nii(\.gz)?$")
99+
fields:
100+
FlipAngle: required
101+
InversionTime: required
102+
RepetitionTimeExcitation: required
103+
RepetitionTimePreparation: required
104+
NumberShots: required

0 commit comments

Comments
 (0)