Skip to content

Commit

Permalink
force channels json to validate against both column descriptions and …
Browse files Browse the repository at this point in the history
…stricter level object.
  • Loading branch information
rwblair committed Nov 3, 2023
1 parent bfa80cd commit 71b88c1
Showing 1 changed file with 26 additions and 27 deletions.
53 changes: 26 additions & 27 deletions bids-validator/validators/json/schemas/channels.json
Original file line number Diff line number Diff line change
@@ -1,36 +1,35 @@
{
"$schema": "http://json-schema.org/draft-06/schema#",
"type": "object",
"properties": {
"reference_frame": {
"$ref": "common_definitions.json#/definitions/ColumnDescription",
"title": "Reference Frame",
"allOf": [
{
"type": "object",
"properties": {
"$ref": "common_definitions.json#/definitions/ColumnDescription/properties",
"Levels": {
"$ref": "common_definitions.json#/definitions/ColumnDescription/properties/Levels",
"reference_frame": {
"title": "Reference Frame",
"properties": {
"RotationOrder": {
"description": "The sequence in which the extrinsic rotations are applied around the three axes.",
"type": "string",
"enum": ["XYZ", "XZY", "YXZ", "YZX", "ZXY", "ZYX"]
},
"RotationRule": {
"description": "The direction of rotation around each axis.",
"type": "string",
"enum": ["left-hand", "right-hand"]
},
"SpatialAxes": {
"description": "The coordinate system in which the motion data are to be interpreted. A sequence of characters from the set `{'A', 'P', 'L', 'R', 'S', 'I', '_'}` indicating the direction of each axis. For example `\"ARS\"` indicates positive values in the X, Y, Z axes are respectively anterior, right, and superior of the origin, while `\"PLI\"` indicates positive values are posterior, left, and inferior of the origin. The `\"_\"` character may be used for unused axes.",
"type": "string",
"pattern": "^[APLRSI_]{3}$"
"Levels": {
"properties": {
"RotationOrder": {
"description": "The sequence in which the extrinsic rotations are applied around the three axes.",
"type": "string",
"enum": ["XYZ", "XZY", "YXZ", "YZX", "ZXY", "ZYX"]
},
"RotationRule": {
"description": "The direction of rotation around each axis.",
"type": "string",
"enum": ["left-hand", "right-hand"]
},
"SpatialAxes": {
"description": "The coordinate system in which the motion data are to be interpreted. A sequence of characters from the set `{'A', 'P', 'L', 'R', 'S', 'I', '_'}` indicating the direction of each axis. For example `\"ARS\"` indicates positive values in the X, Y, Z axes are respectively anterior, right, and superior of the origin, while `\"PLI\"` indicates positive values are posterior, left, and inferior of the origin. The `\"_\"` character may be used for unused axes.",
"type": "string",
"pattern": "^[APLRSI_]{3}$"
}
}
}
}
}
}
}
},
"patternProperties": {
"^.+$": { "$ref": "common_definitions.json#/definitions/ColumnDescription" }
}
},
{ "$ref": "common_definitions.json#/definitions/ColumnDescription" }
]
}

0 comments on commit 71b88c1

Please sign in to comment.