Skip to content

Commit

Permalink
more change
Browse files Browse the repository at this point in the history
  • Loading branch information
kratsg committed Dec 8, 2023
1 parent 9a1a72e commit 7e73ce1
Showing 1 changed file with 53 additions and 26 deletions.
79 changes: 53 additions & 26 deletions src/pyhf/schemas/1.1.0/defs.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,25 +76,46 @@
},
"axis": {
"type": "object",
"MAKE THIS ONEOF": "",
"(A)": "",
"properties_oneof": {
"name": { "type": "string", "pattern": "^[a-zA-Z0-9_]+$" },
"max": { "type": "number" },
"min": { "type": "number" },
"nbins": { "type": "number" }
},
"(B)": "",
"properties": {
"name": { "type": "string", "pattern": "^[a-zA-Z0-9_]+$" },
"edges": { "type": "array", "items": { "type": "number", "minItems": 2 } }
}
"oneOf": [
{
"required": [ "value" ],
"properties": {
"name": { "type": "string", "pattern": "^[a-zA-Z0-9_]+$" },
"max": { "type": "number" },
"min": { "type": "number" },
"nbins": { "type": "number" }
}
},
{
"properties": {
"name": { "type": "string", "pattern": "^[a-zA-Z0-9_]+$" },
"edges": { "type": "array", "items": { "type": "number", "minItems": 2 } }
}
}
]
},
"histogram": {
"type": "object",
"properties": {
"contents": { "type": "array", "items": {"type": "number"}, "minItems": 1 }
},
"required": ["contents"],
"additionalProperties": false
},
"histogramWithErrors": {
"type": "object",
"properties": {
"contents": { "type": "array", "items": {"type": "number"}, "minItems": 1 },
"errors": { "type": "array", "items": {"type": "number"}, "minItems": 1 }
},
"required": ["contents"],
"additionalProperties": false
},
"sample": {
"type": "object",
"properties": {
"name": { "type": "string" },
"data": { "type": "object", "properties": { "contents": { "type": "array", "items": {"type": "number"}, "minItems": 1 }} },
"data": { "type": "object", "$ref": "#/definitions/histogramWithErrors" },
"modifiers": {
"type": "array",
"items": {
Expand Down Expand Up @@ -122,12 +143,13 @@
"data": {
"type": "object",
"properties": {
"lo_data": { "type": "array", "items": {"type": "number"}, "minItems": 1 },
"hi_data": { "type": "array", "items": {"type": "number"}, "minItems": 1 }
"lo": { "type": "object", "$ref": "#/definitions/histogram" },
"hi": { "type": "object", "$ref": "#/definitions/histogram" }
},
"required": ["lo_data", "hi_data"],
"additionalProperties": false
}
},
"parameter": { "type": "string" }
},
"required": ["name", "type", "data"],
"additionalProperties": false
Expand All @@ -137,7 +159,8 @@
"properties": {
"name": { "const": "lumi" },
"type": { "const": "lumi" },
"data": { "type": "null" }
"data": { "type": "null" },
"parameter": { "type": "string" }
},
"required": ["name", "type", "data"],
"additionalProperties": false
Expand All @@ -147,9 +170,10 @@
"properties": {
"name": { "type": "string" },
"type": { "const": "normfactor" },
"data": { "type": "null" }
"data": { "type": "null" },
"parameter": { "type": "string" }
},
"required": ["name", "type", "data"],
"required": ["name", "type"],
"additionalProperties": false
},
"normsys": {
Expand All @@ -165,7 +189,8 @@
},
"required": ["lo", "hi"],
"additionalProperties": false
}
},
"parameter": { "type": "string" }
},
"required": ["name", "type", "data"],
"additionalProperties": false
Expand All @@ -175,17 +200,19 @@
"properties": {
"name": { "type": "string" },
"type": { "const": "shapefactor" },
"data": { "type": "null" }
"data": { "type": "null" },
"parameters": { "type": "array", "items": { "type": "string" }}
},
"required": ["name", "type", "data"],
"required": ["name", "type"],
"additionalProperties": false
},
"shapesys": {
"type": "object",
"properties": {
"name": { "type": "string" },
"type": { "const": "shapesys" },
"data": { "type": "array", "items": {"type": "number"}, "minItems": 1 }
"data": { "type": "object", "$ref": "#/definitions/histogram" },
"parameters": { "type": "array", "items": { "type": "string" }}
},
"required": ["name", "type", "data"],
"additionalProperties": false
Expand All @@ -195,9 +222,9 @@
"properties": {
"name": { "type": "string" },
"type": { "const": "staterror" },
"data": { "type": "array", "items": {"type": "number"}, "minItems": 1 }
"parameters": { "type": "array", "items": { "type": "string" }}
},
"required": ["name", "type", "data"],
"required": ["name", "type"],
"additionalProperties": false
}
},
Expand Down

0 comments on commit 7e73ce1

Please sign in to comment.