anss-formats 0.0.4__tar.gz → 0.1.0__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: anss-formats
3
- Version: 0.0.4
3
+ Version: 0.1.0
4
4
  Summary: Python implementation of the library used to communicate seismic event detection information between systems
5
5
  License: CC0-1.0
6
6
  Keywords: anss,earthquakes,formats,detection
@@ -24,6 +24,17 @@ Project-URL: Repository, https://gitlab.com/anss-netops/anss-data-formats
24
24
  Description-Content-Type: text/markdown
25
25
 
26
26
  # ANSS Data Formats
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
+
27
38
  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
39
 
29
40
  The purpose of this project is to:
@@ -36,18 +47,20 @@ seismic event detections.
36
47
  ## Defined formats:
37
48
 
38
49
  * [Pick](format-docs/Pick.md) Format - A format for unassociated picks from a waveform arrival time picking algorithm.
50
+ * [Detection](format-docs/Detection.md) Format - A format for an earthquake detection picks from a seismic detection algorithm.
39
51
 
40
52
  ## Supporting format objects:
41
53
 
42
54
  * [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
55
  * [Associated](format-docs/Associated.md) Object - An object that contains associated information if a pick is included in a detection.
56
+ * [Channel](format-docs/Channel.md) Object - A geoJSON object that contains channel/location information as part of a pick.
57
+ * [EventType](format-docs/EventType.md) Object - An object that defines the event type for MachineLearning info.
45
58
  * [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.
59
+ * [Hypocenter](format-docs/Hypocenter.md) Object - A geoJSON object that contains the hypocentral location, arrival time, and error information as part of a detection.
49
60
  * [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.
61
+ * [Magnitude](format-docs/Magnitude.md) Object - An object that defines an earthquake magnitude estimation, as part of a Machine Learning classification or earthquake detection.
62
+ * [Quality](format-docs/Quality.md) Object - An object that defines the data quality of a pick.
63
+ * [Source](format-docs/Source.md) Object - An object that defines the creator/source of a pick.
51
64
 
52
65
  # Amplitude Object Specification
53
66
 
@@ -119,99 +132,151 @@ association.
119
132
  * residual - A decimal number containing residual in seconds of the data if Association.
120
133
  * sigma - A decimal number reflecting the number of standard deviations of the data from the calculated value if Association.
121
134
 
122
- # Beam Object Specification
135
+ # Site Object Specification
123
136
 
124
137
  ## Description
125
138
 
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).
139
+ The Site object is an object designed to define the seismic station used to
140
+ produce a [Pick](Pick.md) message. Site uses the [JSON](https://www.json.org) and [GeoJSON](https://geojson.org/) standards.
129
141
 
130
142
  ## Usage
131
143
 
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.
144
+ Site is intended for use as part of the [Pick](Pick.md) Format in seismic data messaging between seismic applications and organizations.
134
145
 
135
146
  ## Output
136
147
 
137
148
  ```json
138
- {
139
- "backAzimuth" : Number,
140
- "backAzimuthError" : Number,
141
- "slowness" : Number,
142
- "slownessError" : Number,
143
- "powerRatio" : Number,
144
- "powerRatioError" : Number
145
- }
149
+ {
150
+ "type": "Feature",
151
+ "geometry": {
152
+ "type": "Point",
153
+ "coordinates": [125.6, 10.1]
154
+ },
155
+ "properties": {
156
+ "station" : String,
157
+ "channel" : String,
158
+ "network" : String,
159
+ "location" : String
160
+ }
161
+ }
146
162
  ```
147
163
 
148
164
  ## Glossary
149
165
 
150
166
  **Required Values:**
151
167
 
152
- These are the values **required** to define a beam.
168
+ These are the properties **required** to define a Site.
153
169
 
154
- * backAzimuth - A decimal number containing the back azimuth.
155
- * slowness - A decimal number containing the horizontal slowness.
170
+ * type - A string indicating the geojson feature type
171
+ * geometry - A geojson point containing the station coordinates in the form [Latitude, Longitude, Elevation (in meters)]
172
+ * properties - The associated properties for this geojson feature
156
173
 
157
- **Optional Values:**
174
+ **Required Properties:**
158
175
 
159
- The following are supplementary values that **may or may not** be provided by
176
+ These geojson feature properties are **required** to define a Site.
177
+ * station - A string the station code.
178
+ * network - A string containing network code.
179
+
180
+ **Optional Properties:**
181
+
182
+ The following are supplementary geojson feature properties that **may or may not** be provided by
160
183
  various algorithms.
161
184
 
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.
185
+ * channel - A string containing the channel code.
186
+ * location - A string containing the location code.
166
187
 
167
- # Site Object Specification
188
+ # Detection Format Specification
168
189
 
169
190
  ## Description
170
191
 
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.
192
+ Detection is a format designed to encode the basic information of an earthquake
193
+ event Detection. Detection uses the [JSON standard](http://www.json.org).
173
194
 
174
195
  ## Usage
175
196
 
176
- Site is intended for use as part of the [Pick](Pick.md) Format in seismic data
177
- messaging between seismic applications and organizations.
197
+ Detection is intended for use in seismic data messaging between seismic
198
+ applications.
178
199
 
179
200
  ## Output
180
201
 
181
202
  ```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
- }
203
+ {
204
+ "type" : "Detection",
205
+ "id" : String,
206
+ "source" :
207
+ {
208
+ "agencyID" : String,
209
+ "author" : String
210
+ },
211
+ "hypocenter" :
212
+ {
213
+ "type": "Feature",
214
+ "geometry": {
215
+ "type": "Point",
216
+ "coordinates": [125.6, 10.1, 1589.0]
217
+ },
218
+ "properties": {
219
+ "originTime" : ISO8601,
220
+ "latitudeError" : Number,
221
+ "longitudeError" : Number,
222
+ "depthError" : Number,
223
+ "originTimeError" : Number
224
+ }
225
+ },
226
+ "detectionType" : String,
227
+ "detectionTime" : ISO8601,
228
+ "eventType" :
229
+ {
230
+ "type" : String,
231
+ "certainty" : String
232
+ },
233
+ "minimumDistance" : Number,
234
+ "rms" : Number,
235
+ "maximumGap" : Number,
236
+ "detector" : String,
237
+ "pickData" : [Pick Objects],
238
+ "magnitudeData" :
239
+ [
240
+ {
241
+ "type" : String,
242
+ "id" : String,
243
+ "value" : Number,
244
+ "source" :
245
+ {
246
+ "agencyID" : String,
247
+ "author" : String
248
+ },
249
+ "error" : Number,
250
+ "probability" : Number
251
+ }, ...
252
+ ]
253
+ }
195
254
  ```
196
255
 
197
256
  ## Glossary
198
257
 
199
258
  **Required Values:**
200
259
 
201
- These are the properties **required** to define a Site.
260
+ These are the values **required** to define a detection.
202
261
 
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.
262
+ * type - A string that identifies this message as a detection.
263
+ * id - A string containing an unique identifier for this Detection.
264
+ * source - An object containing the source of the Detection, see [Source](Source.md).
265
+ * hypocenter - An object containing the hypocenter of the Detection, see [Hypocenter](Hypocenter.md).
207
266
 
208
267
  **Optional Values:**
209
268
 
210
- The following are supplementary properties that **may or may not** be provided as
211
- part of a Site.
269
+ The following are supplementary values that **may or may not** be provided as part of a detection.
212
270
 
213
- * channel - A string containing the channel code.
214
- * location - A string containing the location code.
271
+ * detectionType - A string that identifies whether the Detection is `New`, `Update`, or `Final`.
272
+ * detectionTime - A string containing the UTC time this detection was made, i.e. how quickly after origin time was this detection created, in the ISO8601 format `YYYY-MM-DDTHH:MM:SS.SSSZ`.
273
+ * eventType - An object containing the event type of the correlation, see [EventType](EventType.md).
274
+ * rms - A decimal number containing the rms estimate for the detction
275
+ * minimumDistance - A decimal number representing the minimum distance to the closest supporting station.
276
+ * maximumGap - A decimal number representing the maximum gap in degrees between supporting stations.
277
+ * detector - A string identifying the detection grid, algorithm, or other information.
278
+ * pickData - An array of [Pick](Pick.md) objects used to generate this Detection.
279
+ * magnitudeData - An array of [Magnitude](Magnitude.md) objects for this Detection.
215
280
 
216
281
  # EventType Object Specification
217
282
 
@@ -287,6 +352,60 @@ The following are values that **may or may not** be provided as part of a filter
287
352
  Note: The Type of filter is assumed to be "BandPass", and the Units are assumed
288
353
  to be "Hertz"
289
354
 
355
+ # Hypocenter Object Specification
356
+
357
+ ## Description
358
+
359
+ The Hypocenter object is an object designed to define a Hypocenter as part of a [Detection](Detection.md) message. Hypocenter uses the [JSON standard](http://www.json.org) and [GeoJSON](https://geojson.org/) standards.
360
+
361
+
362
+ ## Usage
363
+
364
+ Hypocenter is intended for use as part of the [Detection](Detection.md) Format in seismic data messaging between seismic applications and organizations.
365
+
366
+ ## Output
367
+
368
+ ```json
369
+ {
370
+ "type": "Feature",
371
+ "geometry": {
372
+ "type": "Point",
373
+ "coordinates": [125.6, 10.1, 1589.0]
374
+ },
375
+ "properties": {
376
+ "originTime" : ISO8601,
377
+ "latitudeError" : Number,
378
+ "longitudeError" : Number,
379
+ "depthError" : Number,
380
+ "originTimeError" : Number
381
+ }
382
+ }
383
+ ```
384
+
385
+ ## Glossary
386
+
387
+ **Required Values:**
388
+
389
+ These are the values **required** to define a hypocenter.
390
+ * type - A string indicating the geojson feature type, always a point
391
+ * geometry - A geojson point containing the station coordinates in the form [Latitude, Longitude, Depth (in meters)]
392
+ * properties - The associated properties for this geojson feature
393
+
394
+ **Required Properties:**
395
+
396
+ These geojson feature properties are **required** to define a hypocenter.
397
+ * originTime - A string containing the UTC origin time of this hypocenter, in the ISO8601 format `YYYY-MM-DDTHH:MM:SS.SSSZ`.
398
+
399
+ **Optional Properties:**
400
+
401
+ The following are supplementary geojson feature properties that **may or may not** be provided by
402
+ various algorithms.
403
+
404
+ * latitudeError - A decimal number that identifies the error of the latitude of this hypocenter in kilometers.
405
+ * longitudeError - A decimal number that identifies the error of the longitude of this hypocenter in kilometers.
406
+ * depthError - A decimal number that identifies the depth error of this hypocenter in kilometers.
407
+ * originTimeError - A decimal number that identifies the error of the origin time in seconds.
408
+
290
409
  # MachineLearning Object Specification
291
410
 
292
411
  ## Description
@@ -313,9 +432,19 @@ applications and organizations.
313
432
  "distanceRangeSigma" : Number,
314
433
  "backAzimuth" : Number,
315
434
  "backAzimuthProbability" : Number,
316
- "magnitude" : Number,
317
- "magnitudeType" : String,
318
- "magnitudeProbability" : Number,
435
+ "magnitude" :
436
+ {
437
+ "type" : String,
438
+ "id" : String,
439
+ "value" : Number,
440
+ "source" :
441
+ {
442
+ "agencyID" : String,
443
+ "author" : String
444
+ },
445
+ "error" : Number,
446
+ "probability" : Number
447
+ },
319
448
  "depth" : Number,
320
449
  "depthProbability" : Number,
321
450
  "eventType" :
@@ -350,9 +479,7 @@ The following are values that **may or may not** be provided as part of MachineL
350
479
  * 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
480
  * backAzimuth - A decimal number containing a backazimuth estimation in degrees
352
481
  * 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
482
+ * magnitude - A [Magnitude](Magnitude.md) object containing the machine learning magnitude estimation
356
483
  * depth - A decimal number containing a depth estimation in kilometers
357
484
  * depthProbability - A decimal number containing the probability of the depth estimation
358
485
  * eventType - An object containing the event type, see [EventType](EventType.md).
@@ -363,6 +490,53 @@ The following are values that **may or may not** be provided as part of MachineL
363
490
  * repickCredibleIntervalUpper - A decimal number containing the repick shift credible interval upper
364
491
  * source - An object containing the source of the MachineLearning, see [Source](Source.md).
365
492
 
493
+ # Magnitude Object Specification
494
+
495
+ ## Description
496
+
497
+ The Magnitude object is an object designed to hold data quality for a [Detection](Detection.md) message.
498
+ Site uses the [JSON standard](http://www.json.org).
499
+
500
+ ## Usage
501
+
502
+ Magnitude is intended for use as part of the [Detection](Detection.md) Format in seismic data
503
+ messaging between seismic applications and organizations.
504
+
505
+ ## Output
506
+
507
+ ```json
508
+ {
509
+ "type" : String,
510
+ "id" : String,
511
+ "value" : Number,
512
+ "source" :
513
+ {
514
+ "agencyID" : String,
515
+ "author" : String
516
+ },
517
+ "error" : Number,
518
+ "probability" : Number
519
+ }
520
+ ```
521
+
522
+ ## Glossary
523
+
524
+ **Required Values:**
525
+
526
+ These are the values **required** to define a Magnitude
527
+
528
+ * type - A string containing the name of the magnitude type.
529
+ * value - A decimal number containing numarical value of the magnitude.
530
+
531
+ **Optional Values:**
532
+
533
+ The following are supplementary values that **may or may not** be provided as part of a Magnitude.
534
+
535
+ * id - A string containing an unique identifier for this Magnitude.
536
+ * source - An object containing the source of the Magnitude, see [Source](Source.md).
537
+ * error - A decimal number containing numarical error estimate of the magnitude.
538
+ * probability - A decimal number containing the probability of the magnitude
539
+
366
540
  # Pick Format Specification
367
541
 
368
542
  ## Description
@@ -417,15 +591,6 @@ applications and organizations.
417
591
  "period" : Number,
418
592
  "snr" : Number
419
593
  },
420
- "beamInfo" :
421
- {
422
- "backAzimuth" : Number,
423
- "backAzimuthError" : Number,
424
- "slowness" : Number,
425
- "slownessError" : Number,
426
- "powerRatio" : Number,
427
- "powerRatioError" : Number,
428
- },
429
594
  "associationInfo" :
430
595
  {
431
596
  "phase" : String,
@@ -448,9 +613,19 @@ applications and organizations.
448
613
  "distanceRangeSigma" : Number,
449
614
  "backAzimuth" : Number,
450
615
  "backAzimuthProbability" : Number,
451
- "magnitude" : Number,
452
- "magnitudeType" : String,
453
- "magnitudeProbability" : Number,
616
+ "magnitude" :
617
+ {
618
+ "type" : String,
619
+ "id" : String,
620
+ "value" : Number,
621
+ "source" :
622
+ {
623
+ "agencyID" : String,
624
+ "author" : String
625
+ },
626
+ "error" : Number,
627
+ "probability" : Number
628
+ },
454
629
  "depth" : Number,
455
630
  "depthProbability" : Number,
456
631
  "eventType" : {
@@ -493,7 +668,6 @@ various picking algorithms.
493
668
  * pickerType - A string describing the type of picker; "manual", "raypicker", "filterpicker", "earthworm", or "other".
494
669
  * filter - An array of objects containing the filter frequencies when the pick was made, see [Filter](Filter.md).
495
670
  * 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
671
  * associationInfo - An object containing the association information if this pick is used as data in a Detection, see [Associated](Associated.md).
498
672
  * machineLearningInfo - An object containing the machine learning information of this pick, see [MachineLearning](MachineLearning.md).
499
673
  * qualityInfo - An array of objects containing the containing the quality metric information for this pick, see [Quality](Quality.md).