Skip to content

Commit 27d13ad

Browse files
committed
fix: move _stim.<ext> specification within the task events module
Depends-on: #1749.
1 parent aa60678 commit 27d13ad

File tree

3 files changed

+98
-17
lines changed

3 files changed

+98
-17
lines changed

mkdocs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ nav:
1212
- Electroencephalography: modality-specific-files/electroencephalography.md
1313
- Intracranial Electroencephalography: modality-specific-files/intracranial-electroencephalography.md
1414
- Task events: modality-specific-files/task-events.md
15-
- Physiological and other continuous recordings: modality-specific-files/physiological-and-other-continuous-recordings.md
15+
- Physiological recordings: modality-specific-files/physiological-recordings.md
1616
- Behavioral experiments (with no neural recordings): modality-specific-files/behavioral-experiments.md
1717
- Genetic Descriptor: modality-specific-files/genetic-descriptor.md
1818
- Positron Emission Tomography: modality-specific-files/positron-emission-tomography.md
@@ -122,7 +122,7 @@ plugins:
122122
"04-modality-specific-files/03-electroencephalography.md": "modality-specific-files/electroencephalography.md"
123123
"04-modality-specific-files/04-intracranial-electroencephalography.md": "modality-specific-files/intracranial-electroencephalography.md"
124124
"04-modality-specific-files/05-task-events.md": "modality-specific-files/task-events.md"
125-
"04-modality-specific-files/06-physiological-and-other-continuous-recordings.md": "modality-specific-files/physiological-and-other-continuous-recordings.md"
125+
"04-modality-specific-files/06-physiological-and-other-continuous-recordings.md": "modality-specific-files/physiological-recordings.md"
126126
"04-modality-specific-files/07-behavioral-experiments.md": "modality-specific-files/behavioral-experiments.md"
127127
"04-modality-specific-files/08-genetic-descriptor.md": "modality-specific-files/genetic-descriptor.md"
128128
"04-modality-specific-files/09-positron-emission-tomography.md": "modality-specific-files/positron-emission-tomography.md"
Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
# Physiological and other continuous recordings
1+
# Physiological recordings
22

