diff --git a/v1/FOV.json b/v1/FOV.json index 31f213b..05c0f1a 100644 --- a/v1/FOV.json +++ b/v1/FOV.json @@ -1,6 +1,6 @@ { "$schema": "https://json-schema.org/draft-07/schema", - "$id": "FOV.json", + "$id": "/v1/FOV.json", "title": "FOV schema", "description": "FOV section of the YAML configuration file schema.", "type": "object", diff --git a/v1/detector.json b/v1/detector.json index a57a20a..20e0ab1 100644 --- a/v1/detector.json +++ b/v1/detector.json @@ -1,6 +1,6 @@ { "$schema": "https://json-schema.org/draft-07/schema", - "$id": "detector.json", + "$id": "/v1/detector.json", "title": "detector schema", "description": "Detector section of the YAML configuration file schema.", "type": "object", diff --git a/v1/main.json b/v1/main.json index 4248db7..9cbf567 100644 --- a/v1/main.json +++ b/v1/main.json @@ -1,18 +1,18 @@ { "$schema": "https://json-schema.org/draft-07/schema", - "$id": "main.json", + "$id": "/v1/main.json", "title": "Pymatcal main schema", "description": "SPEBT system response matrix generation package configuration file schema. The configuration file is a YAML file.", "type": "object", "properties": { "detector": { - "$ref": "detector.json" + "$ref": "/v1/detector.json" }, "FOV": { - "$ref": "FOV.json" + "$ref": "/v1/FOV.json" }, "relation": { - "$ref": "relation.json" + "$ref": "/v1/relation.json" } }, "required": [ diff --git a/v1/relation.json b/v1/relation.json index 140e74a..ac1fdbf 100644 --- a/v1/relation.json +++ b/v1/relation.json @@ -1,21 +1,23 @@ { "$schema": "https://json-schema.org/draft-07/schema", - "$id": "relation.json", + "$id": "/v1/relation.json", "title": "Detector to FOV relation schema", "description": "Detector to FOV relation section of the YAML configuration file schema.\n Unit of length is mm. Unit of angle is degrees.", "type": "object", "properties": { - "radial distance": { - "$ref": "transformation_data.json" + "radial shift": { + "$ref": "/v1/transformation_data.json" }, "tangential shift": { - "$ref": "transformation_data.json" - }, - "rotations": { - "$ref": "transformation_data.json" + "$ref": "/v1/transformation_data.json" + }, + "rotation": { + "$ref": "/v1/transformation_data.json" } }, "required": [ - "radial distance, rotations" + "radial shift", + "tangential shift", + "rotation" ] } \ No newline at end of file diff --git a/v1/transformation_data.json b/v1/transformation_data.json index ff0fa03..373af6d 100644 --- a/v1/transformation_data.json +++ b/v1/transformation_data.json @@ -1,6 +1,6 @@ { "$schema": "https://json-schema.org/draft-07/schema", - "$id": "transformation_data.json", + "$id": "/v1/transformation_data.json", "title": "Pymatcal transformation data schema", "description": "transformation data schema, used to define the transformation for the detector to FOV relation.", "type": "object", @@ -8,38 +8,48 @@ "format": { "type": "string", "enum": [ - "enumerate", + "list", "range" ] }, - "if": { - "properties": { - "format": { - "const": "range" - } - } + "data": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 1 }, - "then": { - "properties": { - "angles": { - "type": "array", - "items": { - "type": "number" - }, - "minItems": 3, - "maxItems": 3 - } - } + "start": { + "type": "number" + }, + "step": { + "type": "number" + }, + "N": { + "type": "number" }, - "else": { - "properties": { - "angles": { - "type": "array", - "items": { - "type": "number" - }, - "minItems": 1 - } + "properties": { + "if": { + "properties": { + "format": { + "const": "list" + } + }, + "required": [ + "format" + ] + }, + "then": { + "required": [ + "data" + ] + }, + "else": { + "required": [ + "start", + "step", + "N" + ] } } },