-
Notifications
You must be signed in to change notification settings - Fork 8
/
wf_metadata_schema.json
549 lines (546 loc) · 17.9 KB
/
wf_metadata_schema.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
{
"id": "wfmetadata-schema-uri",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Waveform Metadata Json Schema",
"description": "This schema represents Waveform Metadata characterising traces with their QC",
"type": "object",
"properties": {
"wfmetadata_id": {
"description": "Unique identifier of the metadata document. This can be a DOI, a Handle or any other type of PID",
"$ref": "#/definitions/stringLiteral",
"format": "uri"
},
"producer": {
"description": "The producer of this document. For instance it can be: a software, a person or an organization",
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/agent"
}
},
"waveform_type": {
"description": "Describes the type of waveform. E.g.: seismic, infrasound",
"$ref": "#/definitions/stringLiteral",
"additionalProperties": false
},
"waveform_format": {
"description": "Describes the waveform format. E.g.: miniSEED",
"type": {
"enum": ["miniSEED"]
},
"additionalProperties": false
},
"version": {
"description": "The version of the metadata document. E.g.: 1.0.0",
"type": {
"enum": ["1.0.0"]
},
"additionalProperties": true
},
"start_time": {
"description": "Start time of the window used for metric computation for this entry in UTC",
"$ref": "#/definitions/timeLiteral"
},
"end_time": {
"description": "End time of the window used for metric computation for this entry in UTC",
"$ref": "#/definitions/timeLiteral"
},
"network": {
"description": "Network code",
"$ref": "#/definitions/stringLiteral",
"pattern": "[A-Z0-9]{1,6}"
},
"station": {
"description": "Station code",
"$ref": "#/definitions/stringLiteral",
"pattern": "[A-Z0-9]{1,5}"
},
"channel": {
"description": "Channel code",
"$ref": "#/definitions/stringLiteral",
"pattern": "[A-Z0-9]{3}"
},
"location": {
"description": "Location code",
"$ref": "#/definitions/stringLiteral",
"pattern": "[A-Z0-9]{0,2}"
},
"quality": {
"description": "SEED quality indicator. This is SEED format specific",
"type": {
"enum": ["D", "R", "Q", "M"]
},
"additionalProperties": false
},
"sample_rate": {
"description": "Array of unique sample rates",
"type": "array",
"minItems": 1,
"items": {
"$ref": "#/definitions/positiveDouble"
},
"uniqueItems": true,
"additionalProperties": false
},
"num_samples": {
"description": "Number of data samples",
"$ref": "#/definitions/positiveInteger"
},
"encoding": {
"description": "Array of unique encodings. E.g.in SEED: int32, int64, float32, float64, opaque (for log channels).",
"type": "array",
"minItems": 1,
"items": {
"$ref": "#/definitions/stringLiteral"
},
"uniqueItems": true,
"additionalProperties": false
},
"num_records": {
"description": "Number of records. This is SEED format specific",
"$ref": "#/definitions/positiveInteger"
},
"record_length": {
"description": "Array of unique record lengths. This is SEED format specific",
"type": "array",
"minItems": 1,
"items": {
"$ref": "#/definitions/positiveInteger"
},
"uniqueItems": true,
"additionalProperties": false
},
"num_gaps": {
"description": "Number of data gaps",
"$ref": "#/definitions/positiveInteger"
},
"max_gap": {
"description": "Duration of the largest gap in seconds",
"$ref": "#/definitions/positiveDouble"
},
"num_overlaps": {
"description": "Number of data overlaps",
"$ref": "#/definitions/positiveInteger"
},
"max_overlap": {
"description": "Duration of the largest overlap in seconds",
"$ref": "#/definitions/positiveDouble"
},
"sum_gaps": {
"description": "Total duration of gaps in seconds",
"$ref": "#/definitions/positiveDouble"
},
"sum_overlaps": {
"description": "Total duration of overlaps in seconds",
"$ref": "#/definitions/positiveDouble"
},
"sample_max": {
"description": "Maximum sample value",
"$ref": "#/definitions/numberLiteral"
},
"sample_min": {
"description": "Minimum sample value",
"$ref": "#/definitions/numberLiteral"
},
"sample_mean": {
"description": "Mean of the sample values",
"$ref": "#/definitions/numberLiteral"
},
"sample_rms": {
"description": "Rms of the sample values",
"$ref": "#/definitions/positiveDouble"
},
"sample_lower_quartile": {
"description": "Lower quartile of the sample values",
"$ref": "#/definitions/numberLiteral"
},
"sample_upper_quartile": {
"description": "Upper quartile of the sample values",
"$ref": "#/definitions/numberLiteral"
},
"sample_median": {
"description": "50th percentile of the sample values",
"$ref": "#/definitions/numberLiteral"
},
"sample_stdev": {
"description": "Standard deviation of the sample values",
"$ref": "#/definitions/positiveDouble"
},
"miniseed_header_percentages": {
"type": "object",
"properties": {
"timing_correction": {
"description": "Percentage of data for which field 16 in the record header is non-zero",
"$ref": "#/definitions/numberLiteral"
},
"timing_quality_mean": {
"description": "Mean of the timing quality percentage values stored in mSEED blockettes 1001",
"$ref": "#/definitions/numberLiteral"
},
"timing_quality_min": {
"description": "Minimum of the timing quality percentage values stored in mSEED blockettes 1001",
"$ref": "#/definitions/numberLiteral"
},
"timing_quality_max": {
"description": "Maximum of the timing quality percentage values stored in mSEED blockettes 1001",
"$ref": "#/definitions/numberLiteral"
},
"timing_quality_median": {
"description": "The 50th percentile of all timing quality percentage values stored in mSEED blockettes 1001",
"$ref": "#/definitions/numberLiteral"
},
"timing_quality_lower_quartile": {
"description": "The 25th percentile of all timing quality percentage values stored in mSEED blockettes 1001",
"$ref": "#/definitions/numberLiteral"
},
"timing_quality_upper_quartile": {
"description": "The 75th percentile of all timing quality percentage values stored in mSEED blockettes 1001",
"$ref": "#/definitions/numberLiteral"
},
"data_quality_flags": {
"type": "object",
"properties": {
"amplifier_saturation": {
"description": "Percentage of data for which bit 0 in the DQ flag is set to 1",
"$ref": "#/definitions/positivePercentage"
},
"digitizer_clipping": {
"description": "Percentage of data for which bit 1 in the DQ flag is set to 1",
"$ref": "#/definitions/positivePercentage"
},
"spikes": {
"description": "Percentage of data for which bit 2 in the DQ flag is set to 1",
"$ref": "#/definitions/positivePercentage"
},
"glitches": {
"description": "Percentage of data for which bit 3 in the DQ flag is set to 1",
"$ref": "#/definitions/positivePercentage"
},
"missing_padded_data": {
"description": "Percentage of data for which bit 4 in the DQ flag is set to 1",
"$ref": "#/definitions/positivePercentage"
},
"telemetry_sync_error": {
"description": "Percentage of data for which bit 5 in the DQ flag is set to 1",
"$ref": "#/definitions/positivePercentage"
},
"digital_filter_charging": {
"description": "Percentage of data for which bit 6 in the DQ flag is set to 1",
"$ref": "#/definitions/positivePercentage"
},
"suspect_time_tag": {
"description": "Percentage of data for which bit 7 in the DQ flag is set to 1",
"$ref": "#/definitions/positivePercentage"
}
},
"required": [
"amplifier_saturation",
"digitizer_clipping",
"spikes",
"glitches",
"missing_padded_data",
"telemetry_sync_error",
"digital_filter_charging",
"suspect_time_tag"
]
},
"activity_flags": {
"type": "object",
"properties": {
"calibration_signal": {
"description": "Percentage of data for which bit 0 in the Activity flag is set to 1",
"$ref": "#/definitions/positivePercentage"
},
"time_correction_applied": {
"description": "Percentage of data for which bit 1 in the Activity flag is set to 1",
"$ref": "#/definitions/positivePercentage"
},
"event_begin": {
"description": "Percentage of data for which bit 2 in the Activity flag is set to 1",
"$ref": "#/definitions/positivePercentage"
},
"event_end": {
"description": "Percentage of data for which bit 3 in the Activity flag is set to 1",
"$ref": "#/definitions/positivePercentage"
},
"positive_leap": {
"description": "Percentage of data for which bit 4 in the Activity flag is set to 1",
"$ref": "#/definitions/positivePercentage"
},
"negative_leap": {
"description": "Percentage of data for which bit 5 in the Activity flag is set to 1",
"$ref": "#/definitions/positivePercentage"
},
"event_in_progress": {
"description": "Percentage of records for which bit 6 in the Activity flag is set to 1",
"$ref": "#/definitions/positivePercentage"
}
},
"required": [
"calibration_signal",
"time_correction_applied",
"event_begin",
"event_end",
"positive_leap",
"negative_leap",
"event_in_progress"
]
},
"io_and_clock_flags": {
"type": "object",
"properties": {
"station_volume": {
"description": "Percentage of records for which bit 0 in the I/O and Clock flag is set to 1",
"$ref": "#/definitions/positivePercentage"
},
"long_record_read": {
"description": "Percentage of records for which bit 1 in the I/O and Clock flag is set to 1",
"$ref": "#/definitions/positivePercentage"
},
"short_record_read": {
"description": "Percentage of records for which bit 2 in the I/O and Clock flag is set to 1",
"$ref": "#/definitions/positivePercentage"
},
"start_time_series": {
"description": "Percentage of records for which bit 3 in the I/O and Clock flag is set to 1",
"$ref": "#/definitions/positivePercentage"
},
"end_time_series": {
"description": "Percentage of records for which bit 4 in the I/O and Clock flag is set to 1",
"$ref": "#/definitions/positivePercentage"
},
"clock_locked": {
"description": "Percentage of records for which bit 5 in the I/O & Clock flag is set to 1",
"$ref": "#/definitions/positivePercentage"
}
},
"required": [
"station_volume",
"long_record_read",
"short_record_read",
"start_time_series",
"end_time_series",
"clock_locked"
]
}
},
"required": [
"timing_correction",
"timing_quality_mean",
"timing_quality_min",
"timing_quality_max",
"timing_quality_median",
"timing_quality_lower_quartile",
"timing_quality_upper_quartile",
"data_quality_flags",
"activity_flags",
"io_and_clock_flags"
]
},
"percent_availability": {
"description": "Percentage of available data samples",
"$ref": "#/definitions/positiveDouble"
},
"c_segments": {
"description": "Continuous segments within the requested time interval",
"type": "array",
"items": {
"type": "object",
"properties": {
"sample_rate": {
"description": "Sample rate in the continuous segment",
"$ref": "#/definitions/positiveDouble"
},
"sample_min": {
"description": "Minimum of samples in a continuous segment",
"$ref": "#/definitions/numberLiteral"
},
"sample_max": {
"description": "Maximum of samples in a continuous segment",
"$ref": "#/definitions/numberLiteral"
},
"sample_mean": {
"description": "Mean of the sample values in a continuous segment",
"$ref": "#/definitions/numberLiteral"
},
"sample_rms": {
"description": "Rms of the sample values in a continuous segment",
"$ref": "#/definitions/positiveDouble"
},
"sample_lower_quartile": {
"description": "Lower quartile of the sample values in a continuous segment",
"$ref": "#/definitions/numberLiteral"
},
"sample_upper_quartile": {
"description": "Upper quartile of the sample values in a continuous segment",
"$ref": "#/definitions/numberLiteral"
},
"sample_median": {
"description": "50th percentile of the sample values in a continuous segment",
"$ref": "#/definitions/numberLiteral"
},
"start_time": {
"description": "Time of the first sample of the segment in UTC",
"$ref": "#/definitions/timeLiteral"
},
"end_time": {
"description": "Time of the last sample of the segment in UTC",
"$ref": "#/definitions/timeLiteral"
},
"num_samples": {
"description": "Number of data samples in the continuous segment",
"$ref": "#/definitions/positiveInteger"
},
"sample_stdev": {
"description": "Standard deviation of samples in the continuous segment",
"$ref": "#/definitions/positiveDouble"
},
"segment_length": {
"description": "Length in seconds of the specific continuous segment",
"$ref": "#/definitions/numberLiteral"
}
},
"required": [
"sample_rate",
"start_time",
"end_time",
"num_samples",
"segment_length"
]
}
}
},
"definitions": {
"agent": {
"$ref": "#/definitions/entity"
},
"typedLiteral": {
"type": "object",
"properties": {
"$": {
"type": "string"
},
"type": {
"type": "string",
"format": "uri"
},
"lang": {
"type": "string"
}
},
"required": ["$"],
"additionalProperties": false
},
"stringLiteral": {
"type": "string",
"additionalProperties": false
},
"numberLiteral": {
"oneOf": [{ "type": "number" }, { "type": "null" }],
"additionalProperties": false
},
"booleanLiteral": {
"type": "boolean",
"additionalProperties": false
},
"timeLiteral": {
"type": "string",
"format": "date-time",
"additionalProperties": false
},
"literalArray": {
"type": "array",
"minItems": 1,
"items": {
"anyOf": [
{
"$ref": "#/definitions/stringLiteral"
},
{
"$ref": "#/definitions/numberLiteral"
},
{
"$ref": "#/definitions/booleanLiteral"
},
{
"$ref": "#/definitions/typedLiteral"
}
]
}
},
"attributeValues": {
"anyOf": [
{
"$ref": "#/definitions/stringLiteral"
},
{
"$ref": "#/definitions/numberLiteral"
},
{
"$ref": "#/definitions/timeLiteral"
},
{
"$ref": "#/definitions/booleanLiteral"
},
{
"$ref": "#/definitions/typedLiteral"
},
{
"$ref": "#/definitions/literalArray"
}
]
},
"entity": {
"title": "entity",
"additionalProperties": {
"$ref": "#/definitions/attributeValues"
}
},
"positiveInteger": {
"oneOf": [
{ "type": "integer", "minimum": 0, "exclusiveMinimum": false },
{ "type": "null" }
],
"additionalProperties": false
},
"positiveDouble": {
"oneOf": [
{ "type": "number", "minimum": 0, "exclusiveMinimum": false },
{ "type": "null" }
],
"additionalProperties": false
},
"positivePercentage": {
"oneOf": [
{
"type": "number",
"minimum": 0,
"maximum": 100,
"exclusiveMinimum": false,
"exclusiveMaximum": false
},
{ "type": "null" }
],
"additionalProperties": false
}
},
"required": [
"producer",
"version",
"waveform_format",
"start_time",
"end_time",
"network",
"station",
"channel",
"location",
"sample_rate",
"max_gap",
"max_overlap",
"percent_availability",
"num_samples",
"num_gaps",
"num_overlaps",
"sum_gaps",
"sum_overlaps"
]
}