Skip to content

Commit e47283a

Browse files
Remi-Gautsalosappelhoff
authored
[FIX] update highlighting of examples, JSON keys and values, and TSV headers or values in the schema (#998)
* remove extra double quotes from examples in columns.yml * update example highlighting and add double quotes for JSON keys or values for entities.yml * update example and JSON keys and values highlighting in metadata.yml * Apply suggestions from code review Co-authored-by: Taylor Salo <[email protected]> * Apply suggestions from code review Co-authored-by: Stefan Appelhoff <[email protected]> Co-authored-by: Taylor Salo <[email protected]> Co-authored-by: Stefan Appelhoff <[email protected]>
1 parent 577cc82 commit e47283a

File tree

3 files changed

+112
-112
lines changed

3 files changed

+112
-112
lines changed

src/schema/objects/columns.yaml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ duration:
6565
name: duration
6666
description: |
6767
Duration of the event (measured from onset) in seconds.
68-
Must always be either zero or positive (or `"n/a"` if unavailable).
68+
Must always be either zero or positive (or `n/a` if unavailable).
6969
A "duration" value of zero implies that the delta function or event is so
7070
short as to be effectively modeled as an impulse.
7171
anyOf:
@@ -183,7 +183,7 @@ mapping:
183183
material:
184184
name: material
185185
description: |
186-
Material of the electrode (for example, `"Tin"`, `"Ag/AgCl"`, `"Gold"`).
186+
Material of the electrode (for example, `Tin`, `Ag/AgCl`, `Gold`).
187187
type: string
188188
metabolite_parent_fraction:
189189
name: metabolite_parent_fraction
@@ -264,7 +264,7 @@ participant_id:
264264
plasma_radioactivity:
265265
name: plasma_radioactivity
266266
description: |
267-
Radioactivity in plasma, in unit of plasma radioactivity (for example, `"kBq/mL"`).
267+
Radioactivity in plasma, in unit of plasma radioactivity (for example, `kBq/mL`).
268268
type: number
269269
# reference column for channels.tsv files for EEG data
270270
reference__eeg:
@@ -278,7 +278,7 @@ reference__eeg:
278278
reference__ieeg:
279279
name: reference
280280
description: |
281-
Specification of the reference (for example, 'mastoid', 'ElectrodeName01', 'intracranial', 'CAR', 'other', 'n/a').
281+
Specification of the reference (for example, `mastoid`, `ElectrodeName01`, `intracranial`, `CAR`, `other`, `n/a`).
282282
If the channel is not an electrode channel (for example, a microphone channel) use `n/a`.
283283
anyOf:
284284
- type: string
@@ -295,7 +295,7 @@ response_time:
295295
description: |
296296
Response time measured in seconds.
297297
A negative response time can be used to represent preemptive responses and
298-
"n/a" denotes a missed response.
298+
`n/a` denotes a missed response.
299299
anyOf:
300300
- type: number
301301
unit: s
@@ -382,7 +382,7 @@ software_filters:
382382
name: software_filters
383383
description: |
384384
List of temporal and/or spatial software filters applied
385-
(for example, "SSS", `"SpatialCompensation"`).
385+
(for example, `SSS`, `SpatialCompensation`).
386386
Note that parameters should be defined in the general MEG sidecar .json file.
387387
Indicate `n/a` in the absence of software filters applied.
388388
anyOf:
@@ -403,8 +403,8 @@ status:
403403
name: status
404404
description: |
405405
Data quality observed on the channel.
406-
A channel is considered `"bad"` if its data quality is compromised by excessive noise.
407-
If quality is unknown, then a value of `"n/a"` may be used.
406+
A channel is considered `bad` if its data quality is compromised by excessive noise.
407+
If quality is unknown, then a value of `n/a` may be used.
408408
Description of noise type SHOULD be provided in `[status_description]`.
409409
type: string
410410
enum:
@@ -427,7 +427,7 @@ stim_file:
427427
(under the root folder of the dataset; with optional subfolders).
428428
The values under the `stim_file` column correspond to a path relative to
429429
`/stimuli`.
430-
For example `"images/cat03.jpg"` will be translated to `"/stimuli/images/cat03.jpg"`.
430+
For example `images/cat03.jpg` will be translated to `/stimuli/images/cat03.jpg`.
431431
type: string
432432
format: stimuli_relative
433433
strain:
@@ -456,8 +456,8 @@ trial_type:
456456
description: |
457457
Primary categorisation of each trial to identify them as instances of the
458458
experimental conditions.
459-
For example: for a response inhibition task, it could take on values "go" and
460-
"no-go" to refer to response initiation and response inhibition experimental
459+
For example: for a response inhibition task, it could take on values `go` and
460+
`no-go` to refer to response initiation and response inhibition experimental
461461
conditions.
462462
type: string
463463
trigger:
@@ -539,7 +539,7 @@ whole_blood_radioactivity:
539539
name: whole_blood_radioactivity
540540
description: |
541541
Radioactivity in whole blood samples,
542-
in unit of radioactivity measurements in whole blood samples (for example, `"kBq/mL"`).
542+
in unit of radioactivity measurements in whole blood samples (for example, `kBq/mL`).
543543
type: number
544544
x:
545545
name: x

src/schema/objects/entities.yaml

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ acquisition:
1515
resolution.
1616
In such case two files could have the following names:
1717
`sub-01_acq-highres_T1w.nii.gz` and `sub-01_acq-lowres_T1w.nii.gz`, however
18-
the user is free to choose any other label than highres and lowres as long
18+
the user is free to choose any other label than `highres` and `lowres` as long
1919
as they are consistent across subjects and sessions.
2020
In case different sequences are used to record the same modality
21-
(for example, RARE and FLASH for T1w)
21+
(for example, `RARE` and `FLASH` for T1w)
2222
this field can also be used to make that distinction.
2323
At what level of detail to make the distinction (for example,
24-
just between RARE and FLASH, or between RARE, FLASH, and FLASHsubsampled)
24+
just between `RARE` and `FLASH`, or between `RARE`, `FLASH`, and `FLASHsubsampled`)
2525
remains at the discretion of the researcher.
2626
type: string
2727
format: label
@@ -32,7 +32,7 @@ ceagent:
3232
The `ce-<label>` key/value can be used to distinguish
3333
sequences using different contrast enhanced images.
3434
The label is the name of the contrast agent.
35-
The key `ContrastBolusIngredient` MAY also be added in the JSON file,
35+
The key `"ContrastBolusIngredient"` MAY also be added in the JSON file,
3636
with the same label.
3737
type: string
3838
format: label
@@ -82,9 +82,9 @@ echo:
8282
If files belonging to an entity-linked file collection are acquired at different
8383
echo times, the `_echo-<index>` key/value pair MUST be used to distinguish
8484
individual files.
85-
This entity represents the `EchoTime` metadata field. Please note that the `<index>`
85+
This entity represents the `"EchoTime"` metadata field. Please note that the `<index>`
8686
denotes the number/index (in the form of a nonnegative integer), not the
87-
`EchoTime` value which needs to be stored in the field `EchoTime` of the separate
87+
`"EchoTime"` value which needs to be stored in the field `"EchoTime"` of the separate
8888
JSON file.
8989
type: string
9090
format: index
@@ -95,9 +95,9 @@ flip:
9595
If files belonging to an entity-linked file collection are acquired at different
9696
flip angles, the `_flip-<index>` key/value pair MUST be used to distinguish
9797
individual files.
98-
This entity represents the `FlipAngle` metadata field. Please note that the `<index>`
99-
denotes the number/index (in the form of a nonnegative integer), not the `FlipAngle`
100-
value which needs to be stored in the field `FlipAngle` of the separate JSON file.
98+
This entity represents the `"FlipAngle"` metadata field. Please note that the `<index>`
99+
denotes the number/index (in the form of a nonnegative integer), not the `"FlipAngle"`
100+
value which needs to be stored in the field `"FlipAngle"` of the separate JSON file.
101101
type: string
102102
format: index
103103
hemisphere:
@@ -119,9 +119,9 @@ inversion:
119119
If files belonging to an entity-linked file collection are acquired at different
120120
inversion times, the `_inv-<index>` key/value pair MUST be used to distinguish
121121
individual files.
122-
This entity represents the `InversionTime` metadata field. Please note that the `<index>`
123-
denotes the number/index (in the form of a nonnegative integer), not the `InversionTime`
124-
value which needs to be stored in the field `InversionTime` of the separate JSON file.
122+
This entity represents the `"InversionTime` metadata field. Please note that the `<index>`
123+
denotes the number/index (in the form of a nonnegative integer), not the `"InversionTime"`
124+
value which needs to be stored in the field `"InversionTime"` of the separate JSON file.
125125
type: string
126126
format: index
127127
label:
@@ -151,7 +151,7 @@ mtransfer:
151151
If files belonging to an entity-linked file collection are acquired at different
152152
magnetization transfer (MT) states, the `_mt-<label>` key/value pair MUST be used to
153153
distinguish individual files.
154-
This entity represents the `MTState` metadata field. Allowed label values for this
154+
This entity represents the `"MTState"` metadata field. Allowed label values for this
155155
entity are `on` and `off`, for images acquired in presence and absence of an MT pulse,
156156
respectively.
157157
type: string
@@ -172,7 +172,7 @@ part:
172172
173173
Phase images MAY be in radians or in arbitrary units.
174174
The sidecar JSON file MUST include the units of the `phase` image.
175-
The possible options are `rad` or `arbitrary`.
175+
The possible options are `"rad"` or `"arbitrary"`.
176176
177177
When there is only a magnitude image of a given type, the `part` key MAY be
178178
omitted.
@@ -190,7 +190,7 @@ processing:
190190
a file that was a result of particular processing performed on the device.
191191
192192
This is useful for files produced in particular by Elekta's MaxFilter
193-
(for example, sss, tsss, trans, quat or mc),
193+
(for example, `sss`, `tsss`, `trans`, `quat` or `mc`),
194194
which some installations impose to be run on raw data because of active
195195
shielding software corrections before the MEG data can actually be
196196
exploited.
@@ -201,7 +201,7 @@ reconstruction:
201201
entity: rec
202202
description: |
203203
The `rec-<label>` key/value can be used to distinguish
204-
different reconstruction algorithms (for example ones using motion
204+
different reconstruction algorithms (for example `MoCo` for the ones using motion
205205
correction).
206206
type: string
207207
format: label
@@ -220,7 +220,7 @@ resolution:
220220
entity: res
221221
description: |
222222
Resolution of regularly sampled N-dimensional data.
223-
MUST have a corresponding `Resolution` metadata field to provide
223+
MUST have a corresponding `"Resolution"` metadata field to provide
224224
interpretation.
225225
226226
This entity is only applicable to derivative data.
@@ -350,7 +350,7 @@ tracer:
350350
description: |
351351
The `trc-<label>` key/value can be used to distinguish
352352
sequences using different tracers.
353-
The key `TracerName` MUST also be included in the associated JSON file,
353+
The key `"TracerName"` MUST also be included in the associated JSON file,
354354
although the label may be different.
355355
type: string
356356
format: label

0 commit comments

Comments
 (0)