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

Use `channels.tsv` to verify channel counts in modality specific sidecar.json

Open sappelhoff opened this issue 6 years ago • 1 comments
trafficstars

for MEG, EEG, and iEEG we can specify a channels.tsv file

I suggest that IF a channels.tsv is specified, we use the REQUIRED type column within it to compile counts of the different channel types. These counts should then be used in turn to verify the modality specific sidecar.json files, which can contain fields such as MEGChannelCount.

If there is no correspondence, we should set a warning.

Example:

Given the following channels.tsvfile ...

name	type	
FC1	EEG
Cz	EEG
h1	HEOG

... the test compiles in some javascript dictionary object

  • EEGChannelCount = 2
  • HEOGChannelCount = 1
  • all other counts = 0 # need some better way

... then it goes to the sidecar.json file and verifies

{
    "TaskName": "TEST",
    "SamplingFrequency": 5000,
    "EEGChannelCount": 2,
    "HEOGChannelCount": 1,
    "ECGChannelCount": 0,
    "EMGChannelCount": 0,
    "EEGReference": "unipolar, placed on FCz",
    "PowerLineFrequency": 50,
    "SoftwareFilters": "n/a"
}

sappelhoff avatar Dec 14 '18 07:12 sappelhoff