From 84bfd069416831b388368bbbd8b08a17795c2b99 Mon Sep 17 00:00:00 2001 From: Taylor Salo Date: Fri, 9 Apr 2021 22:10:11 -0400 Subject: [PATCH 01/39] Add template. --- src/schema/columns/_template.yaml | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 src/schema/columns/_template.yaml diff --git a/src/schema/columns/_template.yaml b/src/schema/columns/_template.yaml new file mode 100644 index 0000000000..f4cfb9b52f --- /dev/null +++ b/src/schema/columns/_template.yaml @@ -0,0 +1,5 @@ +--- +key_name: +description: +type: +unit: From 066e2a2a1ebdc5956ae4d0ea1900dbbfd7b6057e Mon Sep 17 00:00:00 2001 From: Taylor Salo Date: Fri, 9 Apr 2021 22:12:21 -0400 Subject: [PATCH 02/39] Add first column. --- src/schema/columns/_template.yaml | 2 +- src/schema/columns/onset.yaml | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 src/schema/columns/onset.yaml diff --git a/src/schema/columns/_template.yaml b/src/schema/columns/_template.yaml index f4cfb9b52f..43e890c784 100644 --- a/src/schema/columns/_template.yaml +++ b/src/schema/columns/_template.yaml @@ -1,5 +1,5 @@ --- -key_name: +name: description: type: unit: diff --git a/src/schema/columns/onset.yaml b/src/schema/columns/onset.yaml new file mode 100644 index 0000000000..b680b713ef --- /dev/null +++ b/src/schema/columns/onset.yaml @@ -0,0 +1,15 @@ +--- +name: onset +description: | + Onset (in seconds) of the event measured from the beginning of the acquisition + of the first volume in the corresponding task imaging data file. + If any acquired scans have been discarded before forming the imaging data file, + ensure that a time of 0 corresponds to the first image stored. + In other words negative numbers in "onset" are allowed (see below). + + For example in case there is an in scanner training phase that begins before + the scanning sequence has started events from this sequence should have + negative onset time counting down to the beginning of the acquisition of the + first volume. +type: number +unit: s From 10816d74f5574e8f963c9f1f44c4396b8912fa39 Mon Sep 17 00:00:00 2001 From: Taylor Salo Date: Fri, 9 Apr 2021 22:40:57 -0400 Subject: [PATCH 03/39] Add columns. --- src/schema/columns/HED.yaml | 6 ++++++ src/schema/columns/abbreviation.yaml | 5 +++++ src/schema/columns/cardiac.yaml | 5 +++++ src/schema/columns/color.yaml | 5 +++++ src/schema/columns/description.yaml | 5 +++++ src/schema/columns/dimension.yaml | 5 +++++ src/schema/columns/duration.yaml | 10 ++++++++++ src/schema/columns/group.yaml | 5 +++++ src/schema/columns/hemisphere.yaml | 5 +++++ src/schema/columns/high_cutoff.yaml | 5 +++++ src/schema/columns/hplc_recovery_fractions.yaml | 5 +++++ src/schema/columns/impedance.yaml | 5 +++++ src/schema/columns/index.yaml | 5 +++++ src/schema/columns/low_cutoff.yaml | 5 +++++ src/schema/columns/manufacturer.yaml | 5 +++++ src/schema/columns/mapping.yaml | 5 +++++ src/schema/columns/material.yaml | 5 +++++ src/schema/columns/metabolite_parent_fraction.yaml | 5 +++++ src/schema/columns/metabolite_polar_fraction.yaml | 5 +++++ src/schema/columns/name.yaml | 5 +++++ src/schema/columns/notch.yaml | 5 +++++ src/schema/columns/plasma_radioactivity.yaml | 5 +++++ src/schema/columns/reference.yaml | 5 +++++ src/schema/columns/respiratory.yaml | 5 +++++ src/schema/columns/response_time.yaml | 11 +++++++++++ src/schema/columns/sample.yaml | 7 +++++++ src/schema/columns/sampling_frequency.yaml | 5 +++++ src/schema/columns/size.yaml | 5 +++++ src/schema/columns/software_filters.yaml | 5 +++++ src/schema/columns/status.yaml | 5 +++++ src/schema/columns/status_description.yaml | 5 +++++ src/schema/columns/stim_file.yaml | 13 +++++++++++++ src/schema/columns/time.yaml | 5 +++++ src/schema/columns/trial_type.yaml | 9 +++++++++ src/schema/columns/trigger.yaml | 5 +++++ src/schema/columns/type.yaml | 5 +++++ src/schema/columns/units.yaml | 5 +++++ src/schema/columns/value.yaml | 6 ++++++ src/schema/columns/whole_blood_radioactivity.yaml | 5 +++++ src/schema/columns/x.yaml | 5 +++++ src/schema/columns/y.yaml | 5 +++++ src/schema/columns/z.yaml | 5 +++++ 42 files changed, 237 insertions(+) create mode 100644 src/schema/columns/HED.yaml create mode 100644 src/schema/columns/abbreviation.yaml create mode 100644 src/schema/columns/cardiac.yaml create mode 100644 src/schema/columns/color.yaml create mode 100644 src/schema/columns/description.yaml create mode 100644 src/schema/columns/dimension.yaml create mode 100644 src/schema/columns/duration.yaml create mode 100644 src/schema/columns/group.yaml create mode 100644 src/schema/columns/hemisphere.yaml create mode 100644 src/schema/columns/high_cutoff.yaml create mode 100644 src/schema/columns/hplc_recovery_fractions.yaml create mode 100644 src/schema/columns/impedance.yaml create mode 100644 src/schema/columns/index.yaml create mode 100644 src/schema/columns/low_cutoff.yaml create mode 100644 src/schema/columns/manufacturer.yaml create mode 100644 src/schema/columns/mapping.yaml create mode 100644 src/schema/columns/material.yaml create mode 100644 src/schema/columns/metabolite_parent_fraction.yaml create mode 100644 src/schema/columns/metabolite_polar_fraction.yaml create mode 100644 src/schema/columns/name.yaml create mode 100644 src/schema/columns/notch.yaml create mode 100644 src/schema/columns/plasma_radioactivity.yaml create mode 100644 src/schema/columns/reference.yaml create mode 100644 src/schema/columns/respiratory.yaml create mode 100644 src/schema/columns/response_time.yaml create mode 100644 src/schema/columns/sample.yaml create mode 100644 src/schema/columns/sampling_frequency.yaml create mode 100644 src/schema/columns/size.yaml create mode 100644 src/schema/columns/software_filters.yaml create mode 100644 src/schema/columns/status.yaml create mode 100644 src/schema/columns/status_description.yaml create mode 100644 src/schema/columns/stim_file.yaml create mode 100644 src/schema/columns/time.yaml create mode 100644 src/schema/columns/trial_type.yaml create mode 100644 src/schema/columns/trigger.yaml create mode 100644 src/schema/columns/type.yaml create mode 100644 src/schema/columns/units.yaml create mode 100644 src/schema/columns/value.yaml create mode 100644 src/schema/columns/whole_blood_radioactivity.yaml create mode 100644 src/schema/columns/x.yaml create mode 100644 src/schema/columns/y.yaml create mode 100644 src/schema/columns/z.yaml diff --git a/src/schema/columns/HED.yaml b/src/schema/columns/HED.yaml new file mode 100644 index 0000000000..f3ce95216b --- /dev/null +++ b/src/schema/columns/HED.yaml @@ -0,0 +1,6 @@ +--- +name: +description: | + Hierarchical Event Descriptor (HED) Tag. + See [Appendix III](/99-appendices/03-hed.html) for details. +type: string diff --git a/src/schema/columns/abbreviation.yaml b/src/schema/columns/abbreviation.yaml new file mode 100644 index 0000000000..43e890c784 --- /dev/null +++ b/src/schema/columns/abbreviation.yaml @@ -0,0 +1,5 @@ +--- +name: +description: +type: +unit: diff --git a/src/schema/columns/cardiac.yaml b/src/schema/columns/cardiac.yaml new file mode 100644 index 0000000000..43e890c784 --- /dev/null +++ b/src/schema/columns/cardiac.yaml @@ -0,0 +1,5 @@ +--- +name: +description: +type: +unit: diff --git a/src/schema/columns/color.yaml b/src/schema/columns/color.yaml new file mode 100644 index 0000000000..43e890c784 --- /dev/null +++ b/src/schema/columns/color.yaml @@ -0,0 +1,5 @@ +--- +name: +description: +type: +unit: diff --git a/src/schema/columns/description.yaml b/src/schema/columns/description.yaml new file mode 100644 index 0000000000..43e890c784 --- /dev/null +++ b/src/schema/columns/description.yaml @@ -0,0 +1,5 @@ +--- +name: +description: +type: +unit: diff --git a/src/schema/columns/dimension.yaml b/src/schema/columns/dimension.yaml new file mode 100644 index 0000000000..43e890c784 --- /dev/null +++ b/src/schema/columns/dimension.yaml @@ -0,0 +1,5 @@ +--- +name: +description: +type: +unit: diff --git a/src/schema/columns/duration.yaml b/src/schema/columns/duration.yaml new file mode 100644 index 0000000000..881ae5e7b1 --- /dev/null +++ b/src/schema/columns/duration.yaml @@ -0,0 +1,10 @@ +--- +name: duration +description: | + Duration of the event (measured from onset) in seconds. + Must always be either zero or positive. + A "duration" value of zero implies that the delta function or event is so + short as to be effectively modeled as an impulse. +type: number +unit: s +minimum: 0 diff --git a/src/schema/columns/group.yaml b/src/schema/columns/group.yaml new file mode 100644 index 0000000000..43e890c784 --- /dev/null +++ b/src/schema/columns/group.yaml @@ -0,0 +1,5 @@ +--- +name: +description: +type: +unit: diff --git a/src/schema/columns/hemisphere.yaml b/src/schema/columns/hemisphere.yaml new file mode 100644 index 0000000000..43e890c784 --- /dev/null +++ b/src/schema/columns/hemisphere.yaml @@ -0,0 +1,5 @@ +--- +name: +description: +type: +unit: diff --git a/src/schema/columns/high_cutoff.yaml b/src/schema/columns/high_cutoff.yaml new file mode 100644 index 0000000000..43e890c784 --- /dev/null +++ b/src/schema/columns/high_cutoff.yaml @@ -0,0 +1,5 @@ +--- +name: +description: +type: +unit: diff --git a/src/schema/columns/hplc_recovery_fractions.yaml b/src/schema/columns/hplc_recovery_fractions.yaml new file mode 100644 index 0000000000..43e890c784 --- /dev/null +++ b/src/schema/columns/hplc_recovery_fractions.yaml @@ -0,0 +1,5 @@ +--- +name: +description: +type: +unit: diff --git a/src/schema/columns/impedance.yaml b/src/schema/columns/impedance.yaml new file mode 100644 index 0000000000..43e890c784 --- /dev/null +++ b/src/schema/columns/impedance.yaml @@ -0,0 +1,5 @@ +--- +name: +description: +type: +unit: diff --git a/src/schema/columns/index.yaml b/src/schema/columns/index.yaml new file mode 100644 index 0000000000..43e890c784 --- /dev/null +++ b/src/schema/columns/index.yaml @@ -0,0 +1,5 @@ +--- +name: +description: +type: +unit: diff --git a/src/schema/columns/low_cutoff.yaml b/src/schema/columns/low_cutoff.yaml new file mode 100644 index 0000000000..43e890c784 --- /dev/null +++ b/src/schema/columns/low_cutoff.yaml @@ -0,0 +1,5 @@ +--- +name: +description: +type: +unit: diff --git a/src/schema/columns/manufacturer.yaml b/src/schema/columns/manufacturer.yaml new file mode 100644 index 0000000000..43e890c784 --- /dev/null +++ b/src/schema/columns/manufacturer.yaml @@ -0,0 +1,5 @@ +--- +name: +description: +type: +unit: diff --git a/src/schema/columns/mapping.yaml b/src/schema/columns/mapping.yaml new file mode 100644 index 0000000000..43e890c784 --- /dev/null +++ b/src/schema/columns/mapping.yaml @@ -0,0 +1,5 @@ +--- +name: +description: +type: +unit: diff --git a/src/schema/columns/material.yaml b/src/schema/columns/material.yaml new file mode 100644 index 0000000000..43e890c784 --- /dev/null +++ b/src/schema/columns/material.yaml @@ -0,0 +1,5 @@ +--- +name: +description: +type: +unit: diff --git a/src/schema/columns/metabolite_parent_fraction.yaml b/src/schema/columns/metabolite_parent_fraction.yaml new file mode 100644 index 0000000000..43e890c784 --- /dev/null +++ b/src/schema/columns/metabolite_parent_fraction.yaml @@ -0,0 +1,5 @@ +--- +name: +description: +type: +unit: diff --git a/src/schema/columns/metabolite_polar_fraction.yaml b/src/schema/columns/metabolite_polar_fraction.yaml new file mode 100644 index 0000000000..43e890c784 --- /dev/null +++ b/src/schema/columns/metabolite_polar_fraction.yaml @@ -0,0 +1,5 @@ +--- +name: +description: +type: +unit: diff --git a/src/schema/columns/name.yaml b/src/schema/columns/name.yaml new file mode 100644 index 0000000000..43e890c784 --- /dev/null +++ b/src/schema/columns/name.yaml @@ -0,0 +1,5 @@ +--- +name: +description: +type: +unit: diff --git a/src/schema/columns/notch.yaml b/src/schema/columns/notch.yaml new file mode 100644 index 0000000000..43e890c784 --- /dev/null +++ b/src/schema/columns/notch.yaml @@ -0,0 +1,5 @@ +--- +name: +description: +type: +unit: diff --git a/src/schema/columns/plasma_radioactivity.yaml b/src/schema/columns/plasma_radioactivity.yaml new file mode 100644 index 0000000000..43e890c784 --- /dev/null +++ b/src/schema/columns/plasma_radioactivity.yaml @@ -0,0 +1,5 @@ +--- +name: +description: +type: +unit: diff --git a/src/schema/columns/reference.yaml b/src/schema/columns/reference.yaml new file mode 100644 index 0000000000..43e890c784 --- /dev/null +++ b/src/schema/columns/reference.yaml @@ -0,0 +1,5 @@ +--- +name: +description: +type: +unit: diff --git a/src/schema/columns/respiratory.yaml b/src/schema/columns/respiratory.yaml new file mode 100644 index 0000000000..43e890c784 --- /dev/null +++ b/src/schema/columns/respiratory.yaml @@ -0,0 +1,5 @@ +--- +name: +description: +type: +unit: diff --git a/src/schema/columns/response_time.yaml b/src/schema/columns/response_time.yaml new file mode 100644 index 0000000000..3cc74193cf --- /dev/null +++ b/src/schema/columns/response_time.yaml @@ -0,0 +1,11 @@ +--- +name: response_time +description: | + Response time measured in seconds. + A negative response time can be used to represent preemptive responses and + "n/a" denotes a missed response. +anyOf: + - type: number + unit: s + - type: string + pattern: ^n/a$ diff --git a/src/schema/columns/sample.yaml b/src/schema/columns/sample.yaml new file mode 100644 index 0000000000..73bd5d7437 --- /dev/null +++ b/src/schema/columns/sample.yaml @@ -0,0 +1,7 @@ +--- +name: sample +description: | + Onset of the event according to the sampling scheme of the recorded modality + (that is, referring to the raw data file that the `events.tsv` file + accompanies). +type: integer diff --git a/src/schema/columns/sampling_frequency.yaml b/src/schema/columns/sampling_frequency.yaml new file mode 100644 index 0000000000..43e890c784 --- /dev/null +++ b/src/schema/columns/sampling_frequency.yaml @@ -0,0 +1,5 @@ +--- +name: +description: +type: +unit: diff --git a/src/schema/columns/size.yaml b/src/schema/columns/size.yaml new file mode 100644 index 0000000000..43e890c784 --- /dev/null +++ b/src/schema/columns/size.yaml @@ -0,0 +1,5 @@ +--- +name: +description: +type: +unit: diff --git a/src/schema/columns/software_filters.yaml b/src/schema/columns/software_filters.yaml new file mode 100644 index 0000000000..43e890c784 --- /dev/null +++ b/src/schema/columns/software_filters.yaml @@ -0,0 +1,5 @@ +--- +name: +description: +type: +unit: diff --git a/src/schema/columns/status.yaml b/src/schema/columns/status.yaml new file mode 100644 index 0000000000..43e890c784 --- /dev/null +++ b/src/schema/columns/status.yaml @@ -0,0 +1,5 @@ +--- +name: +description: +type: +unit: diff --git a/src/schema/columns/status_description.yaml b/src/schema/columns/status_description.yaml new file mode 100644 index 0000000000..43e890c784 --- /dev/null +++ b/src/schema/columns/status_description.yaml @@ -0,0 +1,5 @@ +--- +name: +description: +type: +unit: diff --git a/src/schema/columns/stim_file.yaml b/src/schema/columns/stim_file.yaml new file mode 100644 index 0000000000..8282b5ea28 --- /dev/null +++ b/src/schema/columns/stim_file.yaml @@ -0,0 +1,13 @@ +--- +name: stim_file +description: | + Represents the location of the stimulus file (such as an image, video, or + audio file) presented at the given onset time. + There are no restrictions on the file formats of the stimuli files, + but they should be stored in the /stimuli folder + (under the root folder of the dataset; with optional subfolders). + The values under the stim_file column correspond to a path relative to + "/stimuli". + For example "images/cat03.jpg" will be translated to "/stimuli/images/cat03.jpg". +type: string +format: stimuli_relative diff --git a/src/schema/columns/time.yaml b/src/schema/columns/time.yaml new file mode 100644 index 0000000000..43e890c784 --- /dev/null +++ b/src/schema/columns/time.yaml @@ -0,0 +1,5 @@ +--- +name: +description: +type: +unit: diff --git a/src/schema/columns/trial_type.yaml b/src/schema/columns/trial_type.yaml new file mode 100644 index 0000000000..05e371ac2c --- /dev/null +++ b/src/schema/columns/trial_type.yaml @@ -0,0 +1,9 @@ +--- +name: trial_type +description: | + Primary categorisation of each trial to identify them as instances of the + experimental conditions. + For example: for a response inhibition task, it could take on values "go" and + "no-go" to refer to response initiation and response inhibition experimental + conditions. +type: string diff --git a/src/schema/columns/trigger.yaml b/src/schema/columns/trigger.yaml new file mode 100644 index 0000000000..43e890c784 --- /dev/null +++ b/src/schema/columns/trigger.yaml @@ -0,0 +1,5 @@ +--- +name: +description: +type: +unit: diff --git a/src/schema/columns/type.yaml b/src/schema/columns/type.yaml new file mode 100644 index 0000000000..43e890c784 --- /dev/null +++ b/src/schema/columns/type.yaml @@ -0,0 +1,5 @@ +--- +name: +description: +type: +unit: diff --git a/src/schema/columns/units.yaml b/src/schema/columns/units.yaml new file mode 100644 index 0000000000..43e890c784 --- /dev/null +++ b/src/schema/columns/units.yaml @@ -0,0 +1,5 @@ +--- +name: +description: +type: +unit: diff --git a/src/schema/columns/value.yaml b/src/schema/columns/value.yaml new file mode 100644 index 0000000000..2e2868f57c --- /dev/null +++ b/src/schema/columns/value.yaml @@ -0,0 +1,6 @@ +--- +name: value +description: | + Marker value associated with the event (for example, the value of a TTL + trigger that was recorded at the onset of the event). +type: number diff --git a/src/schema/columns/whole_blood_radioactivity.yaml b/src/schema/columns/whole_blood_radioactivity.yaml new file mode 100644 index 0000000000..43e890c784 --- /dev/null +++ b/src/schema/columns/whole_blood_radioactivity.yaml @@ -0,0 +1,5 @@ +--- +name: +description: +type: +unit: diff --git a/src/schema/columns/x.yaml b/src/schema/columns/x.yaml new file mode 100644 index 0000000000..43e890c784 --- /dev/null +++ b/src/schema/columns/x.yaml @@ -0,0 +1,5 @@ +--- +name: +description: +type: +unit: diff --git a/src/schema/columns/y.yaml b/src/schema/columns/y.yaml new file mode 100644 index 0000000000..43e890c784 --- /dev/null +++ b/src/schema/columns/y.yaml @@ -0,0 +1,5 @@ +--- +name: +description: +type: +unit: diff --git a/src/schema/columns/z.yaml b/src/schema/columns/z.yaml new file mode 100644 index 0000000000..43e890c784 --- /dev/null +++ b/src/schema/columns/z.yaml @@ -0,0 +1,5 @@ +--- +name: +description: +type: +unit: From 19901cda2f4668eea6023a957aed8505cfc68401 Mon Sep 17 00:00:00 2001 From: Taylor Salo Date: Tue, 13 Apr 2021 13:58:58 -0400 Subject: [PATCH 04/39] More terms. --- src/schema/columns/abbreviation.yaml | 8 ++++---- src/schema/columns/cardiac.yaml | 8 ++++---- src/schema/columns/color.yaml | 9 +++++---- src/schema/columns/sampling_frequency.yaml | 9 +++++---- 4 files changed, 18 insertions(+), 16 deletions(-) diff --git a/src/schema/columns/abbreviation.yaml b/src/schema/columns/abbreviation.yaml index 43e890c784..2711d58c02 100644 --- a/src/schema/columns/abbreviation.yaml +++ b/src/schema/columns/abbreviation.yaml @@ -1,5 +1,5 @@ --- -name: -description: -type: -unit: +name: abbreviation +description: | + The unique label abbreviation +type: string diff --git a/src/schema/columns/cardiac.yaml b/src/schema/columns/cardiac.yaml index 43e890c784..b9dd2efce3 100644 --- a/src/schema/columns/cardiac.yaml +++ b/src/schema/columns/cardiac.yaml @@ -1,5 +1,5 @@ --- -name: -description: -type: -unit: +name: cardiac +description: | + continuous pulse measurement +type: number diff --git a/src/schema/columns/color.yaml b/src/schema/columns/color.yaml index 43e890c784..2a27c4e836 100644 --- a/src/schema/columns/color.yaml +++ b/src/schema/columns/color.yaml @@ -1,5 +1,6 @@ --- -name: -description: -type: -unit: +name: color +description: | + Hexadecimal. Label color for visualization. +type: string +unit: hexadecimal diff --git a/src/schema/columns/sampling_frequency.yaml b/src/schema/columns/sampling_frequency.yaml index 43e890c784..c001e1a0e7 100644 --- a/src/schema/columns/sampling_frequency.yaml +++ b/src/schema/columns/sampling_frequency.yaml @@ -1,5 +1,6 @@ --- -name: -description: -type: -unit: +name: sampling_frequency +description: | + Sampling rate of the channel in Hz. +type: number +unit: Hz From 2a48ef658d1f63d11237367dcb99a2ee86e5703c Mon Sep 17 00:00:00 2001 From: Taylor Salo Date: Fri, 9 Jul 2021 11:48:51 -0400 Subject: [PATCH 05/39] Fill name field in all files. --- src/schema/columns/HED.yaml | 2 +- src/schema/columns/description.yaml | 2 +- src/schema/columns/dimension.yaml | 9 +++++---- src/schema/columns/group.yaml | 13 +++++++++---- src/schema/columns/hemisphere.yaml | 11 +++++++---- src/schema/columns/high_cutoff.yaml | 17 +++++++++++++---- src/schema/columns/hplc_recovery_fractions.yaml | 9 +++++---- src/schema/columns/impedance.yaml | 2 +- src/schema/columns/index.yaml | 2 +- src/schema/columns/low_cutoff.yaml | 2 +- src/schema/columns/manufacturer.yaml | 2 +- src/schema/columns/mapping.yaml | 2 +- src/schema/columns/material.yaml | 2 +- .../columns/metabolite_parent_fraction.yaml | 2 +- .../columns/metabolite_polar_fraction.yaml | 2 +- src/schema/columns/name.yaml | 2 +- src/schema/columns/notch.yaml | 2 +- src/schema/columns/plasma_radioactivity.yaml | 2 +- src/schema/columns/reference.yaml | 2 +- src/schema/columns/respiratory.yaml | 2 +- src/schema/columns/response_time.yaml | 3 ++- src/schema/columns/sample.yaml | 3 +-- src/schema/columns/size.yaml | 2 +- src/schema/columns/software_filters.yaml | 2 +- src/schema/columns/status.yaml | 2 +- src/schema/columns/status_description.yaml | 2 +- src/schema/columns/time.yaml | 2 +- src/schema/columns/trigger.yaml | 2 +- src/schema/columns/type.yaml | 2 +- src/schema/columns/units.yaml | 2 +- .../columns/whole_blood_radioactivity.yaml | 2 +- src/schema/columns/x.yaml | 2 +- src/schema/columns/y.yaml | 2 +- src/schema/columns/z.yaml | 2 +- 34 files changed, 69 insertions(+), 50 deletions(-) diff --git a/src/schema/columns/HED.yaml b/src/schema/columns/HED.yaml index f3ce95216b..d4db35bf63 100644 --- a/src/schema/columns/HED.yaml +++ b/src/schema/columns/HED.yaml @@ -1,5 +1,5 @@ --- -name: +name: HED description: | Hierarchical Event Descriptor (HED) Tag. See [Appendix III](/99-appendices/03-hed.html) for details. diff --git a/src/schema/columns/description.yaml b/src/schema/columns/description.yaml index 43e890c784..b149026ed4 100644 --- a/src/schema/columns/description.yaml +++ b/src/schema/columns/description.yaml @@ -1,5 +1,5 @@ --- -name: +name: description description: type: unit: diff --git a/src/schema/columns/dimension.yaml b/src/schema/columns/dimension.yaml index 43e890c784..3df515ddea 100644 --- a/src/schema/columns/dimension.yaml +++ b/src/schema/columns/dimension.yaml @@ -1,5 +1,6 @@ --- -name: -description: -type: -unit: +name: dimension +description: | + Size of the group (grid/strip/probe) that this electrode belongs to. + Must be of form `[AxB]` with the smallest dimension first (for example, `[1x8]`). +type: string diff --git a/src/schema/columns/group.yaml b/src/schema/columns/group.yaml index 43e890c784..a194afa90c 100644 --- a/src/schema/columns/group.yaml +++ b/src/schema/columns/group.yaml @@ -1,5 +1,10 @@ --- -name: -description: -type: -unit: +name: group +description: | + Which group of channels (grid/strip/seeg/depth) this channel belongs to. + This is relevant because one group has one cable-bundle and noise can be shared. + This can be a name or number. + Note that any groups specified in `_electrodes.tsv` must match those present here. +anyOf: + - type: string + - type: number diff --git a/src/schema/columns/hemisphere.yaml b/src/schema/columns/hemisphere.yaml index 43e890c784..ed39d85b71 100644 --- a/src/schema/columns/hemisphere.yaml +++ b/src/schema/columns/hemisphere.yaml @@ -1,5 +1,8 @@ --- -name: -description: -type: -unit: +name: hemisphere +description: | + The hemisphere in which the electrode is placed, one of `['L' or 'R']` (use capital). +type: string +enum: + - L + - R diff --git a/src/schema/columns/high_cutoff.yaml b/src/schema/columns/high_cutoff.yaml index 43e890c784..b0f871b133 100644 --- a/src/schema/columns/high_cutoff.yaml +++ b/src/schema/columns/high_cutoff.yaml @@ -1,5 +1,14 @@ --- -name: -description: -type: -unit: +name: high_cutoff +description: | + Frequencies used for the low-pass filter applied to the channel in Hz. + If no low-pass filter applied, use `n/a`. + Note that hardware anti-aliasing in A/D conversion of all MEG/EEG electronics + applies a low-pass filter; specify its frequency here if applicable. +anyOf: + - type: number + unit: Hz + minimum: 0 + - type: string + enum: + - n/a diff --git a/src/schema/columns/hplc_recovery_fractions.yaml b/src/schema/columns/hplc_recovery_fractions.yaml index 43e890c784..967599da0a 100644 --- a/src/schema/columns/hplc_recovery_fractions.yaml +++ b/src/schema/columns/hplc_recovery_fractions.yaml @@ -1,5 +1,6 @@ --- -name: -description: -type: -unit: +name: hplc_recovery_fractions +description: | + HPLC recovery fractions (the fraction of activity that gets loaded onto the HPLC). +type: number +unit: arbitrary diff --git a/src/schema/columns/impedance.yaml b/src/schema/columns/impedance.yaml index 43e890c784..3b704cde06 100644 --- a/src/schema/columns/impedance.yaml +++ b/src/schema/columns/impedance.yaml @@ -1,5 +1,5 @@ --- -name: +name: impedance description: type: unit: diff --git a/src/schema/columns/index.yaml b/src/schema/columns/index.yaml index 43e890c784..86cf04731b 100644 --- a/src/schema/columns/index.yaml +++ b/src/schema/columns/index.yaml @@ -1,5 +1,5 @@ --- -name: +name: index description: type: unit: diff --git a/src/schema/columns/low_cutoff.yaml b/src/schema/columns/low_cutoff.yaml index 43e890c784..536a932dda 100644 --- a/src/schema/columns/low_cutoff.yaml +++ b/src/schema/columns/low_cutoff.yaml @@ -1,5 +1,5 @@ --- -name: +name: low_cutoff description: type: unit: diff --git a/src/schema/columns/manufacturer.yaml b/src/schema/columns/manufacturer.yaml index 43e890c784..a0c4f0da2f 100644 --- a/src/schema/columns/manufacturer.yaml +++ b/src/schema/columns/manufacturer.yaml @@ -1,5 +1,5 @@ --- -name: +name: manufacturer description: type: unit: diff --git a/src/schema/columns/mapping.yaml b/src/schema/columns/mapping.yaml index 43e890c784..baf851bdfe 100644 --- a/src/schema/columns/mapping.yaml +++ b/src/schema/columns/mapping.yaml @@ -1,5 +1,5 @@ --- -name: +name: mapping description: type: unit: diff --git a/src/schema/columns/material.yaml b/src/schema/columns/material.yaml index 43e890c784..53af82855e 100644 --- a/src/schema/columns/material.yaml +++ b/src/schema/columns/material.yaml @@ -1,5 +1,5 @@ --- -name: +name: material description: type: unit: diff --git a/src/schema/columns/metabolite_parent_fraction.yaml b/src/schema/columns/metabolite_parent_fraction.yaml index 43e890c784..d1563be6cd 100644 --- a/src/schema/columns/metabolite_parent_fraction.yaml +++ b/src/schema/columns/metabolite_parent_fraction.yaml @@ -1,5 +1,5 @@ --- -name: +name: metabolite_parent_fraction description: type: unit: diff --git a/src/schema/columns/metabolite_polar_fraction.yaml b/src/schema/columns/metabolite_polar_fraction.yaml index 43e890c784..edbbdb0906 100644 --- a/src/schema/columns/metabolite_polar_fraction.yaml +++ b/src/schema/columns/metabolite_polar_fraction.yaml @@ -1,5 +1,5 @@ --- -name: +name: metabolite_polar_fraction description: type: unit: diff --git a/src/schema/columns/name.yaml b/src/schema/columns/name.yaml index 43e890c784..ec37f3c56c 100644 --- a/src/schema/columns/name.yaml +++ b/src/schema/columns/name.yaml @@ -1,5 +1,5 @@ --- -name: +name: name description: type: unit: diff --git a/src/schema/columns/notch.yaml b/src/schema/columns/notch.yaml index 43e890c784..edae7e29ab 100644 --- a/src/schema/columns/notch.yaml +++ b/src/schema/columns/notch.yaml @@ -1,5 +1,5 @@ --- -name: +name: notch description: type: unit: diff --git a/src/schema/columns/plasma_radioactivity.yaml b/src/schema/columns/plasma_radioactivity.yaml index 43e890c784..e77ce6de19 100644 --- a/src/schema/columns/plasma_radioactivity.yaml +++ b/src/schema/columns/plasma_radioactivity.yaml @@ -1,5 +1,5 @@ --- -name: +name: plasma_reactivity description: type: unit: diff --git a/src/schema/columns/reference.yaml b/src/schema/columns/reference.yaml index 43e890c784..031442723a 100644 --- a/src/schema/columns/reference.yaml +++ b/src/schema/columns/reference.yaml @@ -1,5 +1,5 @@ --- -name: +name: reference description: type: unit: diff --git a/src/schema/columns/respiratory.yaml b/src/schema/columns/respiratory.yaml index 43e890c784..e6deb2a487 100644 --- a/src/schema/columns/respiratory.yaml +++ b/src/schema/columns/respiratory.yaml @@ -1,5 +1,5 @@ --- -name: +name: respiratory description: type: unit: diff --git a/src/schema/columns/response_time.yaml b/src/schema/columns/response_time.yaml index 3cc74193cf..0b961ab58d 100644 --- a/src/schema/columns/response_time.yaml +++ b/src/schema/columns/response_time.yaml @@ -8,4 +8,5 @@ anyOf: - type: number unit: s - type: string - pattern: ^n/a$ + enum: + - n/a diff --git a/src/schema/columns/sample.yaml b/src/schema/columns/sample.yaml index 73bd5d7437..798c9fd8a4 100644 --- a/src/schema/columns/sample.yaml +++ b/src/schema/columns/sample.yaml @@ -2,6 +2,5 @@ name: sample description: | Onset of the event according to the sampling scheme of the recorded modality - (that is, referring to the raw data file that the `events.tsv` file - accompanies). + (that is, referring to the raw data file that the `events.tsv` file accompanies). type: integer diff --git a/src/schema/columns/size.yaml b/src/schema/columns/size.yaml index 43e890c784..5afa5c5291 100644 --- a/src/schema/columns/size.yaml +++ b/src/schema/columns/size.yaml @@ -1,5 +1,5 @@ --- -name: +name: size description: type: unit: diff --git a/src/schema/columns/software_filters.yaml b/src/schema/columns/software_filters.yaml index 43e890c784..b1f2ea4457 100644 --- a/src/schema/columns/software_filters.yaml +++ b/src/schema/columns/software_filters.yaml @@ -1,5 +1,5 @@ --- -name: +name: software_filters description: type: unit: diff --git a/src/schema/columns/status.yaml b/src/schema/columns/status.yaml index 43e890c784..ea06b1001d 100644 --- a/src/schema/columns/status.yaml +++ b/src/schema/columns/status.yaml @@ -1,5 +1,5 @@ --- -name: +name: status description: type: unit: diff --git a/src/schema/columns/status_description.yaml b/src/schema/columns/status_description.yaml index 43e890c784..5e5a144ab2 100644 --- a/src/schema/columns/status_description.yaml +++ b/src/schema/columns/status_description.yaml @@ -1,5 +1,5 @@ --- -name: +name: status_description description: type: unit: diff --git a/src/schema/columns/time.yaml b/src/schema/columns/time.yaml index 43e890c784..3cd0bfa553 100644 --- a/src/schema/columns/time.yaml +++ b/src/schema/columns/time.yaml @@ -1,5 +1,5 @@ --- -name: +name: time description: type: unit: diff --git a/src/schema/columns/trigger.yaml b/src/schema/columns/trigger.yaml index 43e890c784..a578be76d1 100644 --- a/src/schema/columns/trigger.yaml +++ b/src/schema/columns/trigger.yaml @@ -1,5 +1,5 @@ --- -name: +name: trigger description: type: unit: diff --git a/src/schema/columns/type.yaml b/src/schema/columns/type.yaml index 43e890c784..9406ad6a6d 100644 --- a/src/schema/columns/type.yaml +++ b/src/schema/columns/type.yaml @@ -1,5 +1,5 @@ --- -name: +name: type description: type: unit: diff --git a/src/schema/columns/units.yaml b/src/schema/columns/units.yaml index 43e890c784..67a7be763f 100644 --- a/src/schema/columns/units.yaml +++ b/src/schema/columns/units.yaml @@ -1,5 +1,5 @@ --- -name: +name: units description: type: unit: diff --git a/src/schema/columns/whole_blood_radioactivity.yaml b/src/schema/columns/whole_blood_radioactivity.yaml index 43e890c784..3ecd84ba32 100644 --- a/src/schema/columns/whole_blood_radioactivity.yaml +++ b/src/schema/columns/whole_blood_radioactivity.yaml @@ -1,5 +1,5 @@ --- -name: +name: whole_blood_radioactivity description: type: unit: diff --git a/src/schema/columns/x.yaml b/src/schema/columns/x.yaml index 43e890c784..d446b1a5cb 100644 --- a/src/schema/columns/x.yaml +++ b/src/schema/columns/x.yaml @@ -1,5 +1,5 @@ --- -name: +name: x description: type: unit: diff --git a/src/schema/columns/y.yaml b/src/schema/columns/y.yaml index 43e890c784..c72d640268 100644 --- a/src/schema/columns/y.yaml +++ b/src/schema/columns/y.yaml @@ -1,5 +1,5 @@ --- -name: +name: y description: type: unit: diff --git a/src/schema/columns/z.yaml b/src/schema/columns/z.yaml index 43e890c784..d3dc5abce7 100644 --- a/src/schema/columns/z.yaml +++ b/src/schema/columns/z.yaml @@ -1,5 +1,5 @@ --- -name: +name: z description: type: unit: From 2451b9ad7872a39f84af668ef3f4e382373d68cb Mon Sep 17 00:00:00 2001 From: Taylor Salo Date: Fri, 9 Jul 2021 12:06:13 -0400 Subject: [PATCH 06/39] More work. Note that there are three very different uses of "name" columns, and two of them are equally common, so I chose not to specify any of them as the "canonical" definition. --- src/schema/columns/description.yaml | 6 +++--- src/schema/columns/impedance.yaml | 7 ++++--- src/schema/columns/index.yaml | 6 +++--- src/schema/columns/low_cutoff.yaml | 12 +++++++++--- src/schema/columns/manufacturer.yaml | 7 ++++--- src/schema/columns/mapping.yaml | 6 +++--- src/schema/columns/material.yaml | 6 +++--- src/schema/columns/metabolite_parent_fraction.yaml | 8 +++++--- src/schema/columns/metabolite_polar_fraction.yaml | 8 +++++--- src/schema/columns/name.yaml | 5 ----- src/schema/columns/name_channels.yaml | 9 +++++++++ src/schema/columns/name_electrodes.yaml | 6 ++++++ src/schema/columns/name_segmentations.yaml | 6 ++++++ src/schema/columns/notch.yaml | 12 +++++++++--- 14 files changed, 69 insertions(+), 35 deletions(-) delete mode 100644 src/schema/columns/name.yaml create mode 100644 src/schema/columns/name_channels.yaml create mode 100644 src/schema/columns/name_electrodes.yaml create mode 100644 src/schema/columns/name_segmentations.yaml diff --git a/src/schema/columns/description.yaml b/src/schema/columns/description.yaml index b149026ed4..89d5b28f3a 100644 --- a/src/schema/columns/description.yaml +++ b/src/schema/columns/description.yaml @@ -1,5 +1,5 @@ --- name: description -description: -type: -unit: +description: | + Brief free-text description of the channel, or other information of interest. +type: string diff --git a/src/schema/columns/impedance.yaml b/src/schema/columns/impedance.yaml index 3b704cde06..c2b41fcbd8 100644 --- a/src/schema/columns/impedance.yaml +++ b/src/schema/columns/impedance.yaml @@ -1,5 +1,6 @@ --- name: impedance -description: -type: -unit: +description: | + Impedance of the electrode, units MUST be in `kOhm`. +type: number +unit: kOhm diff --git a/src/schema/columns/index.yaml b/src/schema/columns/index.yaml index 86cf04731b..cd7b258870 100644 --- a/src/schema/columns/index.yaml +++ b/src/schema/columns/index.yaml @@ -1,5 +1,5 @@ --- name: index -description: -type: -unit: +description: | + The label integer index. +type: integer diff --git a/src/schema/columns/low_cutoff.yaml b/src/schema/columns/low_cutoff.yaml index 536a932dda..c43298d3f1 100644 --- a/src/schema/columns/low_cutoff.yaml +++ b/src/schema/columns/low_cutoff.yaml @@ -1,5 +1,11 @@ --- name: low_cutoff -description: -type: -unit: +description: | + Frequencies used for the high-pass filter applied to the channel in Hz. + If no high-pass filter applied, use `n/a`. +anyOf: + - type: number + unit: Hz + - type: string + enum: + - n/a diff --git a/src/schema/columns/manufacturer.yaml b/src/schema/columns/manufacturer.yaml index a0c4f0da2f..a0694e5e75 100644 --- a/src/schema/columns/manufacturer.yaml +++ b/src/schema/columns/manufacturer.yaml @@ -1,5 +1,6 @@ --- name: manufacturer -description: -type: -unit: +description: | + The manufacturer for each electrode. + Can be used if electrodes were manufactured by more than one company. +type: string diff --git a/src/schema/columns/mapping.yaml b/src/schema/columns/mapping.yaml index baf851bdfe..7cc796e016 100644 --- a/src/schema/columns/mapping.yaml +++ b/src/schema/columns/mapping.yaml @@ -1,5 +1,5 @@ --- name: mapping -description: -type: -unit: +description: | + Corresponding integer label in the standard BIDS label lookup. +type: integer diff --git a/src/schema/columns/material.yaml b/src/schema/columns/material.yaml index 53af82855e..5340150890 100644 --- a/src/schema/columns/material.yaml +++ b/src/schema/columns/material.yaml @@ -1,5 +1,5 @@ --- name: material -description: -type: -unit: +description: | + Material of the electrode (for example, `"Tin"`, `"Ag/AgCl"`, `"Gold"`). +type: string diff --git a/src/schema/columns/metabolite_parent_fraction.yaml b/src/schema/columns/metabolite_parent_fraction.yaml index d1563be6cd..749fbcd3ce 100644 --- a/src/schema/columns/metabolite_parent_fraction.yaml +++ b/src/schema/columns/metabolite_parent_fraction.yaml @@ -1,5 +1,7 @@ --- name: metabolite_parent_fraction -description: -type: -unit: +description: | + Parent fraction of the radiotracer (0-1). +type: number +minimum: 0 +maximum: 1 diff --git a/src/schema/columns/metabolite_polar_fraction.yaml b/src/schema/columns/metabolite_polar_fraction.yaml index edbbdb0906..b0a7b5ca3a 100644 --- a/src/schema/columns/metabolite_polar_fraction.yaml +++ b/src/schema/columns/metabolite_polar_fraction.yaml @@ -1,5 +1,7 @@ --- name: metabolite_polar_fraction -description: -type: -unit: +description: | + Polar metabolite fraction of the radiotracer (0-1). +type: number +minimum: 0 +maximum: 1 diff --git a/src/schema/columns/name.yaml b/src/schema/columns/name.yaml deleted file mode 100644 index ec37f3c56c..0000000000 --- a/src/schema/columns/name.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- -name: name -description: -type: -unit: diff --git a/src/schema/columns/name_channels.yaml b/src/schema/columns/name_channels.yaml new file mode 100644 index 0000000000..6374b7e50f --- /dev/null +++ b/src/schema/columns/name_channels.yaml @@ -0,0 +1,9 @@ +--- +# This definition of the 'name' column is specific to channels.tsv files. +name: name +description: | + Label of the channel. + The label must correspond to `_electrodes.tsv` name and all ieeg type channels are + required to have a position. + The reference channel name MAY be provided in the reference column. +type: string diff --git a/src/schema/columns/name_electrodes.yaml b/src/schema/columns/name_electrodes.yaml new file mode 100644 index 0000000000..21e1bd38c8 --- /dev/null +++ b/src/schema/columns/name_electrodes.yaml @@ -0,0 +1,6 @@ +--- +# This definition of the 'name' column is specific to electrodes.tsv files. +name: name +description: | + Name of the electrode contact point. +type: string diff --git a/src/schema/columns/name_segmentations.yaml b/src/schema/columns/name_segmentations.yaml new file mode 100644 index 0000000000..d0a3ea05e0 --- /dev/null +++ b/src/schema/columns/name_segmentations.yaml @@ -0,0 +1,6 @@ +--- +# This definition of the 'name' column is specific to segmentation files. +name: name +description: | + The unique label name. +type: string diff --git a/src/schema/columns/notch.yaml b/src/schema/columns/notch.yaml index edae7e29ab..35825ea052 100644 --- a/src/schema/columns/notch.yaml +++ b/src/schema/columns/notch.yaml @@ -1,5 +1,11 @@ --- name: notch -description: -type: -unit: +description: | + Frequencies used for the notch filter applied to the channel, in Hz. + If no notch filter applied, use n/a. +anyOf: + - type: number + unit: Hz + - type: string + enum: + - n/a From 54458cd3720888d6a5330a75ac4c1f610126044b Mon Sep 17 00:00:00 2001 From: Taylor Salo Date: Tue, 31 Aug 2021 14:14:20 -0400 Subject: [PATCH 07/39] Add remaining definitions. --- src/schema/columns/plasma_radioactivity.yaml | 8 ++--- src/schema/columns/reference.yaml | 7 ++-- src/schema/columns/respiratory.yaml | 6 ++-- src/schema/columns/size.yaml | 7 ++-- src/schema/columns/software_filters.yaml | 13 +++++-- src/schema/columns/status.yaml | 11 ++++-- src/schema/columns/status_description.yaml | 7 ++-- src/schema/columns/time.yaml | 8 +++-- src/schema/columns/trigger.yaml | 6 ++-- src/schema/columns/type.yaml | 36 +++++++++++++++++-- src/schema/columns/units.yaml | 8 +++-- .../columns/whole_blood_radioactivity.yaml | 7 ++-- src/schema/columns/x.yaml | 6 ++-- src/schema/columns/y.yaml | 7 ++-- src/schema/columns/z.yaml | 6 ++-- 15 files changed, 97 insertions(+), 46 deletions(-) diff --git a/src/schema/columns/plasma_radioactivity.yaml b/src/schema/columns/plasma_radioactivity.yaml index e77ce6de19..6801e1d5e4 100644 --- a/src/schema/columns/plasma_radioactivity.yaml +++ b/src/schema/columns/plasma_radioactivity.yaml @@ -1,5 +1,5 @@ --- -name: plasma_reactivity -description: -type: -unit: +name: plasma_radioactivity +description: | + Radioactivity in plasma, in unit of plasma radioactivity (for example, `"kBq/mL"`). +type: number diff --git a/src/schema/columns/reference.yaml b/src/schema/columns/reference.yaml index 031442723a..0e703be455 100644 --- a/src/schema/columns/reference.yaml +++ b/src/schema/columns/reference.yaml @@ -1,5 +1,6 @@ --- name: reference -description: -type: -unit: +description: | + Name of the reference electrode(s) + (not needed when it is common to all channels, in that case it can be specified in `*_eeg.json` as `EEGReference`). +type: string diff --git a/src/schema/columns/respiratory.yaml b/src/schema/columns/respiratory.yaml index e6deb2a487..d4d8c701c0 100644 --- a/src/schema/columns/respiratory.yaml +++ b/src/schema/columns/respiratory.yaml @@ -1,5 +1,5 @@ --- name: respiratory -description: -type: -unit: +description: | + continuous breathing measurement +type: number diff --git a/src/schema/columns/size.yaml b/src/schema/columns/size.yaml index 5afa5c5291..925e46c2d9 100644 --- a/src/schema/columns/size.yaml +++ b/src/schema/columns/size.yaml @@ -1,5 +1,6 @@ --- name: size -description: -type: -unit: +description: | + Surface area of the electrode, units MUST be in `mm^2`. +type: number +unit: mm2 diff --git a/src/schema/columns/software_filters.yaml b/src/schema/columns/software_filters.yaml index b1f2ea4457..fe72fa1780 100644 --- a/src/schema/columns/software_filters.yaml +++ b/src/schema/columns/software_filters.yaml @@ -1,5 +1,12 @@ --- name: software_filters -description: -type: -unit: +description: | + List of temporal and/or spatial software filters applied + (for example, "SSS", `"SpatialCompensation"`). + Note that parameters should be defined in the general MEG sidecar .json file. + Indicate `n/a` in the absence of software filters applied. +anyOf: + - type: string + - type: string + enum: + - n/a diff --git a/src/schema/columns/status.yaml b/src/schema/columns/status.yaml index ea06b1001d..9f0bb2b255 100644 --- a/src/schema/columns/status.yaml +++ b/src/schema/columns/status.yaml @@ -1,5 +1,10 @@ --- name: status -description: -type: -unit: +description: | + Data quality observed on the channel `(good/bad)`. + A channel is considered `bad` if its data quality is compromised by excessive noise. + Description of noise type SHOULD be provided in `[status_description]`. +type: string +enum: + - good + - bad diff --git a/src/schema/columns/status_description.yaml b/src/schema/columns/status_description.yaml index 5e5a144ab2..8bcff74e45 100644 --- a/src/schema/columns/status_description.yaml +++ b/src/schema/columns/status_description.yaml @@ -1,5 +1,6 @@ --- name: status_description -description: -type: -unit: +description: | + Freeform text description of noise or artifact affecting data quality on the channel. + It is meant to explain why the channel was declared bad in `[status]`. +type: string diff --git a/src/schema/columns/time.yaml b/src/schema/columns/time.yaml index 3cd0bfa553..2594926803 100644 --- a/src/schema/columns/time.yaml +++ b/src/schema/columns/time.yaml @@ -1,5 +1,7 @@ --- name: time -description: -type: -unit: +description: | + Time in relation to `TimeZero` defined by the `*_pet.json`. + For example, 5. +type: number +unit: s diff --git a/src/schema/columns/trigger.yaml b/src/schema/columns/trigger.yaml index a578be76d1..dd7153fc65 100644 --- a/src/schema/columns/trigger.yaml +++ b/src/schema/columns/trigger.yaml @@ -1,5 +1,5 @@ --- name: trigger -description: -type: -unit: +description: | + continuous measurement of the scanner trigger signal +type: number diff --git a/src/schema/columns/type.yaml b/src/schema/columns/type.yaml index 9406ad6a6d..74ca9e503f 100644 --- a/src/schema/columns/type.yaml +++ b/src/schema/columns/type.yaml @@ -1,5 +1,35 @@ --- name: type -description: -type: -unit: +description: | + Type of channel; MUST use the channel types listed below. + Note that the type MUST be in upper-case. +type: string +enum: + - MEGMAG + - MEGGRADAXIAL + - MEGGRADPLANAR + - MEGREFMAG + - MEGREFGRADAXIAL + - MEGREFGRADPLANAR + - MEGOTHER + - EEG + - ECOG + - SEEG + - DBS + - VEOG + - HEOG + - EOG + - ECG + - EMG + - TRIG + - AUDIO + - PD + - EYEGAZE + - PUPIL + - MISC + - SYSCLOCK + - ADC + - DAC + - HLU + - FITERR + - OTHER diff --git a/src/schema/columns/units.yaml b/src/schema/columns/units.yaml index 67a7be763f..546f209899 100644 --- a/src/schema/columns/units.yaml +++ b/src/schema/columns/units.yaml @@ -1,5 +1,7 @@ --- name: units -description: -type: -unit: +description: | + Physical unit of the value represented in this channel, + for example, `V` for Volt, or `fT/cm` for femto Tesla per centimeter + (see [Units](/02-common-principles.html#units)). +type: string diff --git a/src/schema/columns/whole_blood_radioactivity.yaml b/src/schema/columns/whole_blood_radioactivity.yaml index 3ecd84ba32..52613ba65b 100644 --- a/src/schema/columns/whole_blood_radioactivity.yaml +++ b/src/schema/columns/whole_blood_radioactivity.yaml @@ -1,5 +1,6 @@ --- name: whole_blood_radioactivity -description: -type: -unit: +description: | + Radioactivity in whole blood samples, + in unit of radioactivity measurements in whole blood samples (for example, `"kBq/mL"`). +type: number diff --git a/src/schema/columns/x.yaml b/src/schema/columns/x.yaml index d446b1a5cb..84e906be6f 100644 --- a/src/schema/columns/x.yaml +++ b/src/schema/columns/x.yaml @@ -1,5 +1,5 @@ --- name: x -description: -type: -unit: +description: | + Recorded position along the x-axis. +type: number diff --git a/src/schema/columns/y.yaml b/src/schema/columns/y.yaml index c72d640268..d7606e503e 100644 --- a/src/schema/columns/y.yaml +++ b/src/schema/columns/y.yaml @@ -1,5 +1,6 @@ --- name: y -description: -type: -unit: +description: | + Recorded position along the y-axis. +type: number + diff --git a/src/schema/columns/z.yaml b/src/schema/columns/z.yaml index d3dc5abce7..736bb5c95b 100644 --- a/src/schema/columns/z.yaml +++ b/src/schema/columns/z.yaml @@ -1,5 +1,5 @@ --- name: z -description: -type: -unit: +description: | + Recorded position along the z-axis. +type: number From b5754e7418751aceca7f4b300f8a529629b1c851 Mon Sep 17 00:00:00 2001 From: Taylor Salo Date: Tue, 31 Aug 2021 14:49:10 -0400 Subject: [PATCH 08/39] Add macro to render column tables. --- .../02-magnetoencephalography.md | 21 ++++++ .../03-electroencephalography.md | 38 ++++++++++ .../04-intracranial-electroencephalography.md | 49 ++++++++++++ .../05-task-events.md | 18 +++++ ...logical-and-other-continuous-recordings.md | 8 ++ .../09-positron-emission-tomography.md | 11 +++ src/05-derivatives/03-imaging.md | 10 +++ tools/mkdocs_macros_bids/macros.py | 27 ++++++- tools/mkdocs_macros_bids/main.py | 1 + tools/schemacode/schema.py | 75 ++++++++++++++++++- 10 files changed, 256 insertions(+), 2 deletions(-) diff --git a/src/04-modality-specific-files/02-magnetoencephalography.md b/src/04-modality-specific-files/02-magnetoencephalography.md index 46a0841597..b6102b3def 100644 --- a/src/04-modality-specific-files/02-magnetoencephalography.md +++ b/src/04-modality-specific-files/02-magnetoencephalography.md @@ -227,6 +227,14 @@ MUST be present **in this specific order**: | type | REQUIRED | Type of channel; MUST use the channel types listed below. Note that the type MUST be in upper-case. | | units | REQUIRED | Physical unit of the value represented in this channel, for example, `V` for Volt, or `fT/cm` for femto Tesla per centimeter (see [Units](../02-common-principles.md#units)). | +{{ MACROS___make_columns_table( + { + "name_channels": "REQUIRED", + "type": "REQUIRED", + "units": "REQUIRED", + } +) }} + SHOULD be present: | **Column name** | **Requirement level** | **Description** | @@ -240,6 +248,19 @@ SHOULD be present: | status | OPTIONAL | Data quality observed on the channel `(good/bad)`. A channel is considered `bad` if its data quality is compromised by excessive noise. Description of noise type SHOULD be provided in `[status_description]`. | | status_description | OPTIONAL | Freeform text description of noise or artifact affecting data quality on the channel. It is meant to explain why the channel was declared bad in `[status]`. | +{{ MACROS___make_columns_table( + { + "description": "OPTIONAL", + "sampling_frequency": "OPTIONAL", + "low_cutoff": "OPTIONAL", + "high_cutoff": "OPTIONAL", + "notch": "OPTIONAL", + "software_filters": "OPTIONAL", + "status": "OPTIONAL", + "status_description": "OPTIONAL", + } +) }} + Example: ```Text diff --git a/src/04-modality-specific-files/03-electroencephalography.md b/src/04-modality-specific-files/03-electroencephalography.md index 1222db4453..c534f8983a 100644 --- a/src/04-modality-specific-files/03-electroencephalography.md +++ b/src/04-modality-specific-files/03-electroencephalography.md @@ -222,6 +222,14 @@ MUST be present **in this specific order**: | type | REQUIRED | Type of channel; MUST use the channel types listed below. Note that the type MUST be in upper-case. | | units | REQUIRED | Physical unit of the value represented in this channel, for example, `V` for Volt, or `fT/cm` for femto Tesla per centimeter (see [Units](../02-common-principles.md#units)). | +{{ MACROS___make_columns_table( + { + "name_channels": "REQUIRED", + "type": "REQUIRED", + "units": "REQUIRED", + } +) }} + SHOULD be present: | **Column name** | **Requirement level** | **Description** | @@ -235,6 +243,19 @@ SHOULD be present: | status | OPTIONAL | Data quality observed on the channel (`good`, `bad`). A channel is considered `bad` if its data quality is compromised by excessive noise. Description of noise type SHOULD be provided in `status_description`. | | status_description | OPTIONAL | Free-form text description of noise or artifact affecting data quality on the channel. It is meant to explain why the channel was declared bad in `status`. | +{{ MACROS___make_columns_table( + { + "description": "OPTIONAL", + "sampling_frequency": "OPTIONAL", + "reference": "OPTIONAL", + "low_cutoff": "OPTIONAL", + "high_cutoff": "OPTIONAL", + "notch": "OPTIONAL", + "status": "OPTIONAL", + "status_description": "OPTIONAL", + } +) }} + Restricted keyword list for field `type` in alphabetic order (shared with the MEG and iEEG modality; however, only the types that are common in EEG data are listed here). Note that upper-case is REQUIRED: @@ -295,6 +316,15 @@ MUST be present **in this specific order**: | y | REQUIRED | Recorded position along the y-axis. | | z | REQUIRED | Recorded position along the z-axis. | +{{ MACROS___make_columns_table( + { + "name_electrodes": "REQUIRED", + "x": "REQUIRED", + "y": "REQUIRED", + "z": "REQUIRED", + } +) }} + SHOULD be present: | **Column name** | **Requirement level** | **Description** | @@ -303,6 +333,14 @@ SHOULD be present: | material | RECOMMENDED | Material of the electrode (for example, Tin, Ag/AgCl, Gold). | | impedance | RECOMMENDED | Impedance of the electrode, units MUST be in `kOhm`. | +{{ MACROS___make_columns_table( + { + "type": "RECOMMENDED", + "material": "RECOMMENDED", + "impedance": "RECOMMENDED", + } +) }} + ### Example `electrodes.tsv` See also the corresponding [`electrodes.tsv` example](#example-channelstsv). diff --git a/src/04-modality-specific-files/04-intracranial-electroencephalography.md b/src/04-modality-specific-files/04-intracranial-electroencephalography.md index e2184b79d5..be42816905 100644 --- a/src/04-modality-specific-files/04-intracranial-electroencephalography.md +++ b/src/04-modality-specific-files/04-intracranial-electroencephalography.md @@ -234,6 +234,16 @@ MUST be present **in this specific order**: | low_cutoff | REQUIRED | Frequencies used for the low pass filter applied to the channel in Hz. If no low pass filter was applied, use `n/a`. Note that anti-alias is a low pass filter, specify its frequencies here if applicable. | | high_cutoff | REQUIRED | Frequencies used for the high pass filter applied to the channel in Hz. If no high pass filter applied, use `n/a`. | +{{ MACROS___make_columns_table( + { + "name_channels": "REQUIRED", + "type": "REQUIRED", + "units": "REQUIRED", + "low_cutoff": "REQUIRED", + "high_cutoff": "REQUIRED", + } +) }} + SHOULD be present: | **Column name** | **Requirement level** | **Description** | @@ -246,6 +256,18 @@ SHOULD be present: | status | OPTIONAL | Data quality observed on the channel (good/bad). A channel is considered bad if its data quality is compromised by excessive noise. Description of noise type SHOULD be provided in `[status_description]`. | | status_description | OPTIONAL | Freeform text description of noise or artifact affecting data quality on the channel. It is meant to explain why the channel was declared bad in `[status]`. | +{{ MACROS___make_columns_table( + { + "reference": "OPTIONAL", + "group": "OPTIONAL", + "sampling_frequency": "OPTIONAL", + "description": "OPTIONAL", + "notch": "OPTIONAL", + "status": "OPTIONAL", + "status_description": "OPTIONAL", + } +) }} + **Example** `sub-01_channels.tsv`: ```Text @@ -343,6 +365,16 @@ MUST be present **in this specific order**: | z | REQUIRED | Z position. If electrodes are in 2D space this should be a column of `n/a` values. | | size | REQUIRED | Surface area of the electrode, units MUST be in `mm^2`. | +{{ MACROS___make_columns_table( + { + "name_electrodes": "REQUIRED", + "x": "REQUIRED", + "y": "REQUIRED", + "z": "REQUIRED", + "size": "REQUIRED", + } +) }} + SHOULD be present: | **Column name** | **Requirement level** | **Description** | @@ -352,6 +384,15 @@ SHOULD be present: | group | RECOMMENDED | The group that the electrode is a part of. Note that any group specified here should match a group specified in `_channels.tsv`. | | hemisphere | RECOMMENDED | The hemisphere in which the electrode is placed, one of `['L' or 'R']` (use capital). | +{{ MACROS___make_columns_table( + { + "material": "RECOMMENDED", + "manufacturer": "RECOMMENDED", + "group": "RECOMMENDED", + "hemisphere": "RECOMMENDED", + } +) }} + MAY be present: | **Column name** | **Requirement level** | **Description** | @@ -360,6 +401,14 @@ MAY be present: | impedance | OPTIONAL | Impedance of the electrode, units MUST be in `kOhm`. | | dimension | OPTIONAL | Size of the group (grid/strip/probe) that this electrode belongs to. Must be of form `[AxB]` with the smallest dimension first (for example, `[1x8]`). | +{{ MACROS___make_columns_table( + { + "type": "OPTIONAL", + "impedance": "OPTIONAL", + "dimension": "OPTIONAL", + } +) }} + Example: ```Text diff --git a/src/04-modality-specific-files/05-task-events.md b/src/04-modality-specific-files/05-task-events.md index c9ab3dc53a..95f5f42cd6 100644 --- a/src/04-modality-specific-files/05-task-events.md +++ b/src/04-modality-specific-files/05-task-events.md @@ -44,6 +44,18 @@ and OPTIONAL columns: | value | OPTIONAL | [string][] or [number][] | Marker value associated with the event (for example, the value of a TTL trigger that was recorded at the onset of the event). | | HED | OPTIONAL | [string][] | Hierarchical Event Descriptor (HED) tag. See [Appendix III](../99-appendices/03-hed.md) for details. | +{{ MACROS___make_columns_table( + { + "onset": "REQUIRED", + "duration": "REQUIRED", + "sample": "OPTIONAL", + "trial_type": "OPTIONAL", + "response_time": "OPTIONAL", + "value": "OPTIONAL", + "HED": "OPTIONAL", + } +) }} + 5 Note for MRI data: If any acquired scans have been discarded before forming the imaging data file, ensure that an `onset` of 0 corresponds to the time the first image was stored. @@ -141,6 +153,12 @@ but they should be stored in the `/stimuli` folder. | --------------- | --------------------- | ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | stim_file | OPTIONAL | [string][] | Represents the location of the stimulus file (such as an image, video, or audio file) presented at the given onset time. The values under the `stim_file` column correspond to a path relative to the folder `/stimuli`. For example `images/cat03.jpg` will be translated to `/stimuli/images/cat03.jpg`. | +{{ MACROS___make_columns_table( + { + "stim_file": "OPTIONAL", + } +) }} + ### Stimuli databases References to existing databases can also be encoded using additional columns. diff --git a/src/04-modality-specific-files/06-physiological-and-other-continuous-recordings.md b/src/04-modality-specific-files/06-physiological-and-other-continuous-recordings.md index af4246d6c0..4214f01260 100644 --- a/src/04-modality-specific-files/06-physiological-and-other-continuous-recordings.md +++ b/src/04-modality-specific-files/06-physiological-and-other-continuous-recordings.md @@ -113,6 +113,14 @@ following naming conventions SHOULD be used for the column names: | respiratory | continuous breathing measurement | | trigger | continuous measurement of the scanner trigger signal | +{{ MACROS___make_columns_table( + { + "cardiac": "OPTIONAL", + "respiratory": "OPTIONAL", + "trigger": "OPTIONAL", + } +) }} + For any other data to be specified in columns, the column names can be chosen as deemed appropriate by the researcher. diff --git a/src/04-modality-specific-files/09-positron-emission-tomography.md b/src/04-modality-specific-files/09-positron-emission-tomography.md index c4312117ea..60f40bf7a0 100644 --- a/src/04-modality-specific-files/09-positron-emission-tomography.md +++ b/src/04-modality-specific-files/09-positron-emission-tomography.md @@ -364,6 +364,17 @@ The `time` column MUST always be the first column. | `hplc_recovery_fractions` | REQUIRED if `MetaboliteRecoveryCorrectionApplied` is `true` | HPLC recovery fractions (the fraction of activity that gets loaded onto the HPLC) | Unit of recovery fractions (for example, `"unitless"`) | | `whole_blood_radioactivity` | REQUIRED if `WholeBloodAvail` is `true` | Radioactivity in whole blood samples | Unit of radioactivity measurements in whole blood samples (for example, `"kBq/mL"`) | +{{ MACROS___make_columns_table( + { + "time": "REQUIRED", + "plasma_radioactivity": "REQUIRED if `PlasmaAvail` is `true`", + "metabolite_parent_fraction": "REQUIRED if `MetaboliteAvail` is `true`", + "metabolite_polar_fraction": "RECOMMENDED if `MetaboliteAvail` is `true`", + "hplc_recovery_fractions": "REQUIRED if `MetaboliteRecoveryCorrectionApplied` is `true`", + "whole_blood_radioactivity": "REQUIRED if `WholeBloodAvail` is `true`", + } +) }} + As with all [tabular files](../02-common-principles.md#tabular-files), additional columns MAY be defined in `_blood.json`. For clarity, it is RECOMMENDED to include the above column definitions in `_blood.json`, diff --git a/src/05-derivatives/03-imaging.md b/src/05-derivatives/03-imaging.md index 66d18bf730..f12b4e965f 100644 --- a/src/05-derivatives/03-imaging.md +++ b/src/05-derivatives/03-imaging.md @@ -448,6 +448,16 @@ These TSV lookup tables contain the following columns: | color | OPTIONAL | Hexadecimal. Label color for visualization | | mapping | OPTIONAL | Corresponding integer label in the standard BIDS label lookup | +{{ MACROS___make_columns_table( + { + "index": "REQUIRED", + "name_segmentations": "REQUIRED", + "abbreviation": "OPTIONAL", + "color": "OPTIONAL", + "mapping": "OPTIONAL", + } +) }} + An example, custom `dseg.tsv` that defines three labels: ```Text diff --git a/tools/mkdocs_macros_bids/macros.py b/tools/mkdocs_macros_bids/macros.py index 5e88954848..f0c63c1aeb 100644 --- a/tools/mkdocs_macros_bids/macros.py +++ b/tools/mkdocs_macros_bids/macros.py @@ -5,8 +5,8 @@ code_path = os.path.abspath(os.path.join(os.path.dirname(__file__), "..")) sys.path.append(code_path) -from schemacode import schema, utils from examplecode import example +from schemacode import schema, utils def make_filename_template(**kwargs): @@ -115,6 +115,31 @@ def make_metadata_table(field_info): return table +def make_columns_table(column_info): + """Generate a markdown table of TSV column information. + + Parameters + ---------- + column_info : dict + A list of the column names. + Column names correspond to filenames in the "columns" folder of the + schema. + Until requirement levels can be codified in the schema, + this argument will be a dictionary, with the column names as keys and + the requirement levels as values. + + Returns + ------- + table : str + A Markdown-format table containing the corresponding table for + the requested columns. + """ + schemapath = utils.get_schema_path() + schema_obj = schema.load_schema(schemapath) + table = schema.make_columns_table(schema_obj, column_info) + return table + + def make_filetree_example(filetree_info, use_pipe=True): """Generate a filetree snippet from example content. diff --git a/tools/mkdocs_macros_bids/main.py b/tools/mkdocs_macros_bids/main.py index 05ec392201..8db94a0411 100644 --- a/tools/mkdocs_macros_bids/main.py +++ b/tools/mkdocs_macros_bids/main.py @@ -37,4 +37,5 @@ def define_env(env): ) env.macro(macros.make_suffix_table, "MACROS___make_suffix_table") env.macro(macros.make_metadata_table, "MACROS___make_metadata_table") + env.macro(macros.make_columns_table, "MACROS___make_columns_table") env.macro(macros.make_filetree_example, "MACROS___make_filetree_example") diff --git a/tools/schemacode/schema.py b/tools/schemacode/schema.py index 472efc0df3..d47475e2a0 100755 --- a/tools/schemacode/schema.py +++ b/tools/schemacode/schema.py @@ -4,8 +4,8 @@ import os from copy import deepcopy from pathlib import Path -from warnings import warn from pprint import pprint +from warnings import warn import pandas as pd import yaml @@ -374,11 +374,13 @@ def make_entity_table(schema, tablefmt="github", **kwargs): def make_suffix_table(schema, suffixes, tablefmt="github"): """Produce suffix table (markdown) based on requested suffixes. + Parameters ---------- schema : dict suffixes : list of str tablefmt : str + Returns ------- table_str : str @@ -544,3 +546,74 @@ def make_metadata_table(schema, field_info, tablefmt="github"): # Print it as markdown table_str = tabulate(df, headers="keys", tablefmt=tablefmt) return table_str + + +def make_columns_table(schema, column_info, tablefmt="github"): + """Produce columns table (markdown) based on requested fields. + + Parameters + ---------- + schema : dict + The BIDS schema. + column_info : dict of strings or tuples + A dictionary mapping column names to requirement levels in the + rendered columns table. + The dictionary values may be strings, in which case the string + is the requirement level information, or two-item tuples of strings, + in which case the first string is the requirement level information + and the second string is additional table-specific information + about the column that will be appended to the column's base + definition from the schema. + tablefmt : string, optional + The target table format. The default is "github" (GitHub format). + + Returns + ------- + table_str : str + The tabulated table as a Markdown string. + """ + fields = list(column_info.keys()) + # The filter function doesn't work here. + column_schema = schema["columns"] + + retained_fields = [f for f in fields if f in column_schema.keys()] + dropped_fields = [f for f in fields if f not in column_schema.keys()] + if dropped_fields: + print("Warning: Missing fields: {}".format(", ".join(dropped_fields))) + + # Use the "name" field in the table, to allow for filenames to not match + # "names". + df = pd.DataFrame( + index=[column_schema[f]["name"] for f in retained_fields], + columns=["**Requirement Level**", "**Data type**", "**Description**"], + ) + df.index.name = "**Column name**" + for field in retained_fields: + field_name = column_schema[field]["name"] + requirement_info = column_info[field] + description_addendum = "" + if isinstance(requirement_info, tuple): + requirement_info, description_addendum = requirement_info + + requirement_info = requirement_info.replace( + "DEPRECATED", + "[DEPRECATED](/02-common-principles.html#definitions)", + ) + + type_string = _resolve_metadata_type(column_schema[field]) + + description = ( + column_schema[field]["description"] + " " + description_addendum + ) + # A backslash before a newline means continue a string + description = description.replace("\\\n", "") + # Two newlines should be respected + description = description.replace("\n\n", "
") + # Otherwise a newline corresponds to a space + description = description.replace("\n", " ") + + df.loc[field_name] = [requirement_info, type_string, description] + + # Print it as markdown + table_str = tabulate(df, headers="keys", tablefmt=tablefmt) + return table_str From 42d6e0845e0c2b656dc02b7bcba2c820a402b130 Mon Sep 17 00:00:00 2001 From: Taylor Salo Date: Tue, 31 Aug 2021 14:50:23 -0400 Subject: [PATCH 09/39] Fix YAML file. --- src/schema/columns/y.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/src/schema/columns/y.yaml b/src/schema/columns/y.yaml index d7606e503e..fc768781a0 100644 --- a/src/schema/columns/y.yaml +++ b/src/schema/columns/y.yaml @@ -3,4 +3,3 @@ name: y description: | Recorded position along the y-axis. type: number - From 034c6a85fcf8eac246951c2ade29cebccbe57775 Mon Sep 17 00:00:00 2001 From: Taylor Salo Date: Mon, 20 Sep 2021 14:10:37 -0400 Subject: [PATCH 10/39] Consolidate suffixes file. --- .yamllint.yml | 3 + src/schema/columns.yaml | 355 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 358 insertions(+) create mode 100644 src/schema/columns.yaml diff --git a/.yamllint.yml b/.yamllint.yml index baed83012b..c18c17fe43 100644 --- a/.yamllint.yml +++ b/.yamllint.yml @@ -3,3 +3,6 @@ extends: default rules: line-length: max: 120 + indentation: + # See https://github.com/yaml/pyyaml/issues/545 for why + indent-sequences: false diff --git a/src/schema/columns.yaml b/src/schema/columns.yaml new file mode 100644 index 0000000000..72de8968e5 --- /dev/null +++ b/src/schema/columns.yaml @@ -0,0 +1,355 @@ +--- +HED: + name: HED + description: | + Hierarchical Event Descriptor (HED) Tag. + See [Appendix III](/99-appendices/03-hed.html) for details. + type: string +abbreviation: + name: abbreviation + description: | + The unique label abbreviation + type: string +cardiac: + name: cardiac + description: | + continuous pulse measurement + type: number +color: + name: color + description: | + Hexadecimal. Label color for visualization. + type: string + unit: hexadecimal +description: + name: description + description: | + Brief free-text description of the channel, or other information of interest. + type: string +dimension: + name: dimension + description: | + Size of the group (grid/strip/probe) that this electrode belongs to. + Must be of form `[AxB]` with the smallest dimension first (for example, `[1x8]`). + type: string +duration: + name: duration + description: | + Duration of the event (measured from onset) in seconds. + Must always be either zero or positive. + A "duration" value of zero implies that the delta function or event is so + short as to be effectively modeled as an impulse. + type: number + unit: s + minimum: 0 +group: + name: group + description: | + Which group of channels (grid/strip/seeg/depth) this channel belongs to. + This is relevant because one group has one cable-bundle and noise can be shared. + This can be a name or number. + Note that any groups specified in `_electrodes.tsv` must match those present here. + anyOf: + - type: string + - type: number +hemisphere: + name: hemisphere + description: | + The hemisphere in which the electrode is placed, one of `['L' or 'R']` (use capital). + type: string + enum: + - L + - R +high_cutoff: + name: high_cutoff + description: | + Frequencies used for the low-pass filter applied to the channel in Hz. + If no low-pass filter applied, use `n/a`. + Note that hardware anti-aliasing in A/D conversion of all MEG/EEG electronics + applies a low-pass filter; specify its frequency here if applicable. + anyOf: + - type: number + unit: Hz + minimum: 0 + - type: string + enum: + - n/a +hplc_recovery_fractions: + name: hplc_recovery_fractions + description: | + HPLC recovery fractions (the fraction of activity that gets loaded onto the HPLC). + type: number + unit: arbitrary +impedance: + name: impedance + description: | + Impedance of the electrode, units MUST be in `kOhm`. + type: number + unit: kOhm +index: + name: index + description: | + The label integer index. + type: integer +low_cutoff: + name: low_cutoff + description: | + Frequencies used for the high-pass filter applied to the channel in Hz. + If no high-pass filter applied, use `n/a`. + anyOf: + - type: number + unit: Hz + - type: string + enum: + - n/a +manufacturer: + name: manufacturer + description: | + The manufacturer for each electrode. + Can be used if electrodes were manufactured by more than one company. + type: string +mapping: + name: mapping + description: | + Corresponding integer label in the standard BIDS label lookup. + type: integer +material: + name: material + description: | + Material of the electrode (for example, `"Tin"`, `"Ag/AgCl"`, `"Gold"`). + type: string +metabolite_parent_fraction: + name: metabolite_parent_fraction + description: | + Parent fraction of the radiotracer (0-1). + type: number + minimum: 0 + maximum: 1 +metabolite_polar_fraction: + name: metabolite_polar_fraction + description: | + Polar metabolite fraction of the radiotracer (0-1). + type: number + minimum: 0 + maximum: 1 +name_channels: + name: name + description: | + Label of the channel. + The label must correspond to `_electrodes.tsv` name and all ieeg type channels are + required to have a position. + The reference channel name MAY be provided in the reference column. + type: string +name_electrodes: + name: name + description: | + Name of the electrode contact point. + type: string +name_segmentations: + name: name + description: | + The unique label name. + type: string +notch: + name: notch + description: | + Frequencies used for the notch filter applied to the channel, in Hz. + If no notch filter applied, use n/a. + anyOf: + - type: number + unit: Hz + - type: string + enum: + - n/a +onset: + name: onset + description: | + Onset (in seconds) of the event measured from the beginning of the acquisition + of the first volume in the corresponding task imaging data file. + If any acquired scans have been discarded before forming the imaging data file, + ensure that a time of 0 corresponds to the first image stored. + In other words negative numbers in "onset" are allowed (see below). + + For example in case there is an in scanner training phase that begins before + the scanning sequence has started events from this sequence should have + negative onset time counting down to the beginning of the acquisition of the + first volume. + type: number + unit: s +plasma_radioactivity: + name: plasma_radioactivity + description: | + Radioactivity in plasma, in unit of plasma radioactivity (for example, `"kBq/mL"`). + type: number +reference: + name: reference + description: | + Name of the reference electrode(s) + (not needed when it is common to all channels, in that case it can be specified in `*_eeg.json` as `EEGReference`). + type: string +respiratory: + name: respiratory + description: | + continuous breathing measurement + type: number +response_time: + name: response_time + description: | + Response time measured in seconds. + A negative response time can be used to represent preemptive responses and + "n/a" denotes a missed response. + anyOf: + - type: number + unit: s + - type: string + enum: + - n/a +sample: + name: sample + description: | + Onset of the event according to the sampling scheme of the recorded modality + (that is, referring to the raw data file that the `events.tsv` file accompanies). + type: integer +sampling_frequency: + name: sampling_frequency + description: | + Sampling rate of the channel in Hz. + type: number + unit: Hz +size: + name: size + description: | + Surface area of the electrode, units MUST be in `mm^2`. + type: number + unit: mm2 +software_filters: + name: software_filters + description: | + List of temporal and/or spatial software filters applied + (for example, "SSS", `"SpatialCompensation"`). + Note that parameters should be defined in the general MEG sidecar .json file. + Indicate `n/a` in the absence of software filters applied. + anyOf: + - type: string + - type: string + enum: + - n/a +status: + name: status + description: | + Data quality observed on the channel `(good/bad)`. + A channel is considered `bad` if its data quality is compromised by excessive noise. + Description of noise type SHOULD be provided in `[status_description]`. + type: string + enum: + - good + - bad +status_description: + name: status_description + description: | + Freeform text description of noise or artifact affecting data quality on the channel. + It is meant to explain why the channel was declared bad in `[status]`. + type: string +stim_file: + name: stim_file + description: | + Represents the location of the stimulus file (such as an image, video, or + audio file) presented at the given onset time. + There are no restrictions on the file formats of the stimuli files, + but they should be stored in the /stimuli folder + (under the root folder of the dataset; with optional subfolders). + The values under the stim_file column correspond to a path relative to + "/stimuli". + For example "images/cat03.jpg" will be translated to "/stimuli/images/cat03.jpg". + type: string + format: stimuli_relative +time: + name: time + description: | + Time in relation to `TimeZero` defined by the `*_pet.json`. + For example, 5. + type: number + unit: s +trial_type: + name: trial_type + description: | + Primary categorisation of each trial to identify them as instances of the + experimental conditions. + For example: for a response inhibition task, it could take on values "go" and + "no-go" to refer to response initiation and response inhibition experimental + conditions. + type: string +trigger: + name: trigger + description: | + continuous measurement of the scanner trigger signal + type: number +type: + name: type + description: | + Type of channel; MUST use the channel types listed below. + Note that the type MUST be in upper-case. + type: string + enum: + - MEGMAG + - MEGGRADAXIAL + - MEGGRADPLANAR + - MEGREFMAG + - MEGREFGRADAXIAL + - MEGREFGRADPLANAR + - MEGOTHER + - EEG + - ECOG + - SEEG + - DBS + - VEOG + - HEOG + - EOG + - ECG + - EMG + - TRIG + - AUDIO + - PD + - EYEGAZE + - PUPIL + - MISC + - SYSCLOCK + - ADC + - DAC + - HLU + - FITERR + - OTHER +units: + name: units + description: | + Physical unit of the value represented in this channel, + for example, `V` for Volt, or `fT/cm` for femto Tesla per centimeter + (see [Units](/02-common-principles.html#units)). + type: string +value: + name: value + description: | + Marker value associated with the event (for example, the value of a TTL + trigger that was recorded at the onset of the event). + type: number +whole_blood_radioactivity: + name: whole_blood_radioactivity + description: | + Radioactivity in whole blood samples, + in unit of radioactivity measurements in whole blood samples (for example, `"kBq/mL"`). + type: number +x: + name: x + description: | + Recorded position along the x-axis. + type: number +y: + name: y + description: | + Recorded position along the y-axis. + type: number +z: + name: z + description: | + Recorded position along the z-axis. + type: number From 4988676547ff8a37b71d1e905262743395f597cd Mon Sep 17 00:00:00 2001 From: Taylor Salo Date: Tue, 5 Oct 2021 14:08:13 -0400 Subject: [PATCH 11/39] Remove old individual files. --- src/schema/columns/HED.yaml | 6 ---- src/schema/columns/_template.yaml | 5 --- src/schema/columns/abbreviation.yaml | 5 --- src/schema/columns/cardiac.yaml | 5 --- src/schema/columns/color.yaml | 6 ---- src/schema/columns/description.yaml | 5 --- src/schema/columns/dimension.yaml | 6 ---- src/schema/columns/duration.yaml | 10 ------ src/schema/columns/group.yaml | 10 ------ src/schema/columns/hemisphere.yaml | 8 ----- src/schema/columns/high_cutoff.yaml | 14 -------- .../columns/hplc_recovery_fractions.yaml | 6 ---- src/schema/columns/impedance.yaml | 6 ---- src/schema/columns/index.yaml | 5 --- src/schema/columns/low_cutoff.yaml | 11 ------ src/schema/columns/manufacturer.yaml | 6 ---- src/schema/columns/mapping.yaml | 5 --- src/schema/columns/material.yaml | 5 --- .../columns/metabolite_parent_fraction.yaml | 7 ---- .../columns/metabolite_polar_fraction.yaml | 7 ---- src/schema/columns/name_channels.yaml | 9 ----- src/schema/columns/name_electrodes.yaml | 6 ---- src/schema/columns/name_segmentations.yaml | 6 ---- src/schema/columns/notch.yaml | 11 ------ src/schema/columns/onset.yaml | 15 -------- src/schema/columns/plasma_radioactivity.yaml | 5 --- src/schema/columns/reference.yaml | 6 ---- src/schema/columns/respiratory.yaml | 5 --- src/schema/columns/response_time.yaml | 12 ------- src/schema/columns/sample.yaml | 6 ---- src/schema/columns/sampling_frequency.yaml | 6 ---- src/schema/columns/size.yaml | 6 ---- src/schema/columns/software_filters.yaml | 12 ------- src/schema/columns/status.yaml | 10 ------ src/schema/columns/status_description.yaml | 6 ---- src/schema/columns/stim_file.yaml | 13 ------- src/schema/columns/time.yaml | 7 ---- src/schema/columns/trial_type.yaml | 9 ----- src/schema/columns/trigger.yaml | 5 --- src/schema/columns/type.yaml | 35 ------------------- src/schema/columns/units.yaml | 7 ---- src/schema/columns/value.yaml | 6 ---- .../columns/whole_blood_radioactivity.yaml | 6 ---- src/schema/columns/x.yaml | 5 --- src/schema/columns/y.yaml | 5 --- src/schema/columns/z.yaml | 5 --- 46 files changed, 362 deletions(-) delete mode 100644 src/schema/columns/HED.yaml delete mode 100644 src/schema/columns/_template.yaml delete mode 100644 src/schema/columns/abbreviation.yaml delete mode 100644 src/schema/columns/cardiac.yaml delete mode 100644 src/schema/columns/color.yaml delete mode 100644 src/schema/columns/description.yaml delete mode 100644 src/schema/columns/dimension.yaml delete mode 100644 src/schema/columns/duration.yaml delete mode 100644 src/schema/columns/group.yaml delete mode 100644 src/schema/columns/hemisphere.yaml delete mode 100644 src/schema/columns/high_cutoff.yaml delete mode 100644 src/schema/columns/hplc_recovery_fractions.yaml delete mode 100644 src/schema/columns/impedance.yaml delete mode 100644 src/schema/columns/index.yaml delete mode 100644 src/schema/columns/low_cutoff.yaml delete mode 100644 src/schema/columns/manufacturer.yaml delete mode 100644 src/schema/columns/mapping.yaml delete mode 100644 src/schema/columns/material.yaml delete mode 100644 src/schema/columns/metabolite_parent_fraction.yaml delete mode 100644 src/schema/columns/metabolite_polar_fraction.yaml delete mode 100644 src/schema/columns/name_channels.yaml delete mode 100644 src/schema/columns/name_electrodes.yaml delete mode 100644 src/schema/columns/name_segmentations.yaml delete mode 100644 src/schema/columns/notch.yaml delete mode 100644 src/schema/columns/onset.yaml delete mode 100644 src/schema/columns/plasma_radioactivity.yaml delete mode 100644 src/schema/columns/reference.yaml delete mode 100644 src/schema/columns/respiratory.yaml delete mode 100644 src/schema/columns/response_time.yaml delete mode 100644 src/schema/columns/sample.yaml delete mode 100644 src/schema/columns/sampling_frequency.yaml delete mode 100644 src/schema/columns/size.yaml delete mode 100644 src/schema/columns/software_filters.yaml delete mode 100644 src/schema/columns/status.yaml delete mode 100644 src/schema/columns/status_description.yaml delete mode 100644 src/schema/columns/stim_file.yaml delete mode 100644 src/schema/columns/time.yaml delete mode 100644 src/schema/columns/trial_type.yaml delete mode 100644 src/schema/columns/trigger.yaml delete mode 100644 src/schema/columns/type.yaml delete mode 100644 src/schema/columns/units.yaml delete mode 100644 src/schema/columns/value.yaml delete mode 100644 src/schema/columns/whole_blood_radioactivity.yaml delete mode 100644 src/schema/columns/x.yaml delete mode 100644 src/schema/columns/y.yaml delete mode 100644 src/schema/columns/z.yaml diff --git a/src/schema/columns/HED.yaml b/src/schema/columns/HED.yaml deleted file mode 100644 index d4db35bf63..0000000000 --- a/src/schema/columns/HED.yaml +++ /dev/null @@ -1,6 +0,0 @@ ---- -name: HED -description: | - Hierarchical Event Descriptor (HED) Tag. - See [Appendix III](/99-appendices/03-hed.html) for details. -type: string diff --git a/src/schema/columns/_template.yaml b/src/schema/columns/_template.yaml deleted file mode 100644 index 43e890c784..0000000000 --- a/src/schema/columns/_template.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- -name: -description: -type: -unit: diff --git a/src/schema/columns/abbreviation.yaml b/src/schema/columns/abbreviation.yaml deleted file mode 100644 index 2711d58c02..0000000000 --- a/src/schema/columns/abbreviation.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- -name: abbreviation -description: | - The unique label abbreviation -type: string diff --git a/src/schema/columns/cardiac.yaml b/src/schema/columns/cardiac.yaml deleted file mode 100644 index b9dd2efce3..0000000000 --- a/src/schema/columns/cardiac.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- -name: cardiac -description: | - continuous pulse measurement -type: number diff --git a/src/schema/columns/color.yaml b/src/schema/columns/color.yaml deleted file mode 100644 index 2a27c4e836..0000000000 --- a/src/schema/columns/color.yaml +++ /dev/null @@ -1,6 +0,0 @@ ---- -name: color -description: | - Hexadecimal. Label color for visualization. -type: string -unit: hexadecimal diff --git a/src/schema/columns/description.yaml b/src/schema/columns/description.yaml deleted file mode 100644 index 89d5b28f3a..0000000000 --- a/src/schema/columns/description.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- -name: description -description: | - Brief free-text description of the channel, or other information of interest. -type: string diff --git a/src/schema/columns/dimension.yaml b/src/schema/columns/dimension.yaml deleted file mode 100644 index 3df515ddea..0000000000 --- a/src/schema/columns/dimension.yaml +++ /dev/null @@ -1,6 +0,0 @@ ---- -name: dimension -description: | - Size of the group (grid/strip/probe) that this electrode belongs to. - Must be of form `[AxB]` with the smallest dimension first (for example, `[1x8]`). -type: string diff --git a/src/schema/columns/duration.yaml b/src/schema/columns/duration.yaml deleted file mode 100644 index 881ae5e7b1..0000000000 --- a/src/schema/columns/duration.yaml +++ /dev/null @@ -1,10 +0,0 @@ ---- -name: duration -description: | - Duration of the event (measured from onset) in seconds. - Must always be either zero or positive. - A "duration" value of zero implies that the delta function or event is so - short as to be effectively modeled as an impulse. -type: number -unit: s -minimum: 0 diff --git a/src/schema/columns/group.yaml b/src/schema/columns/group.yaml deleted file mode 100644 index a194afa90c..0000000000 --- a/src/schema/columns/group.yaml +++ /dev/null @@ -1,10 +0,0 @@ ---- -name: group -description: | - Which group of channels (grid/strip/seeg/depth) this channel belongs to. - This is relevant because one group has one cable-bundle and noise can be shared. - This can be a name or number. - Note that any groups specified in `_electrodes.tsv` must match those present here. -anyOf: - - type: string - - type: number diff --git a/src/schema/columns/hemisphere.yaml b/src/schema/columns/hemisphere.yaml deleted file mode 100644 index ed39d85b71..0000000000 --- a/src/schema/columns/hemisphere.yaml +++ /dev/null @@ -1,8 +0,0 @@ ---- -name: hemisphere -description: | - The hemisphere in which the electrode is placed, one of `['L' or 'R']` (use capital). -type: string -enum: - - L - - R diff --git a/src/schema/columns/high_cutoff.yaml b/src/schema/columns/high_cutoff.yaml deleted file mode 100644 index b0f871b133..0000000000 --- a/src/schema/columns/high_cutoff.yaml +++ /dev/null @@ -1,14 +0,0 @@ ---- -name: high_cutoff -description: | - Frequencies used for the low-pass filter applied to the channel in Hz. - If no low-pass filter applied, use `n/a`. - Note that hardware anti-aliasing in A/D conversion of all MEG/EEG electronics - applies a low-pass filter; specify its frequency here if applicable. -anyOf: - - type: number - unit: Hz - minimum: 0 - - type: string - enum: - - n/a diff --git a/src/schema/columns/hplc_recovery_fractions.yaml b/src/schema/columns/hplc_recovery_fractions.yaml deleted file mode 100644 index 967599da0a..0000000000 --- a/src/schema/columns/hplc_recovery_fractions.yaml +++ /dev/null @@ -1,6 +0,0 @@ ---- -name: hplc_recovery_fractions -description: | - HPLC recovery fractions (the fraction of activity that gets loaded onto the HPLC). -type: number -unit: arbitrary diff --git a/src/schema/columns/impedance.yaml b/src/schema/columns/impedance.yaml deleted file mode 100644 index c2b41fcbd8..0000000000 --- a/src/schema/columns/impedance.yaml +++ /dev/null @@ -1,6 +0,0 @@ ---- -name: impedance -description: | - Impedance of the electrode, units MUST be in `kOhm`. -type: number -unit: kOhm diff --git a/src/schema/columns/index.yaml b/src/schema/columns/index.yaml deleted file mode 100644 index cd7b258870..0000000000 --- a/src/schema/columns/index.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- -name: index -description: | - The label integer index. -type: integer diff --git a/src/schema/columns/low_cutoff.yaml b/src/schema/columns/low_cutoff.yaml deleted file mode 100644 index c43298d3f1..0000000000 --- a/src/schema/columns/low_cutoff.yaml +++ /dev/null @@ -1,11 +0,0 @@ ---- -name: low_cutoff -description: | - Frequencies used for the high-pass filter applied to the channel in Hz. - If no high-pass filter applied, use `n/a`. -anyOf: - - type: number - unit: Hz - - type: string - enum: - - n/a diff --git a/src/schema/columns/manufacturer.yaml b/src/schema/columns/manufacturer.yaml deleted file mode 100644 index a0694e5e75..0000000000 --- a/src/schema/columns/manufacturer.yaml +++ /dev/null @@ -1,6 +0,0 @@ ---- -name: manufacturer -description: | - The manufacturer for each electrode. - Can be used if electrodes were manufactured by more than one company. -type: string diff --git a/src/schema/columns/mapping.yaml b/src/schema/columns/mapping.yaml deleted file mode 100644 index 7cc796e016..0000000000 --- a/src/schema/columns/mapping.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- -name: mapping -description: | - Corresponding integer label in the standard BIDS label lookup. -type: integer diff --git a/src/schema/columns/material.yaml b/src/schema/columns/material.yaml deleted file mode 100644 index 5340150890..0000000000 --- a/src/schema/columns/material.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- -name: material -description: | - Material of the electrode (for example, `"Tin"`, `"Ag/AgCl"`, `"Gold"`). -type: string diff --git a/src/schema/columns/metabolite_parent_fraction.yaml b/src/schema/columns/metabolite_parent_fraction.yaml deleted file mode 100644 index 749fbcd3ce..0000000000 --- a/src/schema/columns/metabolite_parent_fraction.yaml +++ /dev/null @@ -1,7 +0,0 @@ ---- -name: metabolite_parent_fraction -description: | - Parent fraction of the radiotracer (0-1). -type: number -minimum: 0 -maximum: 1 diff --git a/src/schema/columns/metabolite_polar_fraction.yaml b/src/schema/columns/metabolite_polar_fraction.yaml deleted file mode 100644 index b0a7b5ca3a..0000000000 --- a/src/schema/columns/metabolite_polar_fraction.yaml +++ /dev/null @@ -1,7 +0,0 @@ ---- -name: metabolite_polar_fraction -description: | - Polar metabolite fraction of the radiotracer (0-1). -type: number -minimum: 0 -maximum: 1 diff --git a/src/schema/columns/name_channels.yaml b/src/schema/columns/name_channels.yaml deleted file mode 100644 index 6374b7e50f..0000000000 --- a/src/schema/columns/name_channels.yaml +++ /dev/null @@ -1,9 +0,0 @@ ---- -# This definition of the 'name' column is specific to channels.tsv files. -name: name -description: | - Label of the channel. - The label must correspond to `_electrodes.tsv` name and all ieeg type channels are - required to have a position. - The reference channel name MAY be provided in the reference column. -type: string diff --git a/src/schema/columns/name_electrodes.yaml b/src/schema/columns/name_electrodes.yaml deleted file mode 100644 index 21e1bd38c8..0000000000 --- a/src/schema/columns/name_electrodes.yaml +++ /dev/null @@ -1,6 +0,0 @@ ---- -# This definition of the 'name' column is specific to electrodes.tsv files. -name: name -description: | - Name of the electrode contact point. -type: string diff --git a/src/schema/columns/name_segmentations.yaml b/src/schema/columns/name_segmentations.yaml deleted file mode 100644 index d0a3ea05e0..0000000000 --- a/src/schema/columns/name_segmentations.yaml +++ /dev/null @@ -1,6 +0,0 @@ ---- -# This definition of the 'name' column is specific to segmentation files. -name: name -description: | - The unique label name. -type: string diff --git a/src/schema/columns/notch.yaml b/src/schema/columns/notch.yaml deleted file mode 100644 index 35825ea052..0000000000 --- a/src/schema/columns/notch.yaml +++ /dev/null @@ -1,11 +0,0 @@ ---- -name: notch -description: | - Frequencies used for the notch filter applied to the channel, in Hz. - If no notch filter applied, use n/a. -anyOf: - - type: number - unit: Hz - - type: string - enum: - - n/a diff --git a/src/schema/columns/onset.yaml b/src/schema/columns/onset.yaml deleted file mode 100644 index b680b713ef..0000000000 --- a/src/schema/columns/onset.yaml +++ /dev/null @@ -1,15 +0,0 @@ ---- -name: onset -description: | - Onset (in seconds) of the event measured from the beginning of the acquisition - of the first volume in the corresponding task imaging data file. - If any acquired scans have been discarded before forming the imaging data file, - ensure that a time of 0 corresponds to the first image stored. - In other words negative numbers in "onset" are allowed (see below). - - For example in case there is an in scanner training phase that begins before - the scanning sequence has started events from this sequence should have - negative onset time counting down to the beginning of the acquisition of the - first volume. -type: number -unit: s diff --git a/src/schema/columns/plasma_radioactivity.yaml b/src/schema/columns/plasma_radioactivity.yaml deleted file mode 100644 index 6801e1d5e4..0000000000 --- a/src/schema/columns/plasma_radioactivity.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- -name: plasma_radioactivity -description: | - Radioactivity in plasma, in unit of plasma radioactivity (for example, `"kBq/mL"`). -type: number diff --git a/src/schema/columns/reference.yaml b/src/schema/columns/reference.yaml deleted file mode 100644 index 0e703be455..0000000000 --- a/src/schema/columns/reference.yaml +++ /dev/null @@ -1,6 +0,0 @@ ---- -name: reference -description: | - Name of the reference electrode(s) - (not needed when it is common to all channels, in that case it can be specified in `*_eeg.json` as `EEGReference`). -type: string diff --git a/src/schema/columns/respiratory.yaml b/src/schema/columns/respiratory.yaml deleted file mode 100644 index d4d8c701c0..0000000000 --- a/src/schema/columns/respiratory.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- -name: respiratory -description: | - continuous breathing measurement -type: number diff --git a/src/schema/columns/response_time.yaml b/src/schema/columns/response_time.yaml deleted file mode 100644 index 0b961ab58d..0000000000 --- a/src/schema/columns/response_time.yaml +++ /dev/null @@ -1,12 +0,0 @@ ---- -name: response_time -description: | - Response time measured in seconds. - A negative response time can be used to represent preemptive responses and - "n/a" denotes a missed response. -anyOf: - - type: number - unit: s - - type: string - enum: - - n/a diff --git a/src/schema/columns/sample.yaml b/src/schema/columns/sample.yaml deleted file mode 100644 index 798c9fd8a4..0000000000 --- a/src/schema/columns/sample.yaml +++ /dev/null @@ -1,6 +0,0 @@ ---- -name: sample -description: | - Onset of the event according to the sampling scheme of the recorded modality - (that is, referring to the raw data file that the `events.tsv` file accompanies). -type: integer diff --git a/src/schema/columns/sampling_frequency.yaml b/src/schema/columns/sampling_frequency.yaml deleted file mode 100644 index c001e1a0e7..0000000000 --- a/src/schema/columns/sampling_frequency.yaml +++ /dev/null @@ -1,6 +0,0 @@ ---- -name: sampling_frequency -description: | - Sampling rate of the channel in Hz. -type: number -unit: Hz diff --git a/src/schema/columns/size.yaml b/src/schema/columns/size.yaml deleted file mode 100644 index 925e46c2d9..0000000000 --- a/src/schema/columns/size.yaml +++ /dev/null @@ -1,6 +0,0 @@ ---- -name: size -description: | - Surface area of the electrode, units MUST be in `mm^2`. -type: number -unit: mm2 diff --git a/src/schema/columns/software_filters.yaml b/src/schema/columns/software_filters.yaml deleted file mode 100644 index fe72fa1780..0000000000 --- a/src/schema/columns/software_filters.yaml +++ /dev/null @@ -1,12 +0,0 @@ ---- -name: software_filters -description: | - List of temporal and/or spatial software filters applied - (for example, "SSS", `"SpatialCompensation"`). - Note that parameters should be defined in the general MEG sidecar .json file. - Indicate `n/a` in the absence of software filters applied. -anyOf: - - type: string - - type: string - enum: - - n/a diff --git a/src/schema/columns/status.yaml b/src/schema/columns/status.yaml deleted file mode 100644 index 9f0bb2b255..0000000000 --- a/src/schema/columns/status.yaml +++ /dev/null @@ -1,10 +0,0 @@ ---- -name: status -description: | - Data quality observed on the channel `(good/bad)`. - A channel is considered `bad` if its data quality is compromised by excessive noise. - Description of noise type SHOULD be provided in `[status_description]`. -type: string -enum: - - good - - bad diff --git a/src/schema/columns/status_description.yaml b/src/schema/columns/status_description.yaml deleted file mode 100644 index 8bcff74e45..0000000000 --- a/src/schema/columns/status_description.yaml +++ /dev/null @@ -1,6 +0,0 @@ ---- -name: status_description -description: | - Freeform text description of noise or artifact affecting data quality on the channel. - It is meant to explain why the channel was declared bad in `[status]`. -type: string diff --git a/src/schema/columns/stim_file.yaml b/src/schema/columns/stim_file.yaml deleted file mode 100644 index 8282b5ea28..0000000000 --- a/src/schema/columns/stim_file.yaml +++ /dev/null @@ -1,13 +0,0 @@ ---- -name: stim_file -description: | - Represents the location of the stimulus file (such as an image, video, or - audio file) presented at the given onset time. - There are no restrictions on the file formats of the stimuli files, - but they should be stored in the /stimuli folder - (under the root folder of the dataset; with optional subfolders). - The values under the stim_file column correspond to a path relative to - "/stimuli". - For example "images/cat03.jpg" will be translated to "/stimuli/images/cat03.jpg". -type: string -format: stimuli_relative diff --git a/src/schema/columns/time.yaml b/src/schema/columns/time.yaml deleted file mode 100644 index 2594926803..0000000000 --- a/src/schema/columns/time.yaml +++ /dev/null @@ -1,7 +0,0 @@ ---- -name: time -description: | - Time in relation to `TimeZero` defined by the `*_pet.json`. - For example, 5. -type: number -unit: s diff --git a/src/schema/columns/trial_type.yaml b/src/schema/columns/trial_type.yaml deleted file mode 100644 index 05e371ac2c..0000000000 --- a/src/schema/columns/trial_type.yaml +++ /dev/null @@ -1,9 +0,0 @@ ---- -name: trial_type -description: | - Primary categorisation of each trial to identify them as instances of the - experimental conditions. - For example: for a response inhibition task, it could take on values "go" and - "no-go" to refer to response initiation and response inhibition experimental - conditions. -type: string diff --git a/src/schema/columns/trigger.yaml b/src/schema/columns/trigger.yaml deleted file mode 100644 index dd7153fc65..0000000000 --- a/src/schema/columns/trigger.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- -name: trigger -description: | - continuous measurement of the scanner trigger signal -type: number diff --git a/src/schema/columns/type.yaml b/src/schema/columns/type.yaml deleted file mode 100644 index 74ca9e503f..0000000000 --- a/src/schema/columns/type.yaml +++ /dev/null @@ -1,35 +0,0 @@ ---- -name: type -description: | - Type of channel; MUST use the channel types listed below. - Note that the type MUST be in upper-case. -type: string -enum: - - MEGMAG - - MEGGRADAXIAL - - MEGGRADPLANAR - - MEGREFMAG - - MEGREFGRADAXIAL - - MEGREFGRADPLANAR - - MEGOTHER - - EEG - - ECOG - - SEEG - - DBS - - VEOG - - HEOG - - EOG - - ECG - - EMG - - TRIG - - AUDIO - - PD - - EYEGAZE - - PUPIL - - MISC - - SYSCLOCK - - ADC - - DAC - - HLU - - FITERR - - OTHER diff --git a/src/schema/columns/units.yaml b/src/schema/columns/units.yaml deleted file mode 100644 index 546f209899..0000000000 --- a/src/schema/columns/units.yaml +++ /dev/null @@ -1,7 +0,0 @@ ---- -name: units -description: | - Physical unit of the value represented in this channel, - for example, `V` for Volt, or `fT/cm` for femto Tesla per centimeter - (see [Units](/02-common-principles.html#units)). -type: string diff --git a/src/schema/columns/value.yaml b/src/schema/columns/value.yaml deleted file mode 100644 index 2e2868f57c..0000000000 --- a/src/schema/columns/value.yaml +++ /dev/null @@ -1,6 +0,0 @@ ---- -name: value -description: | - Marker value associated with the event (for example, the value of a TTL - trigger that was recorded at the onset of the event). -type: number diff --git a/src/schema/columns/whole_blood_radioactivity.yaml b/src/schema/columns/whole_blood_radioactivity.yaml deleted file mode 100644 index 52613ba65b..0000000000 --- a/src/schema/columns/whole_blood_radioactivity.yaml +++ /dev/null @@ -1,6 +0,0 @@ ---- -name: whole_blood_radioactivity -description: | - Radioactivity in whole blood samples, - in unit of radioactivity measurements in whole blood samples (for example, `"kBq/mL"`). -type: number diff --git a/src/schema/columns/x.yaml b/src/schema/columns/x.yaml deleted file mode 100644 index 84e906be6f..0000000000 --- a/src/schema/columns/x.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- -name: x -description: | - Recorded position along the x-axis. -type: number diff --git a/src/schema/columns/y.yaml b/src/schema/columns/y.yaml deleted file mode 100644 index fc768781a0..0000000000 --- a/src/schema/columns/y.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- -name: y -description: | - Recorded position along the y-axis. -type: number diff --git a/src/schema/columns/z.yaml b/src/schema/columns/z.yaml deleted file mode 100644 index 736bb5c95b..0000000000 --- a/src/schema/columns/z.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- -name: z -description: | - Recorded position along the z-axis. -type: number From 26e8ae9141fd717342f03f9a6a47a7be589052d1 Mon Sep 17 00:00:00 2001 From: Taylor Salo Date: Tue, 5 Oct 2021 14:08:37 -0400 Subject: [PATCH 12/39] Move columns file. --- src/schema/{ => objects}/columns.yaml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename src/schema/{ => objects}/columns.yaml (100%) diff --git a/src/schema/columns.yaml b/src/schema/objects/columns.yaml similarity index 100% rename from src/schema/columns.yaml rename to src/schema/objects/columns.yaml From 4615684db81e51142b0173029166c9c14895b706 Mon Sep 17 00:00:00 2001 From: Taylor Salo Date: Tue, 5 Oct 2021 14:24:11 -0400 Subject: [PATCH 13/39] Fix things up a bit. --- src/schema/objects/columns.yaml | 12 ++++++++++++ tools/schemacode/schema.py | 4 ++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/schema/objects/columns.yaml b/src/schema/objects/columns.yaml index 72de8968e5..95318e1e53 100644 --- a/src/schema/objects/columns.yaml +++ b/src/schema/objects/columns.yaml @@ -332,6 +332,18 @@ value: Marker value associated with the event (for example, the value of a TTL trigger that was recorded at the onset of the event). type: number +volume_type: + name: volume_type + description: | + The `*_aslcontext.tsv` table consists of a single column of labels identifying + the `volume_type` of each volume in the corresponding `*_asl.nii[.gz]` file. + type: string + enum: + - control + - label + - m0scan + - deltam + - cbf whole_blood_radioactivity: name: whole_blood_radioactivity description: | diff --git a/tools/schemacode/schema.py b/tools/schemacode/schema.py index a042859036..27d472b945 100644 --- a/tools/schemacode/schema.py +++ b/tools/schemacode/schema.py @@ -548,7 +548,7 @@ def make_columns_table(schema, column_info, tablefmt="github"): """ fields = list(column_info.keys()) # The filter function doesn't work here. - column_schema = schema["columns"] + column_schema = schema["objects"]["columns"] retained_fields = [f for f in fields if f in column_schema.keys()] dropped_fields = [f for f in fields if f not in column_schema.keys()] @@ -574,7 +574,7 @@ def make_columns_table(schema, column_info, tablefmt="github"): "[DEPRECATED](/02-common-principles.html#definitions)", ) - type_string = _resolve_metadata_type(column_schema[field]) + type_string = utils.resolve_metadata_type(column_schema[field]) description = ( column_schema[field]["description"] + " " + description_addendum From 27168f5221c0aa873d5bbab10cd565d4bf67f1b3 Mon Sep 17 00:00:00 2001 From: Taylor Salo Date: Tue, 5 Oct 2021 14:52:48 -0400 Subject: [PATCH 14/39] Add columns I missed for modality-agnostic TSV files. --- src/03-modality-agnostic-files.md | 74 +++++++--------- src/schema/objects/columns.yaml | 140 ++++++++++++++++++++++++++++++ 2 files changed, 173 insertions(+), 41 deletions(-) diff --git a/src/03-modality-agnostic-files.md b/src/03-modality-agnostic-files.md index d0d58e24d0..1b24c04b58 100644 --- a/src/03-modality-agnostic-files.md +++ b/src/03-modality-agnostic-files.md @@ -175,31 +175,15 @@ Each participant MUST be described by one and only one row. Commonly used *optional* columns in `participant.tsv` files are `age`, `sex`, and `handedness`. We RECOMMEND to make use of these columns, and in case that you do use them, we RECOMMEND to use the following values -for them: +for them. -- `age`: numeric value in years (float or integer value) - -- `sex`: string value indicating phenotypical sex, one of "male", "female", - "other" - - - for "male", use one of these values: `male`, `m`, `M`, `MALE`, `Male` - - - for "female", use one of these values: `female`, `f`, `F`, `FEMALE`, - `Female` - - - for "other", use one of these values: `other`, `o`, `O`, `OTHER`, - `Other` - -- `handedness`: string value indicating one of "left", "right", - "ambidextrous" - - - for "left", use one of these values: `left`, `l`, `L`, `LEFT`, `Left` - - - for "right", use one of these values: `right`, `r`, `R`, `RIGHT`, - `Right` - - - for "ambidextrous", use one of these values: `ambidextrous`, `a`, `A`, - `AMBIDEXTROUS`, `Ambidextrous` +{{ MACROS___make_columns_table( + { + "age": "RECOMMENDED", + "sex": "RECOMMENDED", + "handedness": "RECOMMENDED", + } +) }} Throughout BIDS you can indicate missing values with `n/a` (for "not available"). @@ -266,6 +250,18 @@ samples.json The purpose of this file is to describe properties of samples, indicated by the `sample` entity. This file is REQUIRED if `sample-