pygmi 2.2.7__zip

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.
Files changed (106) hide show
  1. pygmi-2.2.7/LICENSE.txt +623 -0
  2. pygmi-2.2.7/MANIFEST.in +7 -0
  3. pygmi-2.2.7/PKG-INFO +47 -0
  4. pygmi-2.2.7/README.md +55 -0
  5. pygmi-2.2.7/README.rst +20 -0
  6. pygmi-2.2.7/log.txt +242 -0
  7. pygmi-2.2.7/pygmi/__init__.py +22 -0
  8. pygmi-2.2.7/pygmi/clust/__init__.py +4 -0
  9. pygmi-2.2.7/pygmi/clust/crisp_clust.py +708 -0
  10. pygmi-2.2.7/pygmi/clust/datatypes.py +65 -0
  11. pygmi-2.2.7/pygmi/clust/fuzzy_clust.py +906 -0
  12. pygmi-2.2.7/pygmi/clust/graphs.py +421 -0
  13. pygmi-2.2.7/pygmi/clust/graphtool.py +667 -0
  14. pygmi-2.2.7/pygmi/clust/menu.py +139 -0
  15. pygmi-2.2.7/pygmi/clust/var_ratio.py +92 -0
  16. pygmi-2.2.7/pygmi/clust/xie_beni.py +93 -0
  17. pygmi-2.2.7/pygmi/helpdocs/linepointer.png +0 -0
  18. pygmi-2.2.7/pygmi/helpdocs/pygmi.main.html +31 -0
  19. pygmi-2.2.7/pygmi/helpdocs/pygmi.pfmod.ddisp.html +15 -0
  20. pygmi-2.2.7/pygmi/helpdocs/pygmi.pfmod.iodefs.exportkmz.html +13 -0
  21. pygmi-2.2.7/pygmi/helpdocs/pygmi.pfmod.iodefs.importpicture.html +16 -0
  22. pygmi-2.2.7/pygmi/helpdocs/pygmi.pfmod.layer.html +17 -0
  23. pygmi-2.2.7/pygmi/helpdocs/pygmi.pfmod.mext.html +44 -0
  24. pygmi-2.2.7/pygmi/helpdocs/pygmi.pfmod.misc.rangedcopy.html +16 -0
  25. pygmi-2.2.7/pygmi/helpdocs/pygmi.pfmod.param.html +37 -0
  26. pygmi-2.2.7/pygmi/helpdocs/pygmi.pfmod.prof.html +32 -0
  27. pygmi-2.2.7/pygmi/helpdocs/pygmi.pfmod.pview.html +26 -0
  28. pygmi-2.2.7/pygmi/helpdocs/pygmi.raster.cooper.gradients.html +14 -0
  29. pygmi-2.2.7/pygmi/helpdocs/pygmi.raster.cooper.tilt.html +14 -0
  30. pygmi-2.2.7/pygmi/helpdocs/pygmi.raster.cooper.visibility.html +14 -0
  31. pygmi-2.2.7/pygmi/helpdocs/pygmi.raster.dataprep.datagrid.html +13 -0
  32. pygmi-2.2.7/pygmi/helpdocs/pygmi.raster.dataprep.datamerge.html +11 -0
  33. pygmi-2.2.7/pygmi/helpdocs/pygmi.raster.dataprep.datareproj.html +11 -0
  34. pygmi-2.2.7/pygmi/helpdocs/pygmi.raster.dataprep.rtp.html +14 -0
  35. pygmi-2.2.7/pygmi/helpdocs/pygmi.raster.ginterp.html +31 -0
  36. pygmi-2.2.7/pygmi/helpdocs/pygmi.raster.igrf.html +20 -0
  37. pygmi-2.2.7/pygmi/helpdocs/pygmi.raster.normalisation.html +14 -0
  38. pygmi-2.2.7/pygmi/helpdocs/pygmi.raster.smooth.html +22 -0
  39. pygmi-2.2.7/pygmi/helpdocs/pygmi.raster.tiltdepth.html +20 -0
  40. pygmi-2.2.7/pygmi/images/Help.png +0 -0
  41. pygmi-2.2.7/pygmi/images/bringtofront.png +0 -0
  42. pygmi-2.2.7/pygmi/images/cgs2.emf +0 -0
  43. pygmi-2.2.7/pygmi/images/delete.png +0 -0
  44. pygmi-2.2.7/pygmi/images/linepointer.png +0 -0
  45. pygmi-2.2.7/pygmi/images/logo256.ico +0 -0
  46. pygmi-2.2.7/pygmi/images/logo256.png +0 -0
  47. pygmi-2.2.7/pygmi/images/pointer.png +0 -0
  48. pygmi-2.2.7/pygmi/images/pygmi.png +0 -0
  49. pygmi-2.2.7/pygmi/images/sendtoback.png +0 -0
  50. pygmi-2.2.7/pygmi/main.py +1037 -0
  51. pygmi-2.2.7/pygmi/menu_default.py +327 -0
  52. pygmi-2.2.7/pygmi/misc.py +147 -0
  53. pygmi-2.2.7/pygmi/pfmod/__init__.py +6 -0
  54. pygmi-2.2.7/pygmi/pfmod/cubes.py +1488 -0
  55. pygmi-2.2.7/pygmi/pfmod/datatypes.py +292 -0
  56. pygmi-2.2.7/pygmi/pfmod/grvmag3d.py +1265 -0
  57. pygmi-2.2.7/pygmi/pfmod/iodefs.py +1001 -0
  58. pygmi-2.2.7/pygmi/pfmod/menu.py +107 -0
  59. pygmi-2.2.7/pygmi/pfmod/misc.py +301 -0
  60. pygmi-2.2.7/pygmi/pfmod/pfmod.py +248 -0
  61. pygmi-2.2.7/pygmi/pfmod/tab_ddisp.py +425 -0
  62. pygmi-2.2.7/pygmi/pfmod/tab_layer.py +490 -0
  63. pygmi-2.2.7/pygmi/pfmod/tab_mext.py +544 -0
  64. pygmi-2.2.7/pygmi/pfmod/tab_param.py +548 -0
  65. pygmi-2.2.7/pygmi/pfmod/tab_prof.py +946 -0
  66. pygmi-2.2.7/pygmi/pfmod/tab_pview.py +740 -0
  67. pygmi-2.2.7/pygmi/raster/IGRF11.COF +1635 -0
  68. pygmi-2.2.7/pygmi/raster/__init__.py +14 -0
  69. pygmi-2.2.7/pygmi/raster/cooper.py +718 -0
  70. pygmi-2.2.7/pygmi/raster/dataprep.py +1640 -0
  71. pygmi-2.2.7/pygmi/raster/datatypes.py +123 -0
  72. pygmi-2.2.7/pygmi/raster/equation_editor.py +256 -0
  73. pygmi-2.2.7/pygmi/raster/ginterp.py +1901 -0
  74. pygmi-2.2.7/pygmi/raster/graphs.py +531 -0
  75. pygmi-2.2.7/pygmi/raster/igrf.py +860 -0
  76. pygmi-2.2.7/pygmi/raster/iodefs.py +813 -0
  77. pygmi-2.2.7/pygmi/raster/menu.py +307 -0
  78. pygmi-2.2.7/pygmi/raster/normalisation.py +187 -0
  79. pygmi-2.2.7/pygmi/raster/show_table.py +245 -0
  80. pygmi-2.2.7/pygmi/raster/smooth.py +406 -0
  81. pygmi-2.2.7/pygmi/raster/tiltdepth.py +590 -0
  82. pygmi-2.2.7/pygmi/seis/__init__.py +0 -0
  83. pygmi-2.2.7/pygmi/seis/beachball.py +751 -0
  84. pygmi-2.2.7/pygmi/seis/datatypes.py +605 -0
  85. pygmi-2.2.7/pygmi/seis/del_rec.py +410 -0
  86. pygmi-2.2.7/pygmi/seis/iodefs.py +1261 -0
  87. pygmi-2.2.7/pygmi/seis/menu.py +136 -0
  88. pygmi-2.2.7/pygmi/seis/scan_imp.py +795 -0
  89. pygmi-2.2.7/pygmi/test/__init__.py +6 -0
  90. pygmi-2.2.7/pygmi/test/pfmod.py +212 -0
  91. pygmi-2.2.7/pygmi/test/tests.py +39 -0
  92. pygmi-2.2.7/pygmi/vector/__init__.py +7 -0
  93. pygmi-2.2.7/pygmi/vector/datatypes.py +74 -0
  94. pygmi-2.2.7/pygmi/vector/graphs.py +443 -0
  95. pygmi-2.2.7/pygmi/vector/iodefs.py +345 -0
  96. pygmi-2.2.7/pygmi/vector/menu.py +127 -0
  97. pygmi-2.2.7/pygmi.egg-info/PKG-INFO +47 -0
  98. pygmi-2.2.7/pygmi.egg-info/SOURCES.txt +105 -0
  99. pygmi-2.2.7/pygmi.egg-info/dependency_links.txt +1 -0
  100. pygmi-2.2.7/pygmi.egg-info/entry_points.txt +3 -0
  101. pygmi-2.2.7/pygmi.egg-info/not-zip-safe +1 -0
  102. pygmi-2.2.7/pygmi.egg-info/requires.txt +7 -0
  103. pygmi-2.2.7/pygmi.egg-info/top_level.txt +1 -0
  104. pygmi-2.2.7/quickstart.py +35 -0
  105. pygmi-2.2.7/setup.cfg +8 -0
  106. pygmi-2.2.7/setup.py +80 -0
