-
Notifications
You must be signed in to change notification settings - Fork 163
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(schema): Move coordsystem.json rules out of rules.sidecars (#1892)
* feat(schema): Move coordsystem.json rules out of rules.sidecars * feat: Add make_json_table macro * feat(spec): Render coordsystem JSON tables * feat(metaschema): Add schema.rules.json
- Loading branch information
Showing
17 changed files
with
470 additions
and
379 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
# | ||
# Groups of related metadata fields | ||
# | ||
# Assumptions: never need disjunction of selectors | ||
# Assumptions: top-to-bottom overrides is sufficient logic | ||
|
||
--- | ||
# General fields | ||
EEGCoordsystemGeneral: | ||
selectors: | ||
- datatype == "eeg" | ||
- suffix == "coordsystem" | ||
fields: | ||
IntendedFor: | ||
level: optional | ||
description_addendum: | | ||
This identifies the MRI or CT scan associated with the electrodes, | ||
landmarks, and fiducials. | ||
# Fields relating to the EEG electrode positions | ||
EEGCoordsystemPositions: | ||
selectors: | ||
- datatype == "eeg" | ||
- suffix == "coordsystem" | ||
fields: | ||
EEGCoordinateSystem: required | ||
EEGCoordinateUnits: required | ||
EEGCoordinateSystemDescription: | ||
level: recommended | ||
level_addendum: required if `EEGCoordinateSystem` is `"Other"` | ||
|
||
EEGCoordsystemOther: | ||
selectors: | ||
- datatype == "eeg" | ||
- suffix == "coordsystem" | ||
- '"EEGCoordinateSystem" in json' | ||
- json.EEGCoordinateSystem == "Other" | ||
fields: | ||
EEGCoordinateSystemDescription: required | ||
|
||
# Fields relating to the position of fiducials measured during an EEG session/run | ||
EEGCoordsystemFiducials: | ||
selectors: | ||
- datatype == "eeg" | ||
- suffix == "coordsystem" | ||
fields: | ||
FiducialsDescription: optional | ||
FiducialsCoordinates: recommended | ||
FiducialsCoordinateSystem: recommended | ||
FiducialsCoordinateUnits: recommended | ||
FiducialsCoordinateSystemDescription: | ||
level: recommended | ||
level_addendum: required if `FiducialsCoordinateSystem` is `"Other"` | ||
|
||
EEGCoordsystemOtherFiducialCoordinateSystem: | ||
selectors: | ||
- datatype == "eeg" | ||
- suffix == "coordsystem" | ||
- json.FiducialsCoordinateSystem == "Other" | ||
fields: | ||
FiducialsCoordinateSystemDescription: required | ||
|
||
# Fields relating to the position of anatomical landmark measured during an EEG session/run | ||
EEGCoordsystemLandmark: | ||
selectors: | ||
- datatype == "eeg" | ||
- suffix == "coordsystem" | ||
fields: | ||
AnatomicalLandmarkCoordinates: recommended | ||
AnatomicalLandmarkCoordinateSystem: | ||
level: recommended | ||
description_addendum: Preferably the same as the `EEGCoordinateSystem`. | ||
AnatomicalLandmarkCoordinateUnits: recommended | ||
|
||
EEGCoordsystemLandmarkDescriptionRec: | ||
selectors: | ||
- datatype == "eeg" | ||
- suffix == "coordsystem" | ||
- json.AnatomicalLandmarkCoordinateSystem != "Other" | ||
fields: | ||
AnatomicalLandmarkCoordinateSystemDescription: | ||
level: recommended | ||
level_addendum: required if `AnatomicalLandmarkCoordinateSystem` is `"Other"` | ||
|
||
EEGCoordsystemLandmarkDescriptionReq: | ||
selectors: | ||
- datatype == "eeg" | ||
- suffix == "coordsystem" | ||
- json.AnatomicalLandmarkCoordinateSystem == "Other" | ||
fields: | ||
AnatomicalLandmarkCoordinateSystemDescription: required |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# | ||
# Groups of related metadata fields | ||
# | ||
# Assumptions: never need disjunction of selectors | ||
# Assumptions: top-to-bottom overrides is sufficient logic | ||
|
||
--- | ||
# General fields | ||
iEEGCoordsystemGeneral: | ||
selectors: | ||
- datatype == "ieeg" | ||
- suffix == "coordsystem" | ||
fields: | ||
IntendedFor__ds_relative: | ||
level: optional | ||
description_addendum: | | ||
If only a surface reconstruction is available, this should point to | ||
the surface reconstruction file. | ||
Note that this file should have the same coordinate system | ||
specified in `iEEGCoordinateSystem`. | ||
For example, **T1**: `'bids::sub-<label>/ses-<label>/anat/sub-01_T1w.nii.gz'` | ||
**Surface**: `'bids::derivatives/surfaces/sub-<label>/ses-<label>/anat/ | ||
sub-01_hemi-R_desc-T1w_pial.surf.gii'` | ||
**Operative photo**: `'bids::sub-<label>/ses-<label>/ieeg/ | ||
sub-0001_ses-01_acq-photo1_photo.jpg'` | ||
**Talairach**: `'bids::derivatives/surfaces/sub-Talairach/ses-01/anat/ | ||
sub-Talairach_hemi-R_pial.surf.gii'` | ||
# Fields relating to the iEEG electrode positions | ||
iEEGCoordsystemPositions: | ||
selectors: | ||
- datatype == "ieeg" | ||
- suffix == "coordsystem" | ||
fields: | ||
iEEGCoordinateSystem: required | ||
iEEGCoordinateUnits: required | ||
iEEGCoordinateSystemDescription: | ||
level: recommended | ||
level_addendum: required if `iEEGCoordinateSystem` is `"Other"` | ||
iEEGCoordinateProcessingDescription: recommended | ||
iEEGCoordinateProcessingReference: recommended | ||
|
||
iEEGCoordsystemOther: | ||
selectors: | ||
- datatype == "ieeg" | ||
- suffix == "coordsystem" | ||
- '"iEEGCoordinateSystem" in json' | ||
- json.iEEGCoordinateSystem == "Other" | ||
fields: | ||
iEEGCoordinateSystemDescription: required |
Oops, something went wrong.