Files
micarrsim/schemas/experiment.schema.json

69 lines
3.2 KiB
JSON

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://micarrsim.local/schemas/experiment.schema.json",
"title": "micarrsim experiment",
"type": "object", "additionalProperties": false,
"required": ["schemaVersion", "kind", "id", "name", "arrayId", "sceneId", "scan", "frequencyBands", "stft", "beamforming"],
"properties": {
"schemaVersion": { "const": "1.0.0" }, "kind": { "const": "micarrsim.experiment" },
"id": { "type": "string", "pattern": "^[a-z0-9][a-z0-9._-]*$" },
"name": { "type": "string", "minLength": 1, "maxLength": 120 },
"arrayId": { "type": "string", "minLength": 1 }, "sceneId": { "type": "string", "minLength": 1 },
"scan": {
"type": "object", "additionalProperties": false,
"required": ["z", "xMin", "xMax", "yMin", "yMax", "columns", "rows"],
"properties": {
"z": { "type": "number", "exclusiveMinimum": 0 },
"xMin": { "type": "number" }, "xMax": { "type": "number" },
"yMin": { "type": "number" }, "yMax": { "type": "number" },
"columns": { "type": "integer", "minimum": 8, "maximum": 512 },
"rows": { "type": "integer", "minimum": 8, "maximum": 512 }
}
},
"frequencyBands": {
"type": "array", "minItems": 1, "maxItems": 8,
"items": {
"type": "object", "additionalProperties": false, "required": ["id", "minHz", "maxHz", "color"],
"properties": {
"id": { "type": "string", "pattern": "^[a-z0-9][a-z0-9._-]*$" },
"minHz": { "type": "number", "minimum": 0, "maximum": 1000000 },
"maxHz": { "type": "number", "exclusiveMinimum": 0, "maximum": 1000000 },
"color": { "type": "string", "pattern": "^#[0-9a-fA-F]{6}$" }
}
}
},
"stft": {
"type": "object", "additionalProperties": false, "required": ["fftSize", "hopSize", "window"],
"properties": {
"fftSize": { "enum": [128, 256, 512, 1024, 2048, 4096] },
"hopSize": { "type": "integer", "minimum": 1, "maximum": 4096 }, "window": { "const": "hann" }
}
},
"beamforming": {
"type": "object", "additionalProperties": false,
"required": ["algorithm", "backend", "minimumDistance", "normalization", "dynamicRangeDb"],
"properties": {
"algorithm": { "enum": ["das", "das-phat", "gcc-phat", "music"] },
"backend": { "enum": ["auto", "cpu", "webgpu"] },
"minimumDistance": { "type": "number", "exclusiveMinimum": 0, "maximum": 10 },
"normalization": { "enum": ["peak", "none"] },
"dynamicRangeDb": { "type": "number", "minimum": 6, "maximum": 120 },
"compensateFrequencyResponse": { "type": "boolean" },
"maxCompensationDb": { "type": "number", "minimum": 0, "maximum": 120 },
"musicSourceCountMethod": { "enum": ["fixed", "mdl", "aic"] },
"musicSourceCount": { "type": "integer", "minimum": 1, "maximum": 1023 }
}
},
"evaluation": {
"type": "object", "additionalProperties": false,
"required": ["detectionThresholdRatio"],
"properties": {
"detectionThresholdRatio": { "type": "number", "exclusiveMinimum": 0, "maximum": 1 },
"detectionMethod": {
"enum": ["local-max", "connected-components", "watershed"]
}
}
}
}
}