@@ -0,0 +1,605 @@
1
+ # -----------------------------------------------------------------------------
2
+ # Name: datatypes.py (part of PyGMI)
3
+ #
4
+ # Author: Patrick Cole
5
+ # E-Mail: pcole@geoscience.org.za
6
+ #
7
+ # Copyright: (c) 2013 Council for Geoscience
8
+ # Licence: GPL-3.0
9
+ #
10
+ # This file is part of PyGMI
11
+ #
12
+ # PyGMI is free software: you can redistribute it and/or modify
13
+ # it under the terms of the GNU General Public License as published by
14
+ # the Free Software Foundation, either version 3 of the License, or
15
+ # (at your option) any later version.
16
+ #
17
+ # PyGMI is distributed in the hope that it will be useful,
18
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
19
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20
+ # GNU General Public License for more details.
21
+ #
22
+ # You should have received a copy of the GNU General Public License
23
+ # along with this program. If not, see <http://www.gnu.org/licenses/>.
24
+ # -----------------------------------------------------------------------------
25
+ """ Class for seismic data types """
26
+
27
+
28
+ class seisan_1(object):
29
+ """
30
+ Class to hold Seisan Type 1 data.
31
+
32
+ Type 1 Line Format:
33
+
34
+ Columns Format Description Comments
35
+ 1 Free
36
+ 2- 5 I4 Year
37
+ 6 Free
38
+ 7- 8 I2 Month
39
+ 9-10 I2 Day of Month
40
+ 11 Fix o. time Normally blank, an F fixes origin
41
+ time
42
+ 12-13 I2 Hour
43
+ 14-15 I2 Minutes
44
+ 16 Free
45
+ 17-20 F4.1 Seconds
46
+ 21 Location model indicator Any character
47
+ 22 A1 Distance Indicator L = Local, R = Regional,
48
+ D = Distant, etc.
49
+ 23 A1 Event ID E = Confirmed explosion
50
+ P = Probable explosion
51
+ V = Volcanic
52
+ Q = Confirmed earthquake
53
+ ' ' = Presumed earthquake
54
+ X = Landslide
55
+ 24-30 F7.3 Latitude Degrees (+ N)
56
+ 31-38 F8.3 Longitude Degrees (+ E)
57
+ 39-43 F5.1 Depth Km
58
+ 44 A1 Depth Indicator F = Fixed, S = Starting value
59
+ 45 A1 Locating indicator ----------------------------,
60
+ * do not locate
61
+ 46-48 A3 Hypocenter Reporting Agency
62
+ 49-51 Number of Stations Used
63
+ 52-55 RMS of Time Residuals
64
+ 56-59 F4.1 Magnitude No. 1
65
+ 60 A1 Type of Magnitude L=ML, b=mb, B=mB, s=Ms, S=MS, W=MW,
66
+ G=MbLg (not used by SEISAN), C=Mc
67
+ 61-63 A3 Magnitude Reporting Agency
68
+ 64-67 F4.1 Magnitude No. 2
69
+ 68 A1 Type of Magnitude
70
+ 69-71 A3 Magnitude Reporting Agency
71
+ 72-75 F4.1 Magnitude No. 3
72
+ 76 A1 Type of Magnitude
73
+ 77-79 A3 Magnitude Reporting Agency
74
+ 80 A1 Type of this line ("1"), can be blank if first
75
+ line of event
76
+
77
+ If more than 3 magnitudes need to be associated with the hypocenter in the
78
+ first line, a subsequent additional type one line can be written with the same
79
+ year, month, day until event ID and hypocenter agency. The magnitudes on this
80
+ line will then be associated with the main header line and there is then room
81
+ for 6 magnitudes.
82
+ """
83
+ def __init__(self):
84
+ self.year = None
85
+ self.month = None
86
+ self.day = None
87
+ self.fixed_origin_time = ' '
88
+ self.hour = None
89
+ self.minutes = None
90
+ self.seconds = None
91
+ self.location_model_indicator = ' '
92
+ self.distance_indicator = ' '
93
+ self.event_id = ' '
94
+ self.latitude = None
95
+ self.longitude = None
96
+ self.depth = None
97
+ self.depth_indicator = ' '
98
+ self.locating_indicator = ' '
99
+ self.hypocenter_reporting_agency = ' '
100
+ self.number_of_stations_used = None
101
+ self.rms_of_time_residuals = None
102
+ self.magnitude_1 = None
103
+ self.type_of_magnitude_1 = ' '
104
+ self.magnitude_reporting_agency_1 = ' '
105
+ self.magnitude_2 = None
106
+ self.type_of_magnitude_2 = ' '
107
+ self.magnitude_reporting_agency_2 = ' '
108
+ self.magnitude_3 = None
109
+ self.type_of_magnitude_3 = ' '
110
+ self.magnitude_reporting_agency_3 = ' '
111
+ self.dataid = ""
112
+
113
+
114
+ class seisan_2(object):
115
+ """
116
+ Type 2 line (Macroseismic information)
117
+
118
+ 1-5 Blank
119
+ 6-20 a Any descriptive text
120
+ 21 Free
121
+ 22 a1 Diastrophism code (PDE type)
122
+ F = Surface faulting
123
+ U = Uplift or subsidence
124
+ D = Faulting and Uplift/Subsidence
125
+ 23 a1 Tsunami code (PDE type)
126
+ T = Tsunami generated
127
+ Q = Possible tsunami
128
+ 24 a1 Seiche code (PDE type)
129
+ S = Seiche
130
+ Q = Possible seiche
131
+ 25 a1 Cultural effects (PDE type)
132
+ C = Casualties reported
133
+ D = Damage reported
134
+ F = Earthquake was felt
135
+ H = Earthquake was heard
136
+ 26 a1 Unusual events (PDE type)
137
+ L = Liquefaction
138
+ G = Geysir/fumerol
139
+ S = Landslides/Avalanches
140
+ B = Sand blows
141
+ C = Cracking in the ground (not normal faulting).
142
+ V = Visual phenomena
143
+ O = Olfactory phenomena
144
+ M = More than one of the above observed.
145
+ 27 Free
146
+ 28-29 i2 Max Intensity
147
+ 30 a1 Max Intensity qualifier
148
+ (+ or - indicating more precicely the intensity)
149
+ 31-32 a2 Intensity scale (ISC type defintions)
150
+ MM = Modified Mercalli
151
+ RF = Rossi Forel
152
+ CS = Mercalli - Cancani - Seberg
153
+ SK = Medevev - Sponheur - Karnik
154
+ 33 Free
155
+ 34-39 f6.2 Macroseismic latitude (Decimal)
156
+ 40 Free
157
+ 41-47 f7.2 Macroseismic longitude (Decimal)
158
+ 48 Free
159
+ 49-51 f3.1 Macroseismic magnitude
160
+ 52 a1 Type of magnitudeI = Magnitude based on maximum Intensity.
161
+ A = Magnitude based on felt area.
162
+ R = Magnitude based on radius of felt area.
163
+ * = Magnitude calculated by use of special formulas
164
+ developed by some person for a certain area.
165
+ Further info should be given on line 3.
166
+ 53-56 f4.2 Logarithm (base 10) of radius of felt area.
167
+ 57-61 f5.2 Logarithm (base 10) of area (km**2) number 1 where
168
+ earthquake was felt exceeding a given intensity.
169
+ 62-63 i2 Intensity boardering the area number 1.
170
+ 64-68 f5.2 Logarithm (base 10) of area (km**2) number 2 where
171
+ earthquake was felt exceeding a given intensity.
172
+ 69-70 i2 Intensity boardering the area number 2.
173
+ 71 Free
174
+ 72 a1 Quality rank of the report (A, B, C, D)
175
+ 73-75 a3 Reporting agency
176
+ 76-79 Free
177
+ 80 a1 Type of this line ("2")
178
+ """
179
+ def __init__(self):
180
+ self.description = ' '
181
+ self.diastrophism_code = ' '
182
+ self.tsunami_code = ' '
183
+ self.seiche_code = ' '
184
+ self.cultural_effects = ' '
185
+ self.unusual_events = ' '
186
+ self.max_intensity = None
187
+ self.max_intensity_qualifier = ' '
188
+ self.intensity_scale = ' '
189
+ self.macroseismic_latitude = None
190
+ self.macroseismic_longitude = None
191
+ self.macroseismic_magnitude = None
192
+ self.type_of_magnitude = ' '
193
+ self.log_of_felt_area_radius = None
194
+ self.log_of_area_1 = None
195
+ self.intensity_bordering_area_1 = None
196
+ self.log_of_area_2 = None
197
+ self.intensity_bordering_area_2 = None
198
+ self.quality_rank = ' '
199
+ self.reporting_agency = ' '
200
+ self.dataid = ""
201
+
202
+
203
+ class seisan_3(object):
204
+ """
205
+ Type 3 Line (Optional):
206
+
207
+ Columns Format Description Comments
208
+ 1 Free
209
+ 2-79 A Text Anything
210
+ 80 A1 Type of this line ("3")
211
+ """
212
+ def __init__(self):
213
+ self.text = ''
214
+ self.dataid = ""
215
+
216
+
217
+ class seisan_4(object):
218
+ """
219
+ Type 4 line:
220
+
221
+ Columns Format Description Comments
222
+
223
+ 1 Free
224
+ 2- 6 A5 Station Name Blank = End of readings = end of event
225
+ 7 A1 Instrument Type S = SP, I = IP, L = LP etc
226
+ 8 A1 Component Z, N, E ,T, R, 1, 2
227
+ 9 Free or weight, see note below
228
+ 10 A1 Quality Indicator I, E, etc.
229
+ 11-14 A2 Phase ID PN, PG, LG, P, S, etc. **
230
+ 15 I1 Weighting Indicator (1-4) 0 or blank= full weight, 1=75%,
231
+ 2=50%, 3=25%, 4=0%, 9: no weight, use difference time
232
+ (e.g. P-S).
233
+ 16 Free or flag A to indicate automartic pick, removed when
234
+ picking
235
+ 17 A1 First Motion C, D
236
+ 18 Note: Currently 15 to 18 can also be used for phase assuming
237
+ column 11-14 is not blank. See note ** below.
238
+ 19-20 I2 Hour Hour can be up to 48 to indicate next day
239
+ 21-22 I2 Minutes
240
+ 23-28 F6.0 Seconds
241
+ 29 Free
242
+ 30-33 I4 Duration (to noise) Seconds
243
+ 34-40 g7.1 Amplitude (Zero-Peak) in units of nm, nm/s, nm/s^2 or counts.
244
+ 41 Free
245
+ 42-45 F4.0 Period Seconds
246
+ 46 Free
247
+ 47-51 F5.0 Direction of Approach Degrees
248
+ 52 Free
249
+ 53-56 F4.0 Phase Velocity Km/second
250
+ 57-60 F4.0 Angle of incidence (was Signal to noise ratio before version 8)
251
+ 61-63 I3 Azimuth residual
252
+ 64-68 F5.1 Travel time residual
253
+ 69-70 I2 Weight
254
+ 71-75 F5.0 Epicentral distance(km)
255
+ 76 Free
256
+ 77-79 I3 Azimuth at source
257
+ 80 A1 Type of this line ("4"), can be blank, which it is most often
258
+
259
+ NB: Epicentral distance: Had format I5 before version 7.2. All old lines can
260
+ be read with format F5.0 with same results, but now distance can also be e.g.
261
+ 1.23 km which cannot be read by earlier versions. However, an UPDATE would fix
262
+ that.
263
+ ** Long phase names: An 8 character phase can be used in column 11-18. There is
264
+ then not room for polarity information. The weight is then put into column 9.
265
+ This format is recognized by HYP and MULPLT.
266
+
267
+ Type 4 cards should be followed by a Blank Card (Type 0)
268
+ """
269
+ def __init__(self):
270
+ self.station_name = ' '
271
+ self.instrument_type = ' '
272
+ self.component = ' '
273
+ self.quality = ' '
274
+ self.phase_id = None
275
+ self.weighting_indicator = None
276
+ self.flag_auto_pick = None
277
+ self.first_motion = ' '
278
+ self.hour = None
279
+ self.minutes = None
280
+ self.seconds = None
281
+ self.duration = None
282
+ self.amplitude = None
283
+ self.period = None
284
+ self.direction_of_approach = None
285
+ self.phase_velocity = None
286
+ self.angle_of_incidence = None
287
+ self.azimuth_residual = None
288
+ self.travel_time_residual = None
289
+ self.weight = None
290
+ self.epicentral_distance = None
291
+ self.azimuth_at_source = None
292
+ self.dataid = ""
293
+
294
+
295
+ class seisan_5(object):
296
+ """
297
+ Type 5 line (optional): Error estimates of previous line, currently not used
298
+ by any SEISAN programs.
299
+
300
+ Columns Format Description Comments
301
+ 1 Free
302
+ 2-79 Error estimates in same format as previous line, normally type 4
303
+ 80 A1 Type of this line ("5")
304
+ """
305
+ def __init__(self):
306
+ self.text = ' '
307
+ self.dataid = ""
308
+
309
+
310
+ class seisan_6(object):
311
+ """
312
+ Type 6 Line (Optional):
313
+
314
+ Columns Format Description Comments
315
+ 1 Free
316
+ 2-79 A Name(s) of tracedata files
317
+ 80 A1 Type of this line ("6")
318
+ """
319
+ def __init__(self):
320
+ self.tracedata_files = ' '
321
+ self.dataid = ""
322
+
323
+
324
+ class seisan_7(object):
325
+ """
326
+ Type 7 Line (Optional):
327
+
328
+ Columns Format Description Comments
329
+ 1 Free
330
+ 2-79 A Help lines to place the numbers in right positions
331
+ 80 A1 Type of this line ("7")
332
+
333
+ STAT SP : Station and component
334
+ IPHAS : Phase with onset
335
+ W : Phase weight, HYPO71 style
336
+ HRMM SECON : Hour, minute and seconds
337
+ CODA : Coda length (secs)
338
+ AMPLIT PERI: Amplitude (nm) and period (sec)
339
+ AZIM VELO : Back azimuth (deg) and apparent velocity of arrival at
340
+ station
341
+ AIN : Angle of incidence
342
+ AR : back azimuth residual
343
+ TRES : Arrival time residual
344
+ W : Weigh used in location
345
+ DIS : Epicentral distance in km
346
+ CAZ : Azimuth from event to station
347
+
348
+ """
349
+ def __init__(self):
350
+ self.stat = None
351
+ self.sp = None
352
+ self.iphas = None
353
+ self.phase_weight = None
354
+ self.d = None
355
+ self.hour = None
356
+ self.minutes = None
357
+ self.seconds = None
358
+ self.coda = None
359
+ self.amplitude = None
360
+ self.period = None
361
+ self.azimuth = None
362
+ self.velocity = None
363
+ self.angle_incidence = None
364
+ self.azimuth_residual = None
365
+ self.time_residual = None
366
+ self.location_weight = None
367
+ self.distance = None
368
+ self.caz = None
369
+ self.dataid = ""
370
+
371
+
372
+ class seisan_E(object):
373
+ """
374
+ Type E Line (Optional): Hyp error estimates
375
+
376
+ Columns Format Description
377
+
378
+ 1 Free
379
+ 2 - 5 A4 The text GAP=
380
+ 6 - 8 I3 Gap
381
+ 15-20 F6.2 Origin time error
382
+ 25-30 F6.1 Latitude (y) error
383
+ 31-32 Free
384
+ 33-38 F6.1 Longitude (x) error (km)
385
+ 39-43 F5.1 Depth (z) error (km)
386
+ 44-55 E12.4 Covariance (x,y) km*km
387
+ 56-67 E12.4 Covarience (x,z) km*km
388
+ 68-79 E14.4 Covariance (y,z) km*km
389
+ """
390
+ def __init__(self):
391
+ self.gap = None
392
+ self.origin_time_error = None
393
+ self.latitude_error = None
394
+ self.longitude_error = None
395
+ self.depth_error = None
396
+ self.cov_xy = None
397
+ self.cov_xz = None
398
+ self.cov_yz = None
399
+ self.dataid = ""
400
+
401
+
402
+ class seisan_F(object):
403
+ """
404
+ Type F Line (Optional): Fault plane solution
405
+
406
+ Columns Format Description
407
+
408
+ 1:30 3F10.0 Strike, dip and rake, Aki convention
409
+ 31:45 4F5.1 Error in strike dip and rake (HASH), error in fault plane and
410
+ aux. plane (FPFIT)
411
+ 46:50 F5.1 Fit error: FPFIT and HASH (F-fit)
412
+ 51:55 F5.1 Station distribution ratio (FPFIT, HASH)
413
+ 56:60 F5.1 Amplitude ratio fit (HASH, FOCMEC)
414
+ 61:65 I2 Number of bad polarities (FOCMEC, PINV)
415
+ 64.65 I2 Number of bad amplitude ratios (FOCMEC)
416
+ 67:69 A3 Agency code
417
+ 71:77 A7 Program used
418
+ 78:78 A1 Quality of solution, A (best), B C or D (worst), added manually
419
+ 79:79 A1 Blank, can be used by user
420
+ 80:80 A1 F
421
+ """
422
+ def __init__(self):
423
+ self.strike = None
424
+ self.dip = None
425
+ self.rake = None
426
+ self.err1 = None
427
+ self.err2 = None
428
+ self.err3 = None
429
+ self.fit_error = None
430
+ self.station_distribution_ratio = None
431
+ self.amplitude_ratio = None
432
+ self.number_of_bad_polarities = None
433
+ self.number_of_bad_amplitude_ratios = None
434
+ self.agency_code = ' '
435
+ self.program_used = ' '
436
+ self.solution_quality = ' '
437
+ self.dataid = ""
438
+
439
+
440
+ class seisan_H(object):
441
+ """
442
+ Type H line, High accuracy hypocenter line
443
+
444
+ Columns
445
+
446
+ 1:15 As type 1 line
447
+ 16 Free
448
+ 17 Seconds, f6.3
449
+ 23 Free
450
+ 24:32 Latitude, f9.5
451
+ 33 Free
452
+ 34:43 Longitude, f10.5
453
+ 44 Free
454
+ 45:52 Depth, f8.3
455
+ 53 Free
456
+ 54:59 RMS, f6.3
457
+ 60:79 Free
458
+ 80 H
459
+ """
460
+ def __init__(self):
461
+ self.year = None
462
+ self.month = None
463
+ self.day = None
464
+ self.fixed_origin_time = ' '
465
+ self.hour = None
466
+ self.minutes = None
467
+ self.seconds = None
468
+ self.latitude = None
469
+ self.longitude = None
470
+ self.depth = None
471
+ self.rms = None
472
+ self.dataid = ""
473
+
474
+
475
+ class seisan_I(object):
476
+ """
477
+ Type I Line, ID line
478
+
479
+ Columns Format description1 Free
480
+
481
+ 2:8 Help text for the action indicator
482
+ 9:11 Last action done, so far defined SPL: Split
483
+ REG: Register
484
+ ARG: AUTO Register, AUTOREG
485
+ UPD: Update
486
+ UP : Update only from EEV
487
+ REE: Register from EEV
488
+ DUB: Duplicated event
489
+ NEW: New event
490
+ 12 Free
491
+ 13:26 Date and time of last action
492
+ 27 Free
493
+ 28:30 Help text for operator
494
+ 36:42 Help text for status
495
+ 43:56 Status flags, not yet defined
496
+ 57 Free
497
+ 58:60 Help text for ID
498
+ 61:74 ID, year to second
499
+ 75 If d, this indicate that a new file id had to be created which was
500
+ one or more seconds different from an existing ID to avoid overwrite.
501
+ 76 Indicate if ID is locked. Blank means not locked, L means locked.
502
+ """
503
+ def __init__(self):
504
+ self.last_action_done = ' '
505
+ self.date_time_of_last_action = ' '
506
+ self.operator = ' '
507
+ self.status = ' '
508
+ self.id = ' '
509
+ self.new_id_created = ' '
510
+ self.id_locked = ' '
511
+ self.dataid = ''
512
+ # This is used in a type 3 line
513
+ self.region = ''
514
+
515
+
516
+ class seisan_M(object):
517
+ """
518
+ Type M Line (Optional): Moment tensor solution
519
+
520
+ Note: the type M lines are pairs of lines with one line that gives the
521
+ hypocenter time, and one line that gives the moment tensor values:
522
+
523
+ The first moment tensor line:
524
+ Columns Format Description
525
+ 1:1 Free
526
+ 2: 5 I4 Year
527
+ 7: 8 I2 Month
528
+ 9:10 I2 Day of Month
529
+ 12:13 I2 Hour
530
+ 14:15 I2 Minutes
531
+ 17:20 F4.1 Seconds
532
+ 24:30 F7.3 Latitude Degrees (+ N)
533
+ 31:38 F8.3 Longitude Degrees (+ E)
534
+ 39:43 F5.1 Depth Km
535
+ 46:48 A3 Reporting Agency
536
+ 56:59 F4.1 Magnitude
537
+ 60 A1 Type of Magnitude L=ML, b=mb, B=mB, s=Ms, S=MS, W=MW,
538
+ 61:63 A3 Magnitude Reporting Agency
539
+ 71:77 A7 Method used
540
+ 78:78 A1 Quality of solution, A (best), B C or D (worst), added manually
541
+ 79:79 A1 Blank, can be used by user
542
+ 80:A1 M
543
+
544
+ The second moment tensor line:
545
+ Columns Format Description
546
+ 1:1 Free
547
+ 2:3 A2 MT
548
+ 4:9 F6.3 Mrr or Mzz [Nm]
549
+ 11:16 F6.3 Mtt or Mxx [Nm]
550
+ 18:23 F6.3 Mpp or Myy [Nm]
551
+ 25:30 F6.3 Mrt or Mzx [Nm]
552
+ 32:37 F6.3 Mrp or Mzy [Nm]
553
+ 39:44 F6.3 Mtp or Mxy [Nm]
554
+ 46:48 A3 Reporting Agency
555
+ 49:49 A1 MT coordinate system (S=spherical, C=Cartesian)
556
+ 50:51 i2 Exponental
557
+ 53:62 G6.3 Scalar Moment [Nm]
558
+ 71:77 A7 Method used
559
+ 78:78 A1 Quality of solution, A (best), B C or D (worst), added manually
560
+ 79:79 A1 Blank, can be used by user
561
+ 80:80 A1 M
562
+ """
563
+ def __init__(self):
564
+ self.year = None
565
+ self.month = None
566
+ self.day = None
567
+ self.hour = None
568
+ self.minutes = None
569
+ self.seconds = None
570
+ self.latitude = None
571
+ self.longitude = None
572
+ self.depth = None
573
+ self.reporting_agency = ' '
574
+ self.megnitude = None
575
+ self.magnitude_type = ' '
576
+ self.magnitude_reporting_agency = ' '
577
+ self.method_used = ' '
578
+ self.quality = ' '
579
+ self.mt = ' '
580
+ self.mrr_mzz = None
581
+ self.mtt_mxx = None
582
+ self.mpp_myy = None
583
+ self.mrt_mzx = None
584
+ self.mrp_mzy = None
585
+ self.mtp_mxy = None
586
+ self.reporting_agency2 = ' '
587
+ self.mt_coordinate_system = ' '
588
+ self.exponential = None
589
+ self.scalar_moment = None
590
+ self.method_used_2 = ' '
591
+ self.quality_2 = ' '
592
+ self.dataid = ""
593
+
594
+
595
+ class seisan_P(object):
596
+ """
597
+ Type P line, file name of a picture file
598
+
599
+ 1:1 Free
600
+ 2:79 File name
601
+ 80:80 P
602
+ """
603
+ def __init__(self):
604
+ self.filename = ' '
605
+ self.dataid = ""