{ "$schema": "http://json-schema.org/draft-07/schema#", "$id": "https://raw.githubusercontent.com/SpikeInterface/probeinterface/main/src/probeinterface/schema/probe.json.schema", "$comment": "Validates probeinterface specification versions matching the 'version' property pattern (currently 0.3.x and 0.4.x). The pattern is bumped only when the schema changes incompatibly. See https://probeinterface.readthedocs.io", "type": "object", "properties": { "specification": { "type": "string", "const": "probeinterface" }, "version": { "type": "string", "$comment": "Range of specification versions this schema validates. Bump when the schema changes incompatibly.", "pattern": "^0\\.[34]\\.\\d+$" }, "probes": { "type": "array", "items": { "type": "object", "properties": { "ndim": { "type": "integer", "enum": [2, 3] }, "si_units": { "type": "string", "enum": ["mm","um"] }, "annotations": { "type": "object", "properties": { "model_name": { "type": "string" }, "manufacturer": { "type": "string" } }, "required": ["model_name", "manufacturer"], "additionalProperties": true }, "contact_annotations": { "type": "object", "additionalProperties": true }, "contact_positions": { "type": "array", "items": { "type": "array", "items": { "type": "number" }, "minItems": 2, "maxItems": 3 } }, "contact_plane_axes": { "type": "array", "items": { "type": "array", "items": { "type": "array", "items": { "type": "number" }, "minItems": 2, "maxItems": 3 }, "minItems": 2, "maxItems": 2 } }, "contact_shapes": { "type": "array", "items": { "type": "string", "enum": ["circle", "rect", "square"] } }, "contact_shape_params": { "type": "array", "items": { "anyOf": [ { "type": "object", "properties": { "radius": { "type": "number", "minimum": 0 } }, "required": ["radius"] }, { "type": "object", "properties": { "width": { "type": "number", "minimum": 0 }, "height": { "type": "number", "minimum": 0 } }, "required": ["width"] } ] } }, "probe_planar_contour": { "type": "array", "items": { "type": "array", "items": { "type": ["integer", "number"] }, "minItems": 2, "maxItems": 3 } }, "contact_ids": { "type": "array", "items": { "type": "string" } }, "shank_ids": { "type": "array", "items": { "type": "string" } }, "contact_sides": { "type": "array", "items": { "type": "string" } }, "device_channel_indices": { "type": "array", "items": { "type": "integer" } } }, "required": [ "ndim", "si_units", "annotations", "contact_positions", "contact_shapes", "contact_shape_params", "contact_ids" ], "additionalProperties": false } }, "probe_ids": { "type": "array", "$comment": "Optional ids of the probes, in the same order as 'probes'. When absent, ids default to the string of the probe index.", "items": { "type": "string" }, "uniqueItems": true }, "global_contact_order": { "type": "array", "$comment": "Optional global order of the contacts, as a permutation of the indices of all contacts stacked probe by probe. Absent when the order is the natural one.", "items": { "type": "integer", "minimum": 0 }, "uniqueItems": true } }, "required": ["specification", "version", "probes"], "additionalProperties": false }