-
Notifications
You must be signed in to change notification settings - Fork 190
Fix multiple validation errors for EMG coordsystem and electrode files #2279
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -62,12 +62,29 @@ coordsystem__eeg: | |
| space: optional | ||
|
|
||
| # emg may have a `recording` entity | ||
| # EMG coordsystem files can be at root level (no subject) when using | ||
| # the inheritance principle for shared coordinate systems across subjects | ||
| coordsystem__emg: | ||
| $ref: rules.files.raw.channels.coordsystem__eeg | ||
| datatypes: | ||
| - emg | ||
| entities: | ||
| $ref: rules.files.raw.channels.coordsystem__eeg.entities | ||
| subject: optional | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Subject is always optional for TSV or JSON files, due to the inheritance principle. |
||
| recording: optional | ||
| space: optional | ||
|
|
||
| # EMG coordsystem files at dataset root level (no datatype directory) | ||
| # Used for sharing coordinate systems across all subjects via inheritance | ||
| # Example: /space-leftForearm_coordsystem.json | ||
| coordsystem__emg_root: | ||
| suffixes: | ||
| - coordsystem | ||
| extensions: | ||
| - .json | ||
| datatypes: [] | ||
| entities: | ||
| session: optional | ||
| recording: optional | ||
| space: optional | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -29,17 +29,41 @@ EMGChannels: | |
| index_columns: [name__channels] | ||
| additional_columns: allowed_if_defined | ||
|
|
||
| # EMG electrodes without group column - name must be unique | ||
| EMGElectrodes: | ||
| selectors: | ||
| - datatype == "emg" | ||
| - suffix == "electrodes" | ||
| - extension == ".tsv" | ||
| - '!columns.group' | ||
| initial_columns: | ||
| - name__electrodes | ||
| - x | ||
| - y | ||
| columns: | ||
| name__electrodes: required | ||
| x: required | ||
| y: required | ||
| z: optional | ||
| coordinate_system: recommended | ||
| type__electrodes: recommended | ||
| material: recommended | ||
| impedance: recommended | ||
| group__emg: recommended | ||
| index_columns: [name__electrodes] | ||
|
Comment on lines
+39
to
+53
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Optional index and initial columns were implemented in bids-standard/bids-validator#243. |
||
| additional_columns: allowed_if_defined | ||
|
|
||
| # EMG electrodes with group column - (name, group) must be unique | ||
| EMGElectrodes__grouped: | ||
| selectors: | ||
| - datatype == "emg" | ||
| - suffix == "electrodes" | ||
| - extension == ".tsv" | ||
| - columns.group | ||
| initial_columns: | ||
| - name__electrodes | ||
| - x | ||
| - y | ||
| - z | ||
| - coordinate_system | ||
| columns: | ||
| name__electrodes: required | ||
| x: required | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is probably correct, but these selectors are not actually used by the validator. The
SIDECAR_WITHOUT_DATAFILEerror is a separate check after walking the whole dataset, so the context isn't available for selecting, at least in the JS implementation.