anss-formats 0.0.2__tar.gz → 0.0.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,561 @@
1
+ Metadata-Version: 2.4
2
+ Name: anss-formats
3
+ Version: 0.0.4
4
+ Summary: Python implementation of the library used to communicate seismic event detection information between systems
5
+ License: CC0-1.0
6
+ Keywords: anss,earthquakes,formats,detection
7
+ Author: John Patton
8
+ Author-email: jpatton@usgs.gov
9
+ Requires-Python: >3.9.1,<3.12
10
+ Classifier: License :: CC0 1.0 Universal (CC0 1.0) Public Domain Dedication
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Programming Language :: Python :: 3.10
13
+ Classifier: Programming Language :: Python :: 3.11
14
+ Provides-Extra: pycurl
15
+ Requires-Dist: certifi (>=2024.07.04,<2025.0.0)
16
+ Requires-Dist: cryptography (>=44.0.1,<45.0.0)
17
+ Requires-Dist: docutils (!=0.21.post1)
18
+ Requires-Dist: dparse (>=0.6.2,<0.7.0)
19
+ Requires-Dist: pydantic (>=2.6.0,<3.0.0)
20
+ Requires-Dist: requests (>=2.32.2,<3.0.0)
21
+ Requires-Dist: twine (>=5.1.1,<6.0.0)
22
+ Project-URL: Homepage, https://gitlab.com/anss-netops/anss-data-formats
23
+ Project-URL: Repository, https://gitlab.com/anss-netops/anss-data-formats
24
+ Description-Content-Type: text/markdown
25
+
26
+ # ANSS Data Formats
27
+ The US Geological Survey (USGS) Advanced National Seismic System (ANSS) defines a number of data exchange formats to communicate seismic event detection information between processing systems. These formats are defined using objects as defined in the [JSON standard](http://www.json.org).
28
+
29
+ The purpose of this project is to:
30
+
31
+ 1. Define formats to hold data representing the estimates of various types of
32
+ seismic event detections.
33
+ 2. Store the format definitions in a source controlled manner.
34
+ 3. Host libraries used to generate, parse, and validate the formats
35
+
36
+ ## Defined formats:
37
+
38
+ * [Pick](format-docs/Pick.md) Format - A format for unassociated picks from a waveform arrival time picking algorithm.
39
+
40
+ ## Supporting format objects:
41
+
42
+ * [Amplitude](format-docs/Amplitude.md) Object - An object that contains information about an amplitude as part of a pick.
43
+ * [Beam](format-docs/Beam.md) Object - An object that contains information about a waveform beam as part of a pick.
44
+ * [Associated](format-docs/Associated.md) Object - An object that contains associated information if a pick is included in a detection.
45
+ * [Filter](format-docs/Filter.md) Object - An object that contains filter information as part of a pick.
46
+ * [Site](format-docs/Site.md) Object - An object that defines the station used to create a pick.
47
+ * [Source](format-docs/Source.md) Object - An object that defines the creator/source of a pick.
48
+ * [Quality](format-docs/Quality.md) Object - An object that defines the data quality of a pick.
49
+ * [MachineLearning](format-docs/MachineLearning.md) Object - An object that defines the machine learning information for a pick.
50
+ * [EventType](format-docs/EventType.md) Object - An object that defines the event type for MachineLearning info.
51
+
52
+ # Amplitude Object Specification
53
+
54
+ ## Description
55
+
56
+ The Amplitude object is an object designed to encode the amplitude information
57
+ that may or may not be part of the [Pick](Pick.md) Format. Amplitude uses the
58
+ [JSON standard](http://www.json.org).
59
+
60
+ ## Usage
61
+
62
+ The Amplitude object is intended for use as part of the [Pick](Pick.md) Format
63
+ in seismic data messaging between seismic applications and organizations.
64
+
65
+ ## Output
66
+
67
+ ```json
68
+ {
69
+ "amplitude" : Number,
70
+ "period" : Number,
71
+ "snr" : Number
72
+ }
73
+ ```
74
+
75
+ ## Glossary
76
+
77
+ **Optional Values:**
78
+
79
+ The following are values that **may or may not** be provided as part of an
80
+ amplitude.
81
+
82
+ * amplitude - A decimal number containing the amplitude.
83
+ * period - A decimal number containing the amplitude period.
84
+ * snr - A decimal number containing the signal to noise ratio, capped at 1E9.
85
+
86
+ # Association Object Specification
87
+
88
+ ## Description
89
+
90
+ The Association object is an object designed to encode information provided when
91
+ a [Pick](Pick.md). Association uses the [JSON standard](http://www.json.org).
92
+
93
+ ## Usage
94
+
95
+ Association is intended for use as part of the [Pick](Pick.md) Format in seismic data messaging between seismic applications and organizations.
96
+
97
+ ## Output
98
+
99
+ ```json
100
+ {
101
+ "phase" : String,
102
+ "distance" : Number,
103
+ "azimuth" : Number,
104
+ "residual" : Number,
105
+ "sigma" : Number
106
+ }
107
+ ```
108
+
109
+ ## Glossary
110
+
111
+ **Optional Values:**
112
+
113
+ The following are values that **may or may not** be provided as part of
114
+ association.
115
+
116
+ * phase - A string that identifies the seismic phase for this data if Association.
117
+ * distance - A decimal number containing the distance in degrees between the detection's and data's locations if Association.
118
+ * azimuth - A decimal number containing the azimuth in degrees between the detection's and data's locations if Association.
119
+ * residual - A decimal number containing residual in seconds of the data if Association.
120
+ * sigma - A decimal number reflecting the number of standard deviations of the data from the calculated value if Association.
121
+
122
+ # Beam Object Specification
123
+
124
+ ## Description
125
+
126
+ The Beam object is an object designed to encode waveform beam information
127
+ that may or may not be part of the [Pick](Pick.md) Format. Beam uses the
128
+ [JSON standard](http://www.json.org).
129
+
130
+ ## Usage
131
+
132
+ The Beam object is intended for use as part of the [Pick](Pick.md) Format
133
+ in seismic data messaging between seismic applications and organizations.
134
+
135
+ ## Output
136
+
137
+ ```json
138
+ {
139
+ "backAzimuth" : Number,
140
+ "backAzimuthError" : Number,
141
+ "slowness" : Number,
142
+ "slownessError" : Number,
143
+ "powerRatio" : Number,
144
+ "powerRatioError" : Number
145
+ }
146
+ ```
147
+
148
+ ## Glossary
149
+
150
+ **Required Values:**
151
+
152
+ These are the values **required** to define a beam.
153
+
154
+ * backAzimuth - A decimal number containing the back azimuth.
155
+ * slowness - A decimal number containing the horizontal slowness.
156
+
157
+ **Optional Values:**
158
+
159
+ The following are supplementary values that **may or may not** be provided by
160
+ various algorithms.
161
+
162
+ * backAzimuthError - A decimal number containing the back azimuth error.
163
+ * slownessError - A decimal number containing the horizontal slowness error.
164
+ * powerRatio - A decimal number containing the power ratio.
165
+ * powerRatioError - A decimal number containing the power ratio error.
166
+
167
+ # Site Object Specification
168
+
169
+ ## Description
170
+
171
+ The Site object is an object designed to define the seismic station used to
172
+ produce a [Pick](Pick.md) message. Site uses the [JSON](https://www.json.org) and [GeoJSON](https://geojson.org/) standards.
173
+
174
+ ## Usage
175
+
176
+ Site is intended for use as part of the [Pick](Pick.md) Format in seismic data
177
+ messaging between seismic applications and organizations.
178
+
179
+ ## Output
180
+
181
+ ```json
182
+ {
183
+ "type": "Feature",
184
+ "geometry": {
185
+ "type": "Point",
186
+ "coordinates": [125.6, 10.1]
187
+ },
188
+ "properties": {
189
+ "Station" : String,
190
+ "Channel" : String,
191
+ "Network" : String,
192
+ "Location" : String
193
+ }
194
+ }
195
+ ```
196
+
197
+ ## Glossary
198
+
199
+ **Required Values:**
200
+
201
+ These are the properties **required** to define a Site.
202
+
203
+ * type - A string indicating the geojson feature type
204
+ * geometry - A geojson point containing the station coordinates in the form [Latitude, Longitude, Elevation (in meters)]
205
+ * station - A string the station code.
206
+ * network - A string containing network code.
207
+
208
+ **Optional Values:**
209
+
210
+ The following are supplementary properties that **may or may not** be provided as
211
+ part of a Site.
212
+
213
+ * channel - A string containing the channel code.
214
+ * location - A string containing the location code.
215
+
216
+ # EventType Object Specification
217
+
218
+ ## Description
219
+
220
+ The EventType object is an object designed to define the originating seismic
221
+ organization that produced a [MachineLearning](MachineLearning.md) object.
222
+ Site uses the [JSON standard](http://www.json.org).
223
+
224
+ ## Usage
225
+
226
+ EventType is intended for use as part of the [PicMachineLearningk](MachineLearning.md) Oject in seismic data
227
+ messaging between seismic applications and organizations.
228
+
229
+ ## Output
230
+
231
+ ```json
232
+ {
233
+ "type" : String,
234
+ "certainty" : String
235
+ }
236
+ ```
237
+
238
+ ## Glossary
239
+
240
+ **Required Values:**
241
+
242
+ These are the values **required** to define a EventType
243
+
244
+ * type - A string containing the event type, allowed type strings are: "Earthquake", "MineCollapse", "NuclearExplosion", "QuarryBlast", "InducedOrTriggered", "RockBurst", "FluidInjection", "IceQuake", and "VolcanicEruption"
245
+
246
+ **Optional Values:**
247
+
248
+ The following are values that **may or may not** be provided as part of EventType.
249
+
250
+ * certainty - A string containing the certainty of the event type; allowed strings are "Suspected" and "Confirmed"
251
+
252
+ # Filter Object Specification
253
+
254
+ ## Description
255
+
256
+ The Filter object is an object designed to encode a single set of filter
257
+ frequencies that may or may not be part of the filter list in the [Pick](Pick.md)
258
+ Format. Filter uses the [JSON standard](http://www.json.org) .
259
+
260
+ ## Usage
261
+
262
+ The Filter object is intended for use as part of the [Pick](Pick.md) Format
263
+ in seismic data messaging between seismic applications and organizations.
264
+
265
+ ## Output
266
+
267
+ ```json
268
+ {
269
+ "type" : String,
270
+ "highPass" : Number,
271
+ "lowPass" : Number,
272
+ "units" : String
273
+ }
274
+ ```
275
+
276
+ ## Glossary
277
+
278
+ **Optional Values:**
279
+
280
+ The following are values that **may or may not** be provided as part of a filter.
281
+
282
+ * type - A string containing the type of filter
283
+ * highPass - A decimal number containing the high pass frequency in Hz.
284
+ * lowPass - A decimal number containing the low pass frequency in Hz.
285
+ * units - A string containing the filter frequency units.
286
+
287
+ Note: The Type of filter is assumed to be "BandPass", and the Units are assumed
288
+ to be "Hertz"
289
+
290
+ # MachineLearning Object Specification
291
+
292
+ ## Description
293
+
294
+ The MachineLearning object is an object designed to encode value added
295
+ information available for a [Pick](Pick.md) from advanced algorithms such as
296
+ machine learning. MachineLearning uses the [JSON standard](http://www.json.org).
297
+
298
+ ## Usage
299
+
300
+ MachineLearning is intended for use as part of the [Pick](Pick.md) Format in
301
+ seismic data messaging between seismic
302
+ applications and organizations.
303
+
304
+ ## Output
305
+
306
+ ```json
307
+ {
308
+ "phase" : String,
309
+ "phaseProbability" : Number,
310
+ "distance" : Number,
311
+ "distanceProbability" : Number,
312
+ "distanceRangeHalfWidth" : Number,
313
+ "distanceRangeSigma" : Number,
314
+ "backAzimuth" : Number,
315
+ "backAzimuthProbability" : Number,
316
+ "magnitude" : Number,
317
+ "magnitudeType" : String,
318
+ "magnitudeProbability" : Number,
319
+ "depth" : Number,
320
+ "depthProbability" : Number,
321
+ "eventType" :
322
+ {
323
+ "type" : String,
324
+ "certainty" : String
325
+ },
326
+ "eventTypeProbability" : Number,
327
+ "repickShift" : Number,
328
+ "repickSTD" : Number,
329
+ "repickCredibleIntervalLower" : Number,
330
+ "repickCredibleIntervalUpper" : Number,
331
+ "source" :
332
+ {
333
+ "agencyID" : String,
334
+ "author" : String
335
+ }
336
+ }
337
+ ```
338
+
339
+ ## Glossary
340
+
341
+ **Optional Values:**
342
+
343
+ The following are values that **may or may not** be provided as part of MachineLearning.
344
+
345
+ * phase - A string that identifies the seismic phase for this data
346
+ * phaseProbability - A decimal number containing the probability of the phase identification
347
+ * distance - A decimal number containing a distance estimation in degrees
348
+ * distanceProbability - A decimal number containing the probability of the distance estimation
349
+ * distanceRangeHalfWidth - A decimal number containing the half-width of a distance range centered at Distance (e.g. Distance is 15 deg +/- 10 deg)
350
+ * distanceRangeSigma - A decimal number containing the standard deviation for a probability PDF curve for Distance (e.g. Distance is 15 deg +/- 3 * DistanceRangeSigma where DistanceProbability is modified by the PDF probability, lowering as it gets further from Distance ). DistanceRangeSigma is mutually exclusive of DistanceRangeHalfWidth, and if both are provided DistanceRangeSigma should be used.
351
+ * backAzimuth - A decimal number containing a backazimuth estimation in degrees
352
+ * backAzimuthProbability - A decimal number containing the probability of the backazimuth estimation
353
+ * magnitude - A decimal number containing the magnitude estimation
354
+ * magnitudeType - A string that identifies the magnitude type
355
+ * magnitudeProbability - A decimal number containing the probability of the magnitude estimation
356
+ * depth - A decimal number containing a depth estimation in kilometers
357
+ * depthProbability - A decimal number containing the probability of the depth estimation
358
+ * eventType - An object containing the event type, see [EventType](EventType.md).
359
+ * eventTypeProbability - A decimal number containing the probability of the event type estimation
360
+ * repickShift - A decimal number containing the repick shift in seconds (to regenerate the initial Pick.Time, subtract this value from the current Pick.Time)
361
+ * repickSTD - A decimal number containing the repick shift standard deviation
362
+ * repickCredibleIntervalLower - A decimal number containing the repick shift credible interval lower
363
+ * repickCredibleIntervalUpper - A decimal number containing the repick shift credible interval upper
364
+ * source - An object containing the source of the MachineLearning, see [Source](Source.md).
365
+
366
+ # Pick Format Specification
367
+
368
+ ## Description
369
+
370
+ Pick is a format designed to encode the basic information of an unassociated
371
+ waveform arrival time pick. Pick uses the
372
+ [JSON standard](http://www.json.org).
373
+
374
+ ## Usage
375
+ Pick is intended for use in seismic data messaging between seismic
376
+ applications and organizations.
377
+
378
+ ## Output
379
+
380
+ ```json
381
+ {
382
+ "type" : "Pick",
383
+ "id" : String,
384
+ "channel" :
385
+ {
386
+ "type": "Feature",
387
+ "geometry": {
388
+ "type": "Point",
389
+ "coordinates": [125.6, 10.1, 1589.0]
390
+ },
391
+ "properties": {
392
+ "station" : String,
393
+ "channel" : String,
394
+ "network" : String,
395
+ "location" : String
396
+ }
397
+ },
398
+ "time" : ISO8601,
399
+ "source" :
400
+ {
401
+ "agencyID" : String,
402
+ "author" : String
403
+ },
404
+ "phase" : String,
405
+ "polarity" : ("up" | "down"),
406
+ "onset" : ("impulsive" | "emergent" | "questionable"),
407
+ "pickerType" : ("manual" | "raypicker" | "filterpicker" | "earthworm" | "other"),
408
+ "filterInfo" : [ {
409
+ "type" : String,
410
+ "highPass" : Number,
411
+ "lowPass" : Number,
412
+ "units" : String
413
+ }, ...],
414
+ "amplitudeInfo" :
415
+ {
416
+ "value" : Number,
417
+ "period" : Number,
418
+ "snr" : Number
419
+ },
420
+ "beamInfo" :
421
+ {
422
+ "backAzimuth" : Number,
423
+ "backAzimuthError" : Number,
424
+ "slowness" : Number,
425
+ "slownessError" : Number,
426
+ "powerRatio" : Number,
427
+ "powerRatioError" : Number,
428
+ },
429
+ "associationInfo" :
430
+ {
431
+ "phase" : String,
432
+ "distance" : Number,
433
+ "azimuth" : Number,
434
+ "residual" : Number,
435
+ "sigma" : Number
436
+ },
437
+ "qualityInfo" : [ {
438
+ "standard": String,
439
+ "value": Number
440
+ }, ...],
441
+ "machineLearningInfo" :
442
+ {
443
+ "phase" : String,
444
+ "phaseProbability" : Number,
445
+ "distance" : Number,
446
+ "distanceProbability" : Number,
447
+ "distanceRangeHalfWidth" : Number,
448
+ "distanceRangeSigma" : Number,
449
+ "backAzimuth" : Number,
450
+ "backAzimuthProbability" : Number,
451
+ "magnitude" : Number,
452
+ "magnitudeType" : String,
453
+ "magnitudeProbability" : Number,
454
+ "depth" : Number,
455
+ "depthProbability" : Number,
456
+ "eventType" : {
457
+ "type" : String,
458
+ "certainty" : String
459
+ },
460
+ "eventTypeProbability" : Number,
461
+ "repickShift" : Number,
462
+ "repickSTD" : Number,
463
+ "repickCredibleIntervalLower" : Number,
464
+ "repickCredibleIntervalUpper" : Number,
465
+ "source" : {
466
+ "agencyID" : String,
467
+ "author" : String
468
+ }
469
+ }
470
+ }
471
+ ```
472
+
473
+ ## Glossary
474
+
475
+ **Required Values:**
476
+
477
+ These are the values **required** to define a pick.
478
+
479
+ * type - A string that identifies this message as a pick.
480
+ * id - A string containing an unique identifier for this pick.
481
+ * channel - A GeoJSON object containing the channel the pick was made at, see [Channel](Channel.md).
482
+ * source - An object containing the source of the pick, see [Source](Source.md).
483
+ * time - A string containing the UTC arrival time of the phase that was picked, in the ISO8601 format `YYYY-MM-DDTHH:MM:SS.SSSZ`.
484
+
485
+ **Optional Values:**
486
+
487
+ The following are supplementary values that **may or may not** be provided by
488
+ various picking algorithms.
489
+
490
+ * phase - A string that identifies the seismic phase that was picked.
491
+ * polarity - A string containing the phase polarity; "up" or "down".
492
+ * onset - A string containing the phase onset; "impulsive", "emergent", or "questionable" .
493
+ * pickerType - A string describing the type of picker; "manual", "raypicker", "filterpicker", "earthworm", or "other".
494
+ * filter - An array of objects containing the filter frequencies when the pick was made, see [Filter](Filter.md).
495
+ * amplitude - An object containing the amplitude associated with the pick, see [Amplitude](Amplitude.md).
496
+ * beam - An object containing the waveform beam information associated with the pick, see [Beam](Beam.md).
497
+ * associationInfo - An object containing the association information if this pick is used as data in a Detection, see [Associated](Associated.md).
498
+ * machineLearningInfo - An object containing the machine learning information of this pick, see [MachineLearning](MachineLearning.md).
499
+ * qualityInfo - An array of objects containing the containing the quality metric information for this pick, see [Quality](Quality.md).
500
+
501
+ # Quality Object Specification
502
+
503
+ ## Description
504
+
505
+ The Quality object is an object designed to hold data quality for a [Pick](Pick.md) message.
506
+ Site uses the [JSON standard](http://www.json.org).
507
+
508
+ ## Usage
509
+
510
+ Quality is intended for use as part of the [Pick](Pick.md) Format in seismic data
511
+ messaging between seismic applications and organizations.
512
+
513
+ ## Output
514
+
515
+ ```json
516
+ {
517
+ "standard": String,
518
+ "value": Number
519
+ }
520
+ ```
521
+
522
+ ## Glossary
523
+
524
+ **Required Values:**
525
+
526
+ These are the values **required** to define a Quality
527
+
528
+ * standard - A string containing the name of the quality standard.
529
+ * value - A string containing numarical value of the quality standard.
530
+
531
+ # Source Object Specification
532
+
533
+ ## Description
534
+
535
+ The Source object is an object designed to define the originating seismic
536
+ organization that produced a [Pick](Pick.md) message.
537
+ Site uses the [JSON standard](http://www.json.org).
538
+
539
+ ## Usage
540
+
541
+ Source is intended for use as part of the [Pick](Pick.md) Format in seismic data
542
+ messaging between seismic applications and organizations.
543
+
544
+ ## Output
545
+
546
+ ```json
547
+ {
548
+ "agencyID" : String,
549
+ "author" : String
550
+ }
551
+ ```
552
+
553
+ ## Glossary
554
+
555
+ **Required Values:**
556
+
557
+ These are the values **required** to define a Source
558
+
559
+ * agencyID - A string containing the originating agency FDSN ID.
560
+ * author - A string containing the source author.
561
+
@@ -0,0 +1,535 @@
1
+ # ANSS Data Formats
2
+ The US Geological Survey (USGS) Advanced National Seismic System (ANSS) defines a number of data exchange formats to communicate seismic event detection information between processing systems. These formats are defined using objects as defined in the [JSON standard](http://www.json.org).
3
+
4
+ The purpose of this project is to:
5
+
6
+ 1. Define formats to hold data representing the estimates of various types of
7
+ seismic event detections.
8
+ 2. Store the format definitions in a source controlled manner.
9
+ 3. Host libraries used to generate, parse, and validate the formats
10
+
11
+ ## Defined formats:
12
+
13
+ * [Pick](format-docs/Pick.md) Format - A format for unassociated picks from a waveform arrival time picking algorithm.
14
+
15
+ ## Supporting format objects:
16
+
17
+ * [Amplitude](format-docs/Amplitude.md) Object - An object that contains information about an amplitude as part of a pick.
18
+ * [Beam](format-docs/Beam.md) Object - An object that contains information about a waveform beam as part of a pick.
19
+ * [Associated](format-docs/Associated.md) Object - An object that contains associated information if a pick is included in a detection.
20
+ * [Filter](format-docs/Filter.md) Object - An object that contains filter information as part of a pick.
21
+ * [Site](format-docs/Site.md) Object - An object that defines the station used to create a pick.
22
+ * [Source](format-docs/Source.md) Object - An object that defines the creator/source of a pick.
23
+ * [Quality](format-docs/Quality.md) Object - An object that defines the data quality of a pick.
24
+ * [MachineLearning](format-docs/MachineLearning.md) Object - An object that defines the machine learning information for a pick.
25
+ * [EventType](format-docs/EventType.md) Object - An object that defines the event type for MachineLearning info.
26
+
27
+ # Amplitude Object Specification
28
+
29
+ ## Description
30
+
31
+ The Amplitude object is an object designed to encode the amplitude information
32
+ that may or may not be part of the [Pick](Pick.md) Format. Amplitude uses the
33
+ [JSON standard](http://www.json.org).
34
+
35
+ ## Usage
36
+
37
+ The Amplitude object is intended for use as part of the [Pick](Pick.md) Format
38
+ in seismic data messaging between seismic applications and organizations.
39
+
40
+ ## Output
41
+
42
+ ```json
43
+ {
44
+ "amplitude" : Number,
45
+ "period" : Number,
46
+ "snr" : Number
47
+ }
48
+ ```
49
+
50
+ ## Glossary
51
+
52
+ **Optional Values:**
53
+
54
+ The following are values that **may or may not** be provided as part of an
55
+ amplitude.
56
+
57
+ * amplitude - A decimal number containing the amplitude.
58
+ * period - A decimal number containing the amplitude period.
59
+ * snr - A decimal number containing the signal to noise ratio, capped at 1E9.
60
+
61
+ # Association Object Specification
62
+
63
+ ## Description
64
+
65
+ The Association object is an object designed to encode information provided when
66
+ a [Pick](Pick.md). Association uses the [JSON standard](http://www.json.org).
67
+
68
+ ## Usage
69
+
70
+ Association is intended for use as part of the [Pick](Pick.md) Format in seismic data messaging between seismic applications and organizations.
71
+
72
+ ## Output
73
+
74
+ ```json
75
+ {
76
+ "phase" : String,
77
+ "distance" : Number,
78
+ "azimuth" : Number,
79
+ "residual" : Number,
80
+ "sigma" : Number
81
+ }
82
+ ```
83
+
84
+ ## Glossary
85
+
86
+ **Optional Values:**
87
+
88
+ The following are values that **may or may not** be provided as part of
89
+ association.
90
+
91
+ * phase - A string that identifies the seismic phase for this data if Association.
92
+ * distance - A decimal number containing the distance in degrees between the detection's and data's locations if Association.
93
+ * azimuth - A decimal number containing the azimuth in degrees between the detection's and data's locations if Association.
94
+ * residual - A decimal number containing residual in seconds of the data if Association.
95
+ * sigma - A decimal number reflecting the number of standard deviations of the data from the calculated value if Association.
96
+
97
+ # Beam Object Specification
98
+
99
+ ## Description
100
+
101
+ The Beam object is an object designed to encode waveform beam information
102
+ that may or may not be part of the [Pick](Pick.md) Format. Beam uses the
103
+ [JSON standard](http://www.json.org).
104
+
105
+ ## Usage
106
+
107
+ The Beam object is intended for use as part of the [Pick](Pick.md) Format
108
+ in seismic data messaging between seismic applications and organizations.
109
+
110
+ ## Output
111
+
112
+ ```json
113
+ {
114
+ "backAzimuth" : Number,
115
+ "backAzimuthError" : Number,
116
+ "slowness" : Number,
117
+ "slownessError" : Number,
118
+ "powerRatio" : Number,
119
+ "powerRatioError" : Number
120
+ }
121
+ ```
122
+
123
+ ## Glossary
124
+
125
+ **Required Values:**
126
+
127
+ These are the values **required** to define a beam.
128
+
129
+ * backAzimuth - A decimal number containing the back azimuth.
130
+ * slowness - A decimal number containing the horizontal slowness.
131
+
132
+ **Optional Values:**
133
+
134
+ The following are supplementary values that **may or may not** be provided by
135
+ various algorithms.
136
+
137
+ * backAzimuthError - A decimal number containing the back azimuth error.
138
+ * slownessError - A decimal number containing the horizontal slowness error.
139
+ * powerRatio - A decimal number containing the power ratio.
140
+ * powerRatioError - A decimal number containing the power ratio error.
141
+
142
+ # Site Object Specification
143
+
144
+ ## Description
145
+
146
+ The Site object is an object designed to define the seismic station used to
147
+ produce a [Pick](Pick.md) message. Site uses the [JSON](https://www.json.org) and [GeoJSON](https://geojson.org/) standards.
148
+
149
+ ## Usage
150
+
151
+ Site is intended for use as part of the [Pick](Pick.md) Format in seismic data
152
+ messaging between seismic applications and organizations.
153
+
154
+ ## Output
155
+
156
+ ```json
157
+ {
158
+ "type": "Feature",
159
+ "geometry": {
160
+ "type": "Point",
161
+ "coordinates": [125.6, 10.1]
162
+ },
163
+ "properties": {
164
+ "Station" : String,
165
+ "Channel" : String,
166
+ "Network" : String,
167
+ "Location" : String
168
+ }
169
+ }
170
+ ```
171
+
172
+ ## Glossary
173
+
174
+ **Required Values:**
175
+
176
+ These are the properties **required** to define a Site.
177
+
178
+ * type - A string indicating the geojson feature type
179
+ * geometry - A geojson point containing the station coordinates in the form [Latitude, Longitude, Elevation (in meters)]
180
+ * station - A string the station code.
181
+ * network - A string containing network code.
182
+
183
+ **Optional Values:**
184
+
185
+ The following are supplementary properties that **may or may not** be provided as
186
+ part of a Site.
187
+
188
+ * channel - A string containing the channel code.
189
+ * location - A string containing the location code.
190
+
191
+ # EventType Object Specification
192
+
193
+ ## Description
194
+
195
+ The EventType object is an object designed to define the originating seismic
196
+ organization that produced a [MachineLearning](MachineLearning.md) object.
197
+ Site uses the [JSON standard](http://www.json.org).
198
+
199
+ ## Usage
200
+
201
+ EventType is intended for use as part of the [PicMachineLearningk](MachineLearning.md) Oject in seismic data
202
+ messaging between seismic applications and organizations.
203
+
204
+ ## Output
205
+
206
+ ```json
207
+ {
208
+ "type" : String,
209
+ "certainty" : String
210
+ }
211
+ ```
212
+
213
+ ## Glossary
214
+
215
+ **Required Values:**
216
+
217
+ These are the values **required** to define a EventType
218
+
219
+ * type - A string containing the event type, allowed type strings are: "Earthquake", "MineCollapse", "NuclearExplosion", "QuarryBlast", "InducedOrTriggered", "RockBurst", "FluidInjection", "IceQuake", and "VolcanicEruption"
220
+
221
+ **Optional Values:**
222
+
223
+ The following are values that **may or may not** be provided as part of EventType.
224
+
225
+ * certainty - A string containing the certainty of the event type; allowed strings are "Suspected" and "Confirmed"
226
+
227
+ # Filter Object Specification
228
+
229
+ ## Description
230
+
231
+ The Filter object is an object designed to encode a single set of filter
232
+ frequencies that may or may not be part of the filter list in the [Pick](Pick.md)
233
+ Format. Filter uses the [JSON standard](http://www.json.org) .
234
+
235
+ ## Usage
236
+
237
+ The Filter object is intended for use as part of the [Pick](Pick.md) Format
238
+ in seismic data messaging between seismic applications and organizations.
239
+
240
+ ## Output
241
+
242
+ ```json
243
+ {
244
+ "type" : String,
245
+ "highPass" : Number,
246
+ "lowPass" : Number,
247
+ "units" : String
248
+ }
249
+ ```
250
+
251
+ ## Glossary
252
+
253
+ **Optional Values:**
254
+
255
+ The following are values that **may or may not** be provided as part of a filter.
256
+
257
+ * type - A string containing the type of filter
258
+ * highPass - A decimal number containing the high pass frequency in Hz.
259
+ * lowPass - A decimal number containing the low pass frequency in Hz.
260
+ * units - A string containing the filter frequency units.
261
+
262
+ Note: The Type of filter is assumed to be "BandPass", and the Units are assumed
263
+ to be "Hertz"
264
+
265
+ # MachineLearning Object Specification
266
+
267
+ ## Description
268
+
269
+ The MachineLearning object is an object designed to encode value added
270
+ information available for a [Pick](Pick.md) from advanced algorithms such as
271
+ machine learning. MachineLearning uses the [JSON standard](http://www.json.org).
272
+
273
+ ## Usage
274
+
275
+ MachineLearning is intended for use as part of the [Pick](Pick.md) Format in
276
+ seismic data messaging between seismic
277
+ applications and organizations.
278
+
279
+ ## Output
280
+
281
+ ```json
282
+ {
283
+ "phase" : String,
284
+ "phaseProbability" : Number,
285
+ "distance" : Number,
286
+ "distanceProbability" : Number,
287
+ "distanceRangeHalfWidth" : Number,
288
+ "distanceRangeSigma" : Number,
289
+ "backAzimuth" : Number,
290
+ "backAzimuthProbability" : Number,
291
+ "magnitude" : Number,
292
+ "magnitudeType" : String,
293
+ "magnitudeProbability" : Number,
294
+ "depth" : Number,
295
+ "depthProbability" : Number,
296
+ "eventType" :
297
+ {
298
+ "type" : String,
299
+ "certainty" : String
300
+ },
301
+ "eventTypeProbability" : Number,
302
+ "repickShift" : Number,
303
+ "repickSTD" : Number,
304
+ "repickCredibleIntervalLower" : Number,
305
+ "repickCredibleIntervalUpper" : Number,
306
+ "source" :
307
+ {
308
+ "agencyID" : String,
309
+ "author" : String
310
+ }
311
+ }
312
+ ```
313
+
314
+ ## Glossary
315
+
316
+ **Optional Values:**
317
+
318
+ The following are values that **may or may not** be provided as part of MachineLearning.
319
+
320
+ * phase - A string that identifies the seismic phase for this data
321
+ * phaseProbability - A decimal number containing the probability of the phase identification
322
+ * distance - A decimal number containing a distance estimation in degrees
323
+ * distanceProbability - A decimal number containing the probability of the distance estimation
324
+ * distanceRangeHalfWidth - A decimal number containing the half-width of a distance range centered at Distance (e.g. Distance is 15 deg +/- 10 deg)
325
+ * distanceRangeSigma - A decimal number containing the standard deviation for a probability PDF curve for Distance (e.g. Distance is 15 deg +/- 3 * DistanceRangeSigma where DistanceProbability is modified by the PDF probability, lowering as it gets further from Distance ). DistanceRangeSigma is mutually exclusive of DistanceRangeHalfWidth, and if both are provided DistanceRangeSigma should be used.
326
+ * backAzimuth - A decimal number containing a backazimuth estimation in degrees
327
+ * backAzimuthProbability - A decimal number containing the probability of the backazimuth estimation
328
+ * magnitude - A decimal number containing the magnitude estimation
329
+ * magnitudeType - A string that identifies the magnitude type
330
+ * magnitudeProbability - A decimal number containing the probability of the magnitude estimation
331
+ * depth - A decimal number containing a depth estimation in kilometers
332
+ * depthProbability - A decimal number containing the probability of the depth estimation
333
+ * eventType - An object containing the event type, see [EventType](EventType.md).
334
+ * eventTypeProbability - A decimal number containing the probability of the event type estimation
335
+ * repickShift - A decimal number containing the repick shift in seconds (to regenerate the initial Pick.Time, subtract this value from the current Pick.Time)
336
+ * repickSTD - A decimal number containing the repick shift standard deviation
337
+ * repickCredibleIntervalLower - A decimal number containing the repick shift credible interval lower
338
+ * repickCredibleIntervalUpper - A decimal number containing the repick shift credible interval upper
339
+ * source - An object containing the source of the MachineLearning, see [Source](Source.md).
340
+
341
+ # Pick Format Specification
342
+
343
+ ## Description
344
+
345
+ Pick is a format designed to encode the basic information of an unassociated
346
+ waveform arrival time pick. Pick uses the
347
+ [JSON standard](http://www.json.org).
348
+
349
+ ## Usage
350
+ Pick is intended for use in seismic data messaging between seismic
351
+ applications and organizations.
352
+
353
+ ## Output
354
+
355
+ ```json
356
+ {
357
+ "type" : "Pick",
358
+ "id" : String,
359
+ "channel" :
360
+ {
361
+ "type": "Feature",
362
+ "geometry": {
363
+ "type": "Point",
364
+ "coordinates": [125.6, 10.1, 1589.0]
365
+ },
366
+ "properties": {
367
+ "station" : String,
368
+ "channel" : String,
369
+ "network" : String,
370
+ "location" : String
371
+ }
372
+ },
373
+ "time" : ISO8601,
374
+ "source" :
375
+ {
376
+ "agencyID" : String,
377
+ "author" : String
378
+ },
379
+ "phase" : String,
380
+ "polarity" : ("up" | "down"),
381
+ "onset" : ("impulsive" | "emergent" | "questionable"),
382
+ "pickerType" : ("manual" | "raypicker" | "filterpicker" | "earthworm" | "other"),
383
+ "filterInfo" : [ {
384
+ "type" : String,
385
+ "highPass" : Number,
386
+ "lowPass" : Number,
387
+ "units" : String
388
+ }, ...],
389
+ "amplitudeInfo" :
390
+ {
391
+ "value" : Number,
392
+ "period" : Number,
393
+ "snr" : Number
394
+ },
395
+ "beamInfo" :
396
+ {
397
+ "backAzimuth" : Number,
398
+ "backAzimuthError" : Number,
399
+ "slowness" : Number,
400
+ "slownessError" : Number,
401
+ "powerRatio" : Number,
402
+ "powerRatioError" : Number,
403
+ },
404
+ "associationInfo" :
405
+ {
406
+ "phase" : String,
407
+ "distance" : Number,
408
+ "azimuth" : Number,
409
+ "residual" : Number,
410
+ "sigma" : Number
411
+ },
412
+ "qualityInfo" : [ {
413
+ "standard": String,
414
+ "value": Number
415
+ }, ...],
416
+ "machineLearningInfo" :
417
+ {
418
+ "phase" : String,
419
+ "phaseProbability" : Number,
420
+ "distance" : Number,
421
+ "distanceProbability" : Number,
422
+ "distanceRangeHalfWidth" : Number,
423
+ "distanceRangeSigma" : Number,
424
+ "backAzimuth" : Number,
425
+ "backAzimuthProbability" : Number,
426
+ "magnitude" : Number,
427
+ "magnitudeType" : String,
428
+ "magnitudeProbability" : Number,
429
+ "depth" : Number,
430
+ "depthProbability" : Number,
431
+ "eventType" : {
432
+ "type" : String,
433
+ "certainty" : String
434
+ },
435
+ "eventTypeProbability" : Number,
436
+ "repickShift" : Number,
437
+ "repickSTD" : Number,
438
+ "repickCredibleIntervalLower" : Number,
439
+ "repickCredibleIntervalUpper" : Number,
440
+ "source" : {
441
+ "agencyID" : String,
442
+ "author" : String
443
+ }
444
+ }
445
+ }
446
+ ```
447
+
448
+ ## Glossary
449
+
450
+ **Required Values:**
451
+
452
+ These are the values **required** to define a pick.
453
+
454
+ * type - A string that identifies this message as a pick.
455
+ * id - A string containing an unique identifier for this pick.
456
+ * channel - A GeoJSON object containing the channel the pick was made at, see [Channel](Channel.md).
457
+ * source - An object containing the source of the pick, see [Source](Source.md).
458
+ * time - A string containing the UTC arrival time of the phase that was picked, in the ISO8601 format `YYYY-MM-DDTHH:MM:SS.SSSZ`.
459
+
460
+ **Optional Values:**
461
+
462
+ The following are supplementary values that **may or may not** be provided by
463
+ various picking algorithms.
464
+
465
+ * phase - A string that identifies the seismic phase that was picked.
466
+ * polarity - A string containing the phase polarity; "up" or "down".
467
+ * onset - A string containing the phase onset; "impulsive", "emergent", or "questionable" .
468
+ * pickerType - A string describing the type of picker; "manual", "raypicker", "filterpicker", "earthworm", or "other".
469
+ * filter - An array of objects containing the filter frequencies when the pick was made, see [Filter](Filter.md).
470
+ * amplitude - An object containing the amplitude associated with the pick, see [Amplitude](Amplitude.md).
471
+ * beam - An object containing the waveform beam information associated with the pick, see [Beam](Beam.md).
472
+ * associationInfo - An object containing the association information if this pick is used as data in a Detection, see [Associated](Associated.md).
473
+ * machineLearningInfo - An object containing the machine learning information of this pick, see [MachineLearning](MachineLearning.md).
474
+ * qualityInfo - An array of objects containing the containing the quality metric information for this pick, see [Quality](Quality.md).
475
+
476
+ # Quality Object Specification
477
+
478
+ ## Description
479
+
480
+ The Quality object is an object designed to hold data quality for a [Pick](Pick.md) message.
481
+ Site uses the [JSON standard](http://www.json.org).
482
+
483
+ ## Usage
484
+
485
+ Quality is intended for use as part of the [Pick](Pick.md) Format in seismic data
486
+ messaging between seismic applications and organizations.
487
+
488
+ ## Output
489
+
490
+ ```json
491
+ {
492
+ "standard": String,
493
+ "value": Number
494
+ }
495
+ ```
496
+
497
+ ## Glossary
498
+
499
+ **Required Values:**
500
+
501
+ These are the values **required** to define a Quality
502
+
503
+ * standard - A string containing the name of the quality standard.
504
+ * value - A string containing numarical value of the quality standard.
505
+
506
+ # Source Object Specification
507
+
508
+ ## Description
509
+
510
+ The Source object is an object designed to define the originating seismic
511
+ organization that produced a [Pick](Pick.md) message.
512
+ Site uses the [JSON standard](http://www.json.org).
513
+
514
+ ## Usage
515
+
516
+ Source is intended for use as part of the [Pick](Pick.md) Format in seismic data
517
+ messaging between seismic applications and organizations.
518
+
519
+ ## Output
520
+
521
+ ```json
522
+ {
523
+ "agencyID" : String,
524
+ "author" : String
525
+ }
526
+ ```
527
+
528
+ ## Glossary
529
+
530
+ **Required Values:**
531
+
532
+ These are the values **required** to define a Source
533
+
534
+ * agencyID - A string containing the originating agency FDSN ID.
535
+ * author - A string containing the source author.
@@ -1,9 +1,9 @@
1
1
  [tool.poetry]
2
2
  name = "anss-formats"
3
- version = "0.0.2" #prev 0.0.1
3
+ version = "0.0.4" #prev 0.0.1, 0.0.2
4
4
  description = "Python implementation of the library used to communicate seismic event detection information between systems"
5
5
  authors = ["John Patton <jpatton@usgs.gov>"]
6
- readme = "README.md"
6
+ readme = "README_purpose.md"
7
7
  license = "CC0-1.0"
8
8
  homepage ="https://gitlab.com/anss-netops/anss-data-formats"
9
9
  include = [
@@ -1,49 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: anss-formats
3
- Version: 0.0.2
4
- Summary: Python implementation of the library used to communicate seismic event detection information between systems
5
- License: CC0-1.0
6
- Keywords: anss,earthquakes,formats,detection
7
- Author: John Patton
8
- Author-email: jpatton@usgs.gov
9
- Requires-Python: >3.9.1,<3.12
10
- Classifier: License :: CC0 1.0 Universal (CC0 1.0) Public Domain Dedication
11
- Classifier: Programming Language :: Python :: 3
12
- Classifier: Programming Language :: Python :: 3.10
13
- Classifier: Programming Language :: Python :: 3.11
14
- Provides-Extra: pycurl
15
- Requires-Dist: certifi (>=2024.07.04,<2025.0.0)
16
- Requires-Dist: cryptography (>=44.0.1,<45.0.0)
17
- Requires-Dist: docutils (!=0.21.post1)
18
- Requires-Dist: dparse (>=0.6.2,<0.7.0)
19
- Requires-Dist: pydantic (>=2.6.0,<3.0.0)
20
- Requires-Dist: requests (>=2.32.2,<3.0.0)
21
- Requires-Dist: twine (>=5.1.1,<6.0.0)
22
- Project-URL: Homepage, https://gitlab.com/anss-netops/anss-data-formats
23
- Project-URL: Repository, https://gitlab.com/anss-netops/anss-data-formats
24
- Description-Content-Type: text/markdown
25
-
26
- # Python 3 ANSS Formats Library
27
-
28
- This is the Python implementation of the library used to generate and parse the
29
- ANSS Formats.
30
-
31
- Dependencies
32
- ------
33
- * ANSS Formats utilizes [JSON](www.json.org) for formatting.
34
- * ANSS Formats was written in Python 3.6
35
- * ANSS Formats uses [poetry](https://python-poetry.org/) for
36
- Package, dependency and environment management.
37
-
38
- Building
39
- ------
40
- The steps to get and use the python ANSS-formats are as follows:
41
-
42
- 1. Clone ANSS-formats.
43
- 2. Open a command window and change directories to /python/
44
- 3. To run unit tests, run the command `poetry run pytest --cov=anssformats --junitxml junit.xml`
45
-
46
- Using
47
- -----S
48
- Once you have the python distribution, simply import anssformats
49
-
@@ -1,23 +0,0 @@
1
- # Python 3 ANSS Formats Library
2
-
3
- This is the Python implementation of the library used to generate and parse the
4
- ANSS Formats.
5
-
6
- Dependencies
7
- ------
8
- * ANSS Formats utilizes [JSON](www.json.org) for formatting.
9
- * ANSS Formats was written in Python 3.6
10
- * ANSS Formats uses [poetry](https://python-poetry.org/) for
11
- Package, dependency and environment management.
12
-
13
- Building
14
- ------
15
- The steps to get and use the python ANSS-formats are as follows:
16
-
17
- 1. Clone ANSS-formats.
18
- 2. Open a command window and change directories to /python/
19
- 3. To run unit tests, run the command `poetry run pytest --cov=anssformats --junitxml junit.xml`
20
-
21
- Using
22
- -----S
23
- Once you have the python distribution, simply import anssformats