3-
Physiological recordings such as cardiac and respiratory signals and other
4-
continuous measures (such as parameters of a film or audio stimuli) MAY be
3+
Physiological recordings such as cardiac and respiratory signals MAY be
54
specified using a [compressed tabular file](../common-principles.md#compressed-tabular-files)
65
([TSVGZ file](../glossary.md#tsvgz-extensions)) and a corresponding
76
JSON file for storing metadata fields (see below).
@@ -22,8 +21,6 @@ sub-<label>/[ses-<label>/]
2221
<datatype>/
2322
<matches>[_recording-<label>]_physio.tsv.gz
2423
<matches>[_recording-<label>]_physio.json
25-
<matches>[_recording-<label>]_stim.tsv.gz
26-
<matches>[_recording-<label>]_stim.json
2724
```
2825

2926
For the template directory name, `<datatype>` can correspond to any data
@@ -37,8 +34,8 @@ For example for the file `sub-control01_task-nback_run-1_bold.nii.gz`,
3734

3835
!!! warning "TSVGZ files MUST NOT include a header line (as established by the [common-principles](../common-principles.md#compressed-tabular-files))"
3936

40-
As a result, when supplying a `*_<physio|stim>.tsv.gz` file, an accompanying
41-
`*_<physio|stim>.json` MUST be supplied as well.
37+
As a result, when supplying a `*_physio.tsv.gz` file, an accompanying
38+
`*_physio.json` MUST be supplied as well.
4239

4340
The [`recording-<label>`](../appendices/entities.md#recording)
4441
entity MAY be used to distinguish between several recording files.
@@ -47,10 +44,9 @@ the eyetracking data in a certain sampling frequency, and
4744
`sub-01_task-bart_recording-breathing_physio.tsv.gz` to contain respiratory
4845
measurements in a different sampling frequency.
4946

50-
Physiological recordings (including eyetracking) SHOULD use the `_physio`
51-
suffix, and signals related to the stimulus SHOULD use `_stim` suffix.
47+
Physiological recordings (including eyetracking) SHOULD use the `_physio`.
5248

53-
The following table specifies metadata fields for the `*_<physio|stim>.json` file.
49+
The following table specifies metadata fields for the `*_physio.json` file.
5450

5551
<!-- This block generates a metadata table.
5652
These tables are defined in
@@ -158,11 +154,6 @@ stored in separate files
158154
(and the [`recording-<label>`](../appendices/entities.md#recording)
159155
entity MAY be used to distinguish these files).
160156

161-
If the same continuous recording has been used for all subjects (for example in
162-
the case where they all watched the same movie), one file MAY be used and
163-
placed in the root directory.
164-
For example, `task-movie_stim.tsv.gz`
165-
166157
For motion parameters acquired from MRI scanner side motion correction, the
167158
`_physio` suffix SHOULD be used.
168159

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

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,3 +309,93 @@ in the accompanying JSON sidecar as follows (based on the example of the previou
309309
"VisionCorrection": "lenses"
310310
}
311311
```
312+
313+
### Continuously-sampled, stimulus-related signals
314+
315+
!!! example "Example datasets"
316+
317+
At the time of writing, there are no
318+
[example datasets](https://bids-standard.github.io/bids-examples/#dataset-index)
319+
showcasing stimulus-related signals.
320+
However, the following datasets shared on [OpenNeuro](https://openneuro.org)
321+
include these type of signals and may be used (with caution, because they are not
322+
"official" examples) as a reference when curating a new dataset:
323+
324+
- [*Trial timing for multivariate pattern
325+
analysis*](https://openneuro.org/datasets/ds000238/versions/00002)
326+
327+
Signals related to stimuli (such as parameters of a film or audio stimuli) that are
328+
evenly recorded at a constant sampling frequency SHOULD be stored as follows.
329+
330+
Template:
331+
332+
```Text
333+
sub-<label>/[ses-<label>/]
334+
<datatype>/
335+
<matches>[_recording-<label>]_stim.tsv.gz
336+
<matches>[_recording-<label>]_stim.json
337+
```
338+
339+
For the template directory name, `<datatype>` can correspond to any data
340+
recording modality, for example `func`, `anat`, `dwi`, `meg`, `eeg`, `ieeg`,
341+
or `beh`.
342+
343+
In the template filenames, the `<matches>` part corresponds to task filename
344+
before the suffix.
345+
For example for the file `sub-control01_task-nback_run-1_bold.nii.gz`,
346+
`<matches>` would correspond to `sub-control01_task-nback_run-1`.
347+
348+
!!! warning "TSVGZ files SHOULD NOT include a header line (as established by the [common-principles](../common-principles.md#compressed-tabular-files))"
349+
350+
As a result, when supplying a `<matches>[_recording-<label>]_stim.tsv.gz` file,
351+
an accompanying `<matches>[_recording-<label>]_stim.json` MUST be supplied as well.
352+
353+
The [`recording-<label>`](../appendices/entities.md#recording)
354+
entity MAY be used to distinguish between several recording files,
355+
as prescribed by the specifications for
356+
[physiological recordings](physiological-recordings.md).
357+
358+
If the same continuous recording has been used for all subjects (for example in
359+
the case where they all watched the same movie), one file placed in the
360+
root directory (for example, `<root>/task-movie_stim.<tsv.gz|json>`) MAY be used
361+
and will apply to all `<matches>_task-movie_<matches>_<suffix>.<ext>` files.
362+
In the following example, the two `task-nback_stim.<json|tsv.gz>` apply
363+
to all the `task-nback` runs across the two available subjects:
364+
365+
<!-- This block generates a file tree.
366+
A guide for using macros can be found at
367+
https://github.com/bids-standard/bids-specification/blob/master/macros_doc.md
368+
-->
369+
{{ MACROS___make_filetree_example({
370+
"sub-01": {
371+
"func": {
372+
"sub-01_task-nback_run-1_bold.nii.gz": "",
373+
"sub-01_task-nback_run-2_bold.nii.gz": "",
374+
},
375+
},
376+
"sub-02": {
377+
"func": {
378+
"sub-02_task-nback_run-1_bold.nii.gz": "",
379+
"sub-02_task-nback_run-2_bold.nii.gz": "",
380+
},
381+
},
382+
"task-nback_stim.json": "",
383+
"task-nback_stim.tsv.gz": "",
384+
}) }}
385+
386+
The following table specifies metadata fields for the
387+
`<matches>[_recording-<label>]_stim.json` file.
388+
389+
<!-- This block generates a metadata table.
390+
These tables are defined in
391+
src/schema/rules/sidecars
392+
The definitions of the fields specified in these tables may be found in
393+
src/schema/objects/metadata.yaml
394+
A guide for using macros can be found at
395+
https://github.com/bids-standard/bids-specification/blob/master/macros_doc.md
396+
-->
397+
{{ MACROS___make_sidecar_table(["continuous.Continuous"]) }}
398+
399+
Additional metadata may be included as in
400+
[any TSV file](../common-principles.md#tabular-files) to specify, for
401+
example, the units of the recorded time series for each column.

0 commit comments

Comments
 (0)