bids-specification icon indicating copy to clipboard operation
bids-specification copied to clipboard

[SCHEMA] Refactor channel types

Open sappelhoff opened this issue 2 years ago • 0 comments

  • We have lists of coordinate systems for different modalities

  • For example: MEG, EEG

  • Coordinate systems from EEG may also be used in MEG

  • This is nicely expressed in the schema, see the $ref items: https://github.com/bids-standard/bids-specification/blob/24dbe58010d96c0ce4d4c775230cef94605c6068/src/schema/objects/metadata.yaml#L60-L72

  • The situation is similar for channel types: we have types defined in different modalities (search for type__ieeg_channels, type__eeg_channels, type__meg_channels)

  • For example types like "EEG", "RESP", or "PUPIL" -- these are the same, regardless for which modality they are used (that is, specifying PUPIL in an EEG dataset is the same as PUPIL in an MEG dataset)

  • Currently these are organized as such: https://github.com/bids-standard/bids-specification/blob/24dbe58010d96c0ce4d4c775230cef94605c6068/src/schema/objects/columns.yaml#L471-L509

  • Meaning we have lots of duplication

Should we just have a single type__channels metadata entry? that is shared across the spec?

Or should we keep them modality specific in "overarching variables", but then have a type__channels defined as

type__channels:
  name: ....
  description: ...
  anyOf:
  - $ref: _type__meg_channels
  - $ref: _type__eeg_channels
  - $ref: _type__ieeg_channels
  - $ref: ...

sappelhoff avatar Jun 14 '22 18:06 sappelhoff