|
41 | 41 | }
|
42 | 42 | },
|
43 | 43 | "$defs": {
|
| 44 | + "data_array": { |
| 45 | + "oneOf": [ |
| 46 | + { |
| 47 | + "type": "string", |
| 48 | + "description": "A path (URI?) to the floating point bin data; outer dimension is [∑weights, ∑weights², value, variance]" |
| 49 | + }, |
| 50 | + { |
| 51 | + "type": "array", |
| 52 | + "items": { "type": "number" } |
| 53 | + } |
| 54 | + ] |
| 55 | + }, |
44 | 56 | "regular_axis": {
|
45 | 57 | "type": "object",
|
46 | 58 | "description": "An evenly spaced set of continuous bins.",
|
|
169 | 181 | "int_storage": {
|
170 | 182 | "type": "object",
|
171 | 183 | "description": "A storage holding integer counts.",
|
172 |
| - "required": ["type", "data"], |
| 184 | + "required": ["type", "values"], |
173 | 185 | "additionalProperties": false,
|
174 | 186 | "properties": {
|
175 | 187 | "type": { "type": "string", "const": "int" },
|
176 |
| - "data": { |
177 |
| - "oneOf": [ |
178 |
| - { |
179 |
| - "type": "string", |
180 |
| - "description": "A path (URI?) to the integer bin data." |
181 |
| - }, |
182 |
| - { "type": "array", "items": { "type": "integer" } } |
183 |
| - ] |
184 |
| - } |
| 188 | + "values": { "$ref": "#/$defs/data_array" } |
185 | 189 | }
|
186 | 190 | },
|
187 | 191 | "double_storage": {
|
188 | 192 | "type": "object",
|
189 | 193 | "description": "A storage holding floating point counts.",
|
190 |
| - "required": ["type", "data"], |
| 194 | + "required": ["type", "values"], |
191 | 195 | "additionalProperties": false,
|
192 | 196 | "properties": {
|
193 | 197 | "type": { "type": "string", "const": "double" },
|
194 |
| - "data": { |
195 |
| - "oneOf": [ |
196 |
| - { |
197 |
| - "type": "string", |
198 |
| - "description": "A path (URI?) to the floating point bin data." |
199 |
| - }, |
200 |
| - { "type": "array", "items": { "type": "number" } } |
201 |
| - ] |
202 |
| - } |
| 198 | + "values": { "$ref": "#/$defs/data_array" } |
203 | 199 | }
|
204 | 200 | },
|
205 | 201 | "weighted_storage": {
|
206 | 202 | "type": "object",
|
207 | 203 | "description": "A storage holding floating point counts and variances.",
|
208 |
| - "required": ["type", "data"], |
| 204 | + "required": ["type", "values", "variances"], |
209 | 205 | "additionalProperties": false,
|
210 | 206 | "properties": {
|
211 | 207 | "type": { "type": "string", "const": "weighted" },
|
212 |
| - "data": { |
213 |
| - "oneOf": [ |
214 |
| - { |
215 |
| - "type": "string", |
216 |
| - "description": "A path (URI?) to the floating point bin data; outer dimension is [value, variance]" |
217 |
| - }, |
218 |
| - { |
219 |
| - "type": "object", |
220 |
| - "required": ["values", "variances"], |
221 |
| - "additionalProperties": false, |
222 |
| - "properties": { |
223 |
| - "values": { "type": "array", "items": { "type": "number" } }, |
224 |
| - "variances": { "type": "array", "items": { "type": "number" } } |
225 |
| - } |
226 |
| - } |
227 |
| - ] |
228 |
| - } |
| 208 | + "values": { "$ref": "#/$defs/data_array" }, |
| 209 | + "variances": { "$ref": "#/$defs/data_array" } |
229 | 210 | }
|
230 | 211 | },
|
231 | 212 | "mean_storage": {
|
232 | 213 | "type": "object",
|
233 | 214 | "description": "A storage holding 'profile'-style floating point counts, values, and variances.",
|
234 |
| - "required": ["type", "data"], |
| 215 | + "required": ["type", "counts", "values", "variances"], |
235 | 216 | "additionalProperties": false,
|
236 | 217 | "properties": {
|
237 | 218 | "type": { "type": "string", "const": "mean" },
|
238 |
| - "data": { |
239 |
| - "oneOf": [ |
240 |
| - { |
241 |
| - "type": "string", |
242 |
| - "description": "A path (URI?) to the floating point bin data; outer dimension is [counts, value, variance]" |
243 |
| - }, |
244 |
| - { |
245 |
| - "type": "object", |
246 |
| - "required": ["counts", "values", "variances"], |
247 |
| - "additionalProperties": false, |
248 |
| - "properties": { |
249 |
| - "counts": { "type": "array", "items": { "type": "number" } }, |
250 |
| - "values": { "type": "array", "items": { "type": "number" } }, |
251 |
| - "variances": { "type": "array", "items": { "type": "number" } } |
252 |
| - } |
253 |
| - } |
254 |
| - ] |
255 |
| - } |
| 219 | + "counts": { "$ref": "#/$defs/data_array" }, |
| 220 | + "values": { "$ref": "#/$defs/data_array" }, |
| 221 | + "variances": { "$ref": "#/$defs/data_array" } |
256 | 222 | }
|
257 | 223 | },
|
258 | 224 | "weighted_mean_storage": {
|
259 | 225 | "type": "object",
|
260 | 226 | "description": "A storage holding 'profile'-style floating point ∑weights, ∑weights², values, and variances.",
|
261 |
| - "required": ["type", "data"], |
| 227 | + "required": [ |
| 228 | + "type", |
| 229 | + "sum_of_weights", |
| 230 | + "sum_of_weights_squared", |
| 231 | + "values", |
| 232 | + "variances" |
| 233 | + ], |
262 | 234 | "additionalProperties": false,
|
263 | 235 | "properties": {
|
264 | 236 | "type": { "type": "string", "const": "weighted_mean" },
|
265 |
| - "data": { |
266 |
| - "oneOf": [ |
267 |
| - { |
268 |
| - "type": "string", |
269 |
| - "description": "A path (URI?) to the floating point bin data; outer dimension is [∑weights, ∑weights², value, variance]" |
270 |
| - }, |
271 |
| - { |
272 |
| - "type": "object", |
273 |
| - "required": [ |
274 |
| - "sum_of_weights", |
275 |
| - "sum_of_weights_squared", |
276 |
| - "values", |
277 |
| - "variances" |
278 |
| - ], |
279 |
| - "additionalProperties": false, |
280 |
| - "properties": { |
281 |
| - "sum_of_weights": { |
282 |
| - "type": "array", |
283 |
| - "items": { "type": "number" } |
284 |
| - }, |
285 |
| - "sum_of_weights_squared": { |
286 |
| - "type": "array", |
287 |
| - "items": { "type": "number" } |
288 |
| - }, |
289 |
| - "values": { "type": "array", "items": { "type": "number" } }, |
290 |
| - "variances": { "type": "array", "items": { "type": "number" } } |
291 |
| - } |
292 |
| - } |
293 |
| - ] |
294 |
| - } |
| 237 | + "sum_of_weights": { "$ref": "#/$defs/data_array" }, |
| 238 | + "sum_of_weights_squared": { "$ref": "#/$defs/data_array" }, |
| 239 | + "values": { "$ref": "#/$defs/data_array" }, |
| 240 | + "variances": { "$ref": "#/$defs/data_array" } |
295 | 241 | }
|
296 | 242 | }
|
297 | 243 | }
|
|
0 commit comments