{
	"$schema": "http://json-schema.org/draft-04/schema#",
	"title": "Receiver Internals",
	"description": "Receiver Internals",
	"definitions": {
		"fp": {
			"type": "object",
			"description": "Fingerprint values",
			"properties": {
				"s": {
					"type": "array",
					"items": {
						"type": "array",
						"items": {
							"type": "number"
						},
						"minItems": 1,
						"maxItems": 4096
					},
					"minItems": 1,
					"maxItems": 256
				},
				"w": {
					"type": "array",
					"items": {
						"type": "array",
						"items": {
							"type": "number"
						},
						"minItems": 5,
						"maxItems": 5
					},
					"minItems": 1,
					"maxItems": 256
				}
			},
			"required": [
				"s",
				"w"
			]
		},
		"fp_table": {
			"type": "object",
			"desription": "scanner internal data",
			"properties": {
				"ch": {
					"type": "integer",
					"min": 0,
					"max": 255,
					"description": "channel number"
				},
				"tc": {
					"type": "integer",
					"min": 0,
					"max": 255,
					"description": "table data type code"
				},
				"nx": {
					"type": "integer",
					"min": 1,
					"max": 2048,
					"description": "number of x entries"
				},
				"ny": {
					"type": "integer",
					"min": 1,
					"max": 2048,
					"description": "number of y entries"
				},
				"tv": {
					"type": "array",
					"minItems": 1,
					"maxItems": 2048,
					"items": {
						"oneOf": [
							{
								"$ref": "#/definitions/fp_table_row"
							},
							{
								"type": "number"
							}
						]
					}
				}
			},
			"required": [
				"ch",
				"tc",
				"nx",
				"ny",
				"tv"
			]
		},
		"fp_table_row": {
			"type": "array",
			"minItems": 1,
			"maxItems": 2048,
			"items": {
				"type": "number"
			}
		}
	},
	"type": "object",
	"properties": {
		"nt": {
			"type": "integer",
			"minimum": 0,
			"maximum": 255,
			"description": "Number of traces"
		},
		"ns": {
			"type": "integer",
			"minimum": 0,
			"maximum": 4095,
			"description": "Number of samples"
		},
		"sr": {
			"type": "number",
			"minimum": 0,
			"exclusiveMinimum": true,
			"description": "Sample rate [Hz]"
		},
		"mw": {
			"type": "number",
			"minimum": 0,
			"maximum": 4095,
			"exclusiveMinimum": true,
			"description": "Maximum weight"
		},
		"si": {
			"type": "number",
			"minimum": 0,
			"maximum": 255,
			"description": "Start index (hw_start)"
		},
		"a": {
			"type": "array",
			"items": {
				"type": "number"
			},
			"minItems": 1,
			"maxItems": 256,
			"description": "Amplitude [dB]"
		},
		"t": {
			"type": "object",
			"patternProperties": {
				"^[0-9]+$": {
					"description": "one field per channel, field name is channel index",
					"$ref": "#/definitions/fp"
				}
			},
			"additionalProperties": false
		},
		"ex": {
			"type": "object",
			"description": "DEPRECATED, use 'riegl.exponential_decomposition' instead"
		},
		"tbl": {
			"type": "array",
			"items": {
				"$ref": "#/definitions/fp_table"
			},
			"minItems": 1,
			"description": "various internal data"
		}
	}